LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time stamp dropping seconds

Solved!
Go to solution

The for loop will automatically index your 2D array. You have to place the build waveform function inside.

 

Yes, the timestamp is t0 and the sample rate gives you dt.

0 Kudos
Message 11 of 16
(853 Views)

@Dac83 wrote:

Hi Dennis,

 

Not sure I see what you mean when you say "place this in a for loop to add the t0 and dt".  Are you saying the for loop will automatically add these somehow?  The 2-D array is a collection of 5 seconds worth of data while the time stamp (as it is now) is the time at the start of the collection time.  So should I be using the time stamp as the t0 and using the sampling rate to find the dt?  This seems to make sense to me but I'm sure if I'm misunderstanding.


(Answering for Dennis)  Here is a picture of what Dennis is saying.  However, I tried using the Write to Spreadsheet File and it didn't come out right.  First column of data array was missing.  I never have written a 1D array of waveforms using any File Write function.  You can't use the standard File Write because it only accepts string input.  Perhaps Dennis can enlighten us.

 

17603i9D22D797FAB0700C

- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 16
(845 Views)

Yeah this is what I'm working on at this moment.  Hopefully it will agree well with everything else that is going on in this program...

0 Kudos
Message 13 of 16
(842 Views)

Unfortunately this doesn't fix the problem.  I'm pretty sure the reason it doesn't is because of something I neglected to mention.  The 2-D array contains data from 11 channels.  The other thing is that I still don't get the time stamp rather a column of data starting a zero and incrementing by dt.  Because the output file must agree with an already existing program that will used when this is delivered we are very limited to the file format.  

 

The first line must be in the format:

 

Sequential Count Time Stamp Channel1 CH2 CH3.......   CH11

 

All other lines are the same but without the time stamp.

 

This is what I currently have as an output file but the time stamp is cut off.

0 Kudos
Message 14 of 16
(832 Views)

tbob,

 

Thanks for providing the example. The empty column was because you had selected 'Empty Time Column'.

0 Kudos
Message 15 of 16
(831 Views)
Solution
Accepted by topic author Dac83

@Dennis Knutson wrote:

tbob,

 

Thanks for providing the example. The empty column was because you had selected 'Empty Time Column'.


Did I ever mention that I hate Express VIs? Smiley Mad

If you have to fit a certain format, you will just have to brute force the timestamp and data to the proper position and format.

 

So you still have a problem with lost seconds?  Don't use the Express VI.  Use Write to Spreadsheet and set the format to %d.  This will write out the complete integer.

 

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 16 of 16
(825 Views)