LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Record start time of a task (T0) to a file

   This one shouldn't be that complicated just really can't find the answer easily.  I am recording 4 channels of analog data and 7 digital channels at 6000 Hz.  we jsut recently purchased a new M-series board for the fact that it seems like it will be much more precise than our older 6015 boards.  Question I have is that I want to capture the start time of the task and dump it to the file I am writing to.  This is ussually done for my automatically when I was using the Write LabVIEW measurement File VI.  Since there is so much over head in a while loop when using that VI I am attempting todo this a little differently just by using the basic file write sequence.  Question is I can make a header and what not before I go into the while loop but I don't se how I can capture te actual "Start Task" time.  I need this so I can reference when exactly my first data point was collected. 

 

Thanks,

Chris

 

0 Kudos
Message 1 of 9
(3,289 Views)
If you are working with binary files it is no problem to make a header. Writing and reading is always done at current file pos. I have made a quick and dirty sample vi. 


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 9
(3,275 Views)
You say you want to record the exact time you started recording. You should consider that it is impossible to get a timestamp with any better resolution then +-1 second. The basic write to file vi is using binary file write that t06afre is talking about. He made a good example of how to make a header with that. Though some might disagree, I have found the binary file write to be the fastest write sequence, even faster than tdms. Good luck.
---------------------------------
[will work for kudos]
0 Kudos
Message 3 of 9
(3,265 Views)

Well how accurate is the file channel header information when you use the "Write to Labview measurement file VI"  the T[0] time looks like it is alot more accurate than plus or minus one second.  I mean there are 2 timestamps in there one is when the file is opened and the other, I thought was when the actual first sample occured.  Also can you repost that VI I am only running 7.1 and 8.0, I haven't loaded in my 8.6 yet.

 

Thanks,

Chris

 

0 Kudos
Message 4 of 9
(3,260 Views)
here it is in 8.0


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 9
(3,254 Views)
I'm getting quote an "Insane Error" when I try to run the VI.....
0 Kudos
Message 6 of 9
(3,251 Views)

hm once more

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 9
(3,248 Views)

   So this is what I get...."Insane Object at FPHP+34 "Sample.vi":{tdo}{0x800}:FrontPanelDataController (DCO)"....maybe can send me a sceen capture of the block diagram if it is small enough?

 

 

0 Kudos
Message 8 of 9
(3,233 Views)

It works for me, but anyway her is a screen shot. Also some basic advice. Remember you do not have to close the file after every write. You can leave it open untill you have written the last data record

 

Message Edited by t06afre on 12-04-2008 02:20 PM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 9
(3,231 Views)