sw_eng41 Posted December 30, 2010 Share Posted December 30, 2010 i have been using 2 labjacks simultaneously with DaQF_express. in evaluation. the approach i took was to use a hybrid of the channel table and scripting sequences. -- channels are declared in table but device type is "test", and timing is "0". -- then, in sequence script i have a timing loop (a while loop) which executes 1. eGet command for A2D and timer values 2. mathematical manipulations as needed 3. MyChannel.Addvalue(value) where the name "MyChannel" is one of the Channel names in the channel table. BUT -- and maybe this is obvious -- the time stamp of the value is not placed into the MyChannel array. It simply gives the same time value to all of the data entries. and this time value seems to be the time at which the Channel was created. please advise on how to get the { data value , time value } pair entered into the Channel record for each eGet call. Link to comment Share on other sites More sharing options...
AzeoTech Posted December 30, 2010 Share Posted December 30, 2010 use insertTime(). For example, to use inject the system time: myChannel.addValue(insertTime(value, sysTime(), 0)) Link to comment Share on other sites More sharing options...
sw_eng41 Posted January 4, 2011 Author Share Posted January 4, 2011 yes, that worked. thanks! Link to comment Share on other sites More sharing options...
sw_eng41 Posted January 4, 2011 Author Share Posted January 4, 2011 for more completeness, this is the final result -- // LPTank_Pressure is a channel name defined in the Channel Table with device = "Test" and timing = "0" // Device "Dev7_SW" was Opened in a startup sequence before this sequence was started. Go_Channel_Read = 1 while (Go_Channel_Read) //snippet for reading channel LPTank_Pressure[] err = eGet (Dev7_SW, LJ_ioGET_AIN, 0, @channelval7, 0) channelval7 = channelval7 * PressureConv1000PSI10V // LPTank_Pressure.AddValue(channelval7) -- replaced this with the following line LPTank_Pressure.AddValue(insertTime(channelval7, sysTime(), 0)) // many more similar lines for other channel reads... delay (0.2) endwhile Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.