LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform with saved data starting at t0 = 0

Hello,

 

I have some thermocouples attached to a NI9213 and I want to get the data from the waveforms to save to a deliniated text file with no date information just time starting at zero when I press the start button.  I can't seem to find where the time date is coming from, so I can't change it.  I also can't seem to find the data for the to point as the two data streams are incompatible.  I will attach to code any help would be great.

 

Thanks!

0 Kudos
Message 1 of 3
(2,250 Views)

The date/time is coming from the T0 in the waveforms.  Unfortunately, with that VI you are stuck with the date/time format.  You could write your own VI to save the data for you in the format that you want.  You would just need to increase the time by the dt information in the waveforms.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,234 Views)
I can't look at your code right now, but it sounds like the acquisition VI is returning a waveform, but you want to simply save two columns: one with a relative time starting at zero and one column of the data. Correct so far?
On the waveform palette are nodes for extracting the three values contained in a waveform: T0, deltaT and Y(). The first two values are DBLs and the third is an array of DBLs.
The two you are interested in is the deltaT and Y() -- the later of which is the actual data. Y() will be your second column data. You will have to synthesize the first column.
To generate the first column data, and put your data in the right format for saving, place a FOR loop on the block diagram and put a build array function inside the loop. By default, the build array will have two inputs. Wire the Y() array through the wall of the loop to the bottom terminal on the build array.
Place a multiply primitive in the loop and wire its output to the top terminal on the build array. Wire the loop's iteration counter to one input of the multiply and deltaT to the other.
Now wire the output from the build array out of the loop, and note that it turns into a 2D array where column 0 is a relative sample time and column 1 is a data value.
Write this array to a text file (write to spreadsheet file.vi should do nicely) and you are done.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,211 Views)