LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing only one instance (1 sec) of the waveform

Hi,
 
I'm trying to output the analog input and output signals (VI attached) that I obtain from the waveform graphs to .lvm files. I've used the high level Write to Measurement File express VI. However, I'm finding that the VI only writes the data in one instant of the run, i.e. the output files only have data from 0 to 1 seconds. I'm wondering whether I could change this so that, if I run my experiment for,say, 5 seconds, it would actually write the all the data from 0 to 5 seconds?
 
Thank you.
0 Kudos
Message 1 of 3
(2,395 Views)

Hello,

That happens because you have the "write to file" outside the loop. So you have to options:

1 - put this vi inside the loop (take care with all the necessary inputs - like path name)

2 - right click the data dote in the loop border and "enable indexing". Then, when you stop the loop, you've all the information in this array. Then just make the necessary adjustments to save this array to a file.

See if this tips are enough...

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 3
(2,386 Views)
Hi Jorge,
 
Thank you for the reply. I think I've got the second first method you've told to work (placing the write to file inside the loop). However, I ran it for 16 secs and the measurement file is around 40MB. Is this normal? Given that my sampling rate is very high (15kS/s). I've attached pictures of what I've done for both the methods.
 
Also, I couldn't get the second method to work (because I don't know  how I could use the high level express VI Write Measurement to File with arrays), or maybe I could use a low-level VI to do it (something like what I've attached?)
 
Cheers.
 
Download All
0 Kudos
Message 3 of 3
(2,380 Views)