LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp with Write to Measurement File?? Help a Newb.

This will keep the timing data.
You'll need to change your express VIs back to how they were, along with your file paths.
You should consider a better desing pattern, the one used is not suitable.
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 11 of 19
(1,690 Views)
"This will keep the timing data.
You'll need to change your express VIs back to how they were, along with your file paths.
You should consider a better desing pattern, the one used is not suitable."
 
 
TWGomez,
 
It's not working, we are getting a code 71 (data log file mismatch)  in the write subroutine.  Also, how is the array size defined & initialized on startup and after a write?  You disconnected it.  When we reconnect it, it goes back to a 2 dimensional array and we end up with a mismatch with the write routine. 
 
Just to reclarify, our machines are running 24 hour a day and errors may occur once a day or once a week.  We don't want to collect giga bytes of data.  We only want the few minutes preceding the incident.  Labview will be running unattended and needs to be constantly filling an array with a few minutes of waveform data.  If a machine error is encountered, a trigger will be sent to labview to write the current contents of the array to a file.  We can then review this at a later date to determine the cause of the failure. 
 
John
0 Kudos
Message 12 of 19
(1,663 Views)
Not sure hwat the error 71 is, can you get a bit more specific...Its not when you read, but when you write? You aren't trying to write that data to a file that already exsists are you? That will probably cause a mismatch error since the data being written is different.
 
You don't really need to initialize since you are using the build array function and the array subset functions....
You will probably have to redo the read function so it reads how you write the new data.
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 13 of 19
(1,661 Views)

TWGomez,

We found our problem and were able to get your program running.  It seems to be doing what we want, but on playback it's single channel and only about .1 second of data.  I feel stupid for asking, but how do we increase the size of the array to record several minutes?  Also, how do we accomplish recording all 4 channels?

 

John

0 Kudos
Message 14 of 19
(1,648 Views)

Removing the "Delete From Array" will fix part of that...

I verified all four channels are being saved though, 2D array, first Index held an array of 4 elements (one element for each channel). You may not be reading it right...

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 15 of 19
(1,641 Views)

"Removing the "Delete From Array" will fix part of that...

I verified all four channels are being saved though, 2D array, first Index held an array of 4 elements (one element for each channel). You may not be reading it right..."

Your right again.  All the channel are there, so reading it back is now our issue.  We are using a "Read Waveform from File" tool connected directly to a "Waveform Chart".  On the waveform chart, stacked is selected as an option.  All (4) charts are shown (with correct timing), but the data is only being plotted in the 1st chart.  the other (3) are empty.  Are we using the correct method? Or are we forgetting something?

Thanks Again,

John

 

 

 

0 Kudos
Message 16 of 19
(1,618 Views)
You'll want to modify the read to use the "Read Waveform from File.vi" (instead of the express vi) in the same pallete I got the "Write Waveform to File.vi" (Programming->Waveform->Waveform I/O).

Message Edited by TWGomez on 04-24-2008 08:34 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 17 of 19
(1,613 Views)
"You'll want to modify the read to use the "Read Waveform from File.vi" (instead of the express vi) in the same pallete I got the "Write Waveform to File.vi" (Programming->Waveform->Waveform I/O).

Message Edited by TWGomez on 04-24-2008 08:34 AM "
 
 
We did that, every thing is OK in the write from waveform vi.  Problem appears to be back in the read waveform to file vi.  We inserted an "export to spreadsheet" tool to see what was being stored in the aray.  Apparently the array is being built incorrectly.  Instead of (4) columns or rows representing the (4) analog channels,  we have (4) time channels and endless analog channels.  Attached is a screen cap of the spreadsheet.  Any idea how the aray can be changed to represent the data properly?  We are using the last vi you modified for us.
 
 
 
 
 
John
0 Kudos
Message 18 of 19
(1,603 Views)
Instead of "build array" you could use the "insert into array" function to build it how it needs to be.
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 19 of 19
(1,591 Views)