Generating some timestamps
Hello
I encountered a problem with generating a channel timestamp of entire channels for years, months, days, hours, minutes and dry. All these channels have been read in a binary file as eI32s. Now, I would like to genereate a timestamp of them in #YYYY order. Mm Hh: mm: DD but nothing I've tried works. Ideally, I don't want to loop through the channel values, many preferring to call a function to calculate as:
Call calculate ("Ch (" ' [1] / date "" ") = DateSerial (Ch (" ' [1] / year "" ""), Ch ("' [1] / month" "" "), Ch (" ' [1] / day "" ")," "#YYYY.)") (MM._DD_»_») ', NULL, NULL,"")
Should I convert the strings all over I have to text? If so how to do that? "A command such as: call Calculate ("Ch(""[1]/textyear)"" ") = str (Ch(""[1]/intyear"")), NULL, NULL," ") does not work on the channels."
Should I have read the values as strings of binary string with the plugin in the first place?
Is there a better way to generate a bit string of stamps in time which are distributed on other channels?
Thanks in advance.
Hi tspc.
I spoke too fast or some thought deeply enough. Below you will find a use which uses indeed the property of Channel.Factor and a ProcessedChannel to combine only the hours, minutes and seconds channels, but the date is not linear, as the days per month and days per year is variable:
Void ReadStore (File)
Dim oBlock: Set oBlock = File.GetBinaryBlock)
oBlock.BlockWidth = 3424
Dim oChannelGroup: Set oChannelGroup = Root.ChannelGroups.Add (File.Info.FileName)
Dim oChannel0: Set oChannel0 = oChannelGroup.Channels.AddProcessedChannel ("DateTime", eR64, eAddProcessor)
Dim oChannel1: Set oChannel1 = oBlock.Channels.Add ("year", eI32): oChannel1.Offset = 1900
Dim oChannel2: Set oChannel2 = oBlock.Channels.Add ("month", eI32)
Dim oChannel3: Set oChannel3 = oBlock.Channels.Add ('day', eI32)
Dim oChannel4: Set oChannel4 = oBlock.Channels.Add ("h", eI32): oChannel4.Factor = 3600
Dim oChannel5: Set oChannel5 = oBlock.Channels.Add ("min", eI32): oChannel5.Factor = 60
Dim oChannel6: Set oChannel6 = oBlock.Channels.Add ("s", eI32)
Call oChannel0.Channels.Add (oChannel4)
Call oChannel0.Channels.Add (oChannel5)
Call oChannel0.Channels.Add (oChannel6)
oChannel0.Properties.Add "DisplayType", "Time".
Call oChannelGroup.Channels.AddDirectAccessChannel (oChannel1)
Call oChannelGroup.Channels.AddDirectAccessChannel (oChannel2)
Call oChannelGroup.Channels.AddDirectAccessChannel (oChannel3)
End Sub
You must call this use to load data files, then run a channel to transform a real number of seconds since 0 AD of the year, month and day channels and add them to the chain of the time, like this:
Call Data.Root.Clear
DataFilePath = "C:\NICS\Discussion Forums\tspc\DataFile.abc".
Call DataFileLoad (DataFilePath, "tspc_abc")
Presets = Data.Root.ActiveChannelGroup.Channels
Symbols = Array ("dt", "year", "my", "day")
ChanRefs = Array (Channels (1), Channels (2), Channels (3), Channels (4))
(Équation = «dt = dt + TTR (yr & ««/»» & à droite ("" 00"" & Lun, 2) & "" / "" & right "" 00 "" & day, 2, "" # yyyy/mm/dd "" ")").
Call calculated (equation, symbols, ChanRefs)
Call the Channels.Remove (Channels (4). Name)
Call the Channels.Remove (Channels (3). Name)
Call the Channels.Remove (Channels (2). Name)
Brad Turpin
Tiara Product Support Engineer
National Instruments
Tags: NI Software
Similar Questions
-
use a date to generate a timestamp
I want to write an application that processes the string format dates and will give me a timestamp.
Explantion of use:
I have a table of dates (of birth), and I want to know how old everyone is at some point in time (denoted by a constant of the timestamp).
Or someone at - it a better solution for caculating age starting from an array of strings, and another at the entrance of the undefined type. (output of the age is digital.)
Can someone point me in the right direction to start please.
Thanks to each of you for pointing me in this direction.
I found out how to do what I wanted and posted here as an explanation.
The VI takes a date entry in the format defined (could be from a date string timestamp, or a database etc.) and calculates the age of the person to the dat provided using the supplied DOB. (I didn't get the penalty to debug this yet so no comment nasty on the interception errors and use of people who are not yet born thank you!)
-
Primitive polynomial (generate some Bits VI)
In the attached VI, I'm actually generate bits using the PN sequence and primitive polynomial. I'm having a problem in the primitive polynomial. If I have a primitive polynomial (x ^ 4 + x + 1) can any body guide me how to make it work? I tried different ways but error message.
Thank you
JK
I fixed it my self.
Thank you
-
Why C++ SDK always generates some clips from uncompensated image?
I created a first with video image drop sequence, when I try to make a clip with MXF OP1a preset file using C++ SDK (controller of the exporter)), it's always the video playback image fall not.
I tried directly from first ( "file-> export-> Media...' ") to export the movie with the same preset file and it works fine.
I found a comparisons quests (why SDK always generates image trim clips? ) who asked previously, but no solution is given for the particular problem
It is specifically export controller API. We are aware of this problem (bug #4122394) and research in a fix for a future version.
-
Check generate some Comp based on the drop-down list box and the selection list?
I currently have a dropdown list with the three sizing options in it. Then I have two check boxes, one is ticked ideally would create the model to its normal size composition and if other is checked that it would reverse the widthxheight in the size of the composition. Then below that I have a "Generate" button, I want to be able to click and according to my selections, it creates the model.
Looks like I need a kind of if then statement, but I'm having a hard time putting the two together. See below what I have so far.
There may be missing parts, but I have it all working in a decibel pallate currently. I don't have functionality related to a button again.
Any help would be appreciated!
(also I don't know how to format the script spread here so apologies for that)
---------------------------
palette controls
templateGen.VerticalCheckbox = new Object();
templateGen.HorizontalCheckbox = new Object();
set the values for controls
templateGen.comLookup = new Object();
templateGen.compLookup = 'Template1 ';
templateGen.compLookup = "Template2";
templateGen.compLookup = "Template3."
function templateGen_getHashValues (hash)
{ // {{{
var ary = new Array();
for (k hash) {}
ARY.push (Hash [k]);
}
return area;
} // }}}
menu "composition".
var panelGrp1 = templateGen.palette.add ('Panel', undefined, 'Templates Comp');
compGrp1 = panelGrp1.add ('group', undefined, 'List templates');
compGrp2 = panelGrp1.add ('group', undefined, 'Orientation');
compGrp3 = panelGrp1.add ('group', undefined, 'Generate');
templateGen.compList = compGrp1.add ('dropdownlist', LIST_DIMENSIONS, templateGen_getHashValues (bapple.compLookup));
templateGen.compList.helpTip = "choose the type of desired here device model. All compositions are 60 fps. « ;
templateGen.compList.selection = 'Template1 ';
templateGen.compList.graphics.foregroundColor = darkColorBrush;
templateGen.VerticalCheckbox = compGrp2.add ('checkbox', undefined, 'Portrait');
templateGen.VerticalCheckbox .value = true;
templateGen.HorizontalCheckbox = compGrp2.add ('checkbox', undefined, 'Horizontal');
templateGen.HorizontalCheckbox .value = false;
templateGen.generateBtn1 = compGrp3.add ('button', undefined, 'Generate');
applyBtn.onClick =? ;
When I work with drop-down menus, I always liked to tie the data they represent (like the width and height of the model in this case) directly to the elements.
I run the code to really check, but it should work like this:
-----------------
Add models to your drop-down list and store the items in a table
models var = [];
models [0] = templateGen.compList.add('item','template1');
models [1] = templateGen.compList.add('item','template2');
models [2] = templateGen.compList.add('item','template3');
set a width and height of each element
models [0] .width = 1280;
models [0] .height = 720;
models [1] .width = 1024;
models [1] .height = 768;
models [2] .width = 1920;
models [2] .height = 1080;
Choose the item that should be selected by default
models [0] .selected = true;
applyBtn.onClick = function() {}
read the width and height of the selected item
var width = templateGen.compList.selection.width;
var height = templateGen.compList.selection.height;
{if (templateGen.VerticalCheckbox.value)}
swap width and height
var temp = width;
width = height;
height = temp;
}
now create your comp here with the given width and height
}
-
Why SDK always generates some clips from uncompensated image?
I created a first sequence: NTSC DV, Codec: DV NTSC, 29.97 FPS, 720 x 480, timecode offset.
When I try to make a clip with file MXF OP1a (NTSC DV25) presets by SDK, it always generates uncompensated image clip.
If I use "file-> export-> media..." with the same preset file, exactly compensated.
"Offset" seems to be an option of sequence and there is no place for config it in the Presets dialog box.
How can I generate clip image offset by SDK (Controller of the exporter)?
Now I understand your question.
There is no API to export controllers to intercept or to modify the rendering, contained in the .epr file being used.
-
Strange "Scan chain" Timestamp error
Hello
I try to analyze my time string in a timestamp with 'Analysis of the chain' but I have some Error (1) strange.
Code:
The error:
can anyone confirm? have I not a mistake in my string parser?
It may be due to this Bug
461196 Scan chain VI returns 1 error with '%t' as the input format string
http://www.NI.com/product-documentation/52151/en/
This should be fixed?
my version of labview is
LV 2014 SP1 - Version 14.0.1 (32 bit)
with the addon in real time (but the code in question was not executed on RT)
Thanks for your time.
Why do you have the square brackets around the string format string analysis? They aren't there when you generate the timestamp string if it fails when you try to convert as soon as they are supposed to be there.
-
How to make the data previously generated reuse vi?
Attached VI is just a simple example for my problem. I want to generate some data (or read it thanks to a shared variable, etc, etc) and create statistics on these data. In this example, a histogram and value medium.
Now, if I stop the VI & restart again, the first time that I generate a new data point, all old data is deleted the chart and indicators. I want to change my program, so he'll see actually yet all the data I have accumulated before the table.
I know how to do for example in matlab:
output = myfunction (output)
so when I call this function, the first 'myfunction()' time it will generate the output array I can then move again on the next call so that the previously generated data will be used.
So, how do I do that in Labview?
Make a search for globals functional, which is based on the use of a shift register uninitialized for a while loop. You basically already have this if you simply delete the matrix constant which initializes the shift register holding the data table. It is a technique that was used before that global variables have been introduced. It's an old technique, but it is very effective and the basis for the Action engines. Jim Kring suggested a version no.-loop for LabVIEW 8.5.
Note: You perform a comparison on floating-point values. As noted several times on this forum, it is doomed to failure because of how floating point numbers are stored in computers (this has nothing to do with LabVIEW).
-
Generate SNMP traps for monitoring tests
Hi all
We would like to test our network management system effectively.
We have configured SNMP. But as we cannot generate some breakdowns that we want to generate some test traps.
Could you tell me if there is a way to generate the CLI for i.e. false SNMP traps?
Ideally, we would like to test things like: excess temperature, the FAN failure, failure of power, etc...
Any help would be appreciated,
Thank you very much in advance
Concerning
Sorry I see you wanted traps, not sys records my bad, so try this link https://supportforums.cisco.com/docs/DOC-11745
Sent by Cisco Support technique iPad App
-
Generate PDF with itext in PL/SQL
Hello
I am generating some PL/SQL PDF using itext. I loaded iText - 5.0.4.jar, but found a few invalid javaclass, after going through a lot of forums I found some suggestion that I need to load a jar file more so I loaded the
loadjava - < user > / < pw > bcmail-jdk14 - 147.jar
loadjava - < user > / < pw > bcprov-jdk14 - 147.jar
then again loaded iText - 5.0.4.jar, but the result is the same.
I use oracle DB 11.2 on 64-bit Windows.
I also tried with bcprov-jdk15on - 147.jar and bcmail-jdk15on - 147.jar
because the version of java database is
Java version "1.5.0_17.
Java (TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17 - b04)
Java for 64-bit Server VM (build 1.5.0_17 - b04, mixed mode)
need help to solve this problem. Please let me know if you need more information. ThnaxI have tried with - genmissing - v - r but had the following problems.
What authorization I give to load jar files also I want to drop the file jar to do a fresh charge, but dropjava gives file not found error.jump: com/itextpdf/text/pdf/hyphenation/CharVector of class
resolution: com/itextpdf/text/pdf/standard/standard class
error: com/itextpdf/text/pdf/standard/standard class
ORA-29534: referenced object SAMPACC.com/itextpdf/text/pdf/BaseFont could not
t be resolved
resolution: com/itextpdf/text/pdf/hyphenation/HyphenationTree of class
error: com/itextpdf/text/pdf/hyphenation/HyphenationTree of class
ORA-29534: referenced object SAMPACC.com/itextpdf/text/pdf/hyphenation/Simpl
ePatternParser could not be resolved
jump: class com/itextpdf/text/pdf/hyphenation/TernaryTree$ iterator$ Item
jump: class com/itextpdf/text/pdf/hyphenation/TernaryTree$ iteratorError creating java, security, interfaces, ECPublicKey class
ORA-29545: Malformed class: user attempted to load a class (java.secu
rity.interfaces.ECPublicKey) in a small set. The authorization may be part
d using dbms_java.grant_permission (, LoadClassInPackage...
ORA-06512: at line 1The following is not
class java, security, interfaces, ECPublicKey: creation (failure)
output: failure occurred during treatmentPublished by: pkpanda on January 9, 2013 18:01
-
Hello
I am putting together that a test is several sections which must give "advice" on measure to users based on their interactions across multiple slides. I tried this several ways but can get anything to work for my needs.
Is closer to just using the keys to generate some test scores (each button can be given an individual score for generating marked differently from interactions on each page) and then attempt to deliver scenarios advice branched using advanced actions 'if cpQuizInfoPointsscored variable if' less/more than... etc go slide.... I'm frustrated by the fact that the cpQuizInfoPointsscored variable does not seem to pick up dozens of buttons, even if you include the points in the quiz and these scores come out at the end of the quiz or the results page.
These scores are obviously stored somewhere - is it variable anther I can go to read these scores at some point and branch a scenario in response? Is there another way to do this?
See you soon,.
Matt
I would recommend that you create your own user variables to measure the success of the interactions and then use the values of these variables to trigger the branching of fast Action. As you have seen, some score is computed only once you get to the Quiz results slide. Having your own variables will give you more freedom to do what you please.
-
MovieClips dynamically generated
Hello
I tried to dynamically generate some movieclips the method I've used does the following:
use a loop to run according to movieclips how I want generated
whenever the loop cycles it creates a new instance of movieclip
Adds the new movieclip in a table
use the addChild method to put the moveclip onstage
draw a rectangle
starts filling
filling of the ends
It adds to this movieclip
I then use a conditional statement checking if the movieclip is the first element of the array
If so it sets the current x MovieClips and there position to a selected value. the first movieclip is used for a starting point to align the rest of the movieclips generated.
If not the clips x and y position are defined on the elements of the array x and position previos y current movieclips width or height + the gap I wish they have.
then the cycle repeats
Ive coded it using code from script and it works very well the forms appear on the stage without errors
I tried to move this code off the coast of the chronology for a file and the code has no errors, but when it is running I don't see objects even if I followed it y x and y positions I don't see them on the stage
Script code
var mcArray:Array = new Array(); / / DEFINE ARRAY FIRST
var randomNo:Number;
var colorStr:String;
var currentColor;
var movieClip:MovieClip; / / TEMPORARY VARIABLE
var prevMCx:Number = 0;
var prevMCy:Number;
function myFunc (): void
{
for (var i: int = 0; i < 200; i ++)
{/ / FOR LOOP}
movieClip = new MovieClip();
addChild (movieClip);
mcArray [i] = movieClip; / / This is where we add the movieClip references in the table for later use
if(i == 0)
{
mcArray [i] .x = 0;
mcArray [i] there = 0;
}
else
{
prevMCx = mcArray [i-1] .x;
prevMCy = mcArray [i-1] there;
mcArray [i] .x = prevMCx + Math.ceil (Math.random () * 100);
mcArray [i] there = prevMCy + Math.ceil (Math.random () * 100);
}
randColor();
mcArray [i].graphics.beginFill (currentColor, 1);
mcArray [i].graphics.drawRect (0,0,100,100);
mcArray [i].graphics.endFill ();
mcArray [i] .alpha = Math.Random ();
colorStr = null;
}
}
External AS
package com.mvc
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.geom. *;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import com.greensock.TweenLite;
import com.greensock.TimelineLite;
/public class LibraryLayout extends MovieClip
{
public var boxHeight:Number; box height assigned to the main timeline
public var boxWidth:Number; width of //box assigned to the main timeline
public var objFill:String; / / fill color box ASSIGN in MAIN TIMELINE
public var objStroke:String; / / ASSIGN stroke color box in MAIN TIMELINE
public var layoutTotalItems:uint;
private var _imgBoxes:Array = new Array ;// holds all the video clips generated loop.
private var _tempMovieClip:MovieClip; / / the temporary Variable holds current loop [i] movieclip.
public void LibraryLayout()
{
drawBoxes();
}
public function drawBoxes (): void
{
for (var i: uint = 0; i < 10; i ++)
{
_tempMovieClip = new MovieClip (); Creates a temporary MovieClip
addChild (_tempMovieClip); / / Adds temporary MovieClip to the stage
_imgBoxes [i] = _tempMovieClip; / / temporary adds
_imgBoxes [i].graphics.beginFill (0 x 000000, 1);
_imgBoxes [i].graphics.drawRect (0,0,100,100);
_imgBoxes [i].graphics.endFill ();
//===trace statements, check if the feature does not.
If (i == 0)
{
_imgBoxes [i] .x = 10;
trace (_imgBoxes [i] .x);
}
else
{
_imgBoxes [i] .x = _imgBoxes [(i-1)] .x + (_imgBoxes [i] .width + 10);
trace (_imgBoxes [i] .x);
}
_imgBoxes [i] there = 150;
}
}
public function tweeningSlides (): void
{
}
}
}
I am very confused why it does not work if you need more details let me know
If anyone can help me solve this problem, it would make my month!
Right. I don't see where you
addChild (libraryLayout)
The LibraryLayout class extends MovieClip and if MovieClips are visible they need to be added to the display list.
Only the document class is added automatically, but her children aren't.
-
The use of certificates "keytool" generated in B2B
Hello
I have generated some certificate stores (files containing the private key and the certificate of trust) in format ".jks" and client certificate exported them to "der" format using commands in java "keytool". Now, I want to use them for SSL authentication.
It be possible to do this?
I tried to open these keystore in the Portfolio Manager, but he did not accept these keystore. Even I tried to create a key file with name "ewallet.pk12" (in PKCS12 format), but Portfolio Manager did not accept his password.
Please provide a solution if it exists.
Thanks in advance.
Kind regards
Anuj DwivediHi Alain,
The certificate (.cer) of keytool export and import it in the Portfolio Manager help
Thank you and best regards,
Prasanna -
Create arrays of ETL for Siebel
The script that I have generated some ODI Studio for creating tables ETL in Siebel includes this DDL:
CREATE TABLE SIEBEL. () S_ETL_INDUS_VER
INDUST_SIC VARCHAR2 (30 CHAR) NOT NULL,
NON-NULL, VERTICAL VARCHAR2 (30 CHAR)
CDC$ _SRC_LAST_UPDATE_DATE TIMESTAMP NOT NULL,
CDC$ _RPL_LAST_UPDATE_DATE TIMESTAMP NOT NULL,
CDC$ _DML_CODE VARCHAR2 (1 CHAR) NOT NULL
)
;
However this table already exists in my DB Siebel 8.1.1.11 as follows:
Name Null? Type
----------------------------------------- -------- -----------------
INDUST_SIC NOT NULL VARCHAR2 (30 CHAR)
VERTICAL VARCHAR2 (30 CHAR) NOT NULL
So I'll need to add additional columns in the existing SIEBEL. Table S_ETL_INDUS_VER. I will use today's date for Last_update_date columns as default. However, what value should I use for CDC$ _DML_CODE?
I thought about it - 'I', 'U', or '
-
Ground control point and of the CNS by using process DBWr and LOGWr?
What control point has to do with the log writer process I don't get exactly?...
As I fire 1 query updated and apparently it will generate some redo blocks which in turn will come to my redo log files now in this cycle where the control point will occur and why?
(1) my update query
(2) lock
(3) generate redo
(4) generate cancel
5 blocks) are changed, but they are still in the redo log buffer...
Now this block finally comes to redo logs in all this way to check off pointing place and why?
control point takes place also however is flushed to the data files the same reason why?
Same manner around the same question the checkpointing should do with the DBWr process as I'm unclear...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Apart from this overview of the SNA is generated when the user launches period... and we can say YVERT can be used to identify whether or not the transaction is validated. ?
So what is the reason for the SNA update in the control file... Can b to get the last transaction committed... ??
Sorry a thread with questions so much... but this all things create a blurry image, I want to clearly say thnx for your help in advance...
I've read the documentation, but they did not mention deep for recovery... ??
Thank you
Philippe
Published by: 851733 on April 12, 2011 07:57And you the chance to read the guide to the Concepts and the book, Expert, alone that I proposed to read? I guess no, no? You mean, you have to read two books for sure because it would take a lot of time before you would get things correctly.
YVERT is a like a timestamp which oracle maintain separate trasactions of time?
Evil. CPN is with each operation, whether a DML, select, DDL, whatever it is. It's time, that's all. Validation of a transaction would be just another event that will be mapped to the SCN generated right here.
Checkpoint is a SNA during which we emptied all Sales buffers to disk?
Have you read in my last response I mentioned CPN is to read-consitancy and checkpoint is for the recvoery? So, how you said that this point of control is nothing other than RCS? See the definition of the Concepts guide,
A data structure that marks the position of the control point, which is the RCS in the thread again where instance recovery should begin. Control points are recorded in the control file and each file header data and are a crucial part of the recovery.
So assuming that the roll forward flow is as below,
Begin - Checkpoint - end
The point where the word Checkpoint is mentioned, is the place where begins the recovery.
Control files and headers of the data files are updated with the last control point (now this checkpoint is the last SNA by what buffer cache is empty so that we can know up to what our data files are updated).
Read the above, given the definition of the control point.
Buffers are marked with YVERT?
Don't know what you mean by this statement?
Tell you what, read the guide concepts and Experts, by Tom Kyte to understand these things in a way much better. Besides, if you can organize, attend the session for workshop-1 or 2 modules of Oracle University, where the instructor would release these questions into a long discussion, very strongly suggested that with the above mentioned books.
Aman...
Maybe you are looking for
-
IPad Mini will not connect to WiFi
My IPad Mini does not connect to my WiFi at home. All other devices in the House are connected correctly. It seems that my IPad Mini or the router. I was working well until that Friday. I have reset the router and the IPad Mini, forgotten network, re
-
Can I upgrade to Windows 8?
Hello I have a laptop DV6 6011TX, product number LQ436PA #UUF and running Windows 7 Home Premium (which was preinstalled). My question is can I switch to windows 8 with all the features? I mean do all drivers are available for my laptop compatible wi
-
I can't get the system to play a CD in my drive
Original title: Re: Vista.----- I can't get the system to play a CD in my removable drive - even if the CD is in the drive. Does anyone have an idea how I can fix this problem? First issue of the time. Thank you
-
why I hear my videos but I can't see them
I'm unable to watch videos, but I can hear what is on the video. What should I do to fix this?
-
Active DataGuard: ora-16000 database opened for read-only access
Hi allApplication, I get the error message "ora-16000 database opened for read-only access, while my primary database is up/open for read/write." When I stopped the standby database, the application works very well.Please suggest what could be the re