LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant only saves every 2 seconds

Hello, 

I am very new to LabVIEW and everything related. UrgetnPlease Help.

I need to read and save loadcell values continuously until the code is stopped. I have written a code that reads the loadcell and plots it in a voltage vs time graph. My code only reads them for 0 to 1.98s and goes back to 0 (check the excel screenshot). I want the sheet to have values from 0s to x second (x being the time at which the code is stopped). For example, if the code runs for 2minutes, I want the excel sheet to have time values from 0 to 2 minutes. I am not sure how long it will be running because this code is written for a tensile testing machine I should be reading the values until the stop button is pressed.

Please refer to the excel data and vi code below.

thank you. 

 

Download All
0 Kudos
Message 1 of 6
(2,072 Views)

Why are you appending the newly captured waveform with an empty waveform with a dt of .3?

 

Why are you using Express VI's?  I recommend using regular DAQmx functions and regular Write to Text File functions.

0 Kudos
Message 2 of 6
(2,059 Views)

This is the code I meant to share. Sorry about that, it runs every 0.09s. 

I am using the VI express because after googling that's what people were using. 

 

Download All
0 Kudos
Message 3 of 6
(2,047 Views)

Actually, if you googled more, you'd see the recommendations are to NOT use Express VI's.

 

But your Express VI is set up to rename the existing file if it already exists.  You should pick Append to File.

 

But as I said before, get rid of the Express VI's and use real LabVIEW functions.

0 Kudos
Message 4 of 6
(2,019 Views)

Got it, I will do more research on how to use the DAQmx and see how it goes. Thank you

0 Kudos
Message 5 of 6
(1,945 Views)
0 Kudos
Message 6 of 6
(1,933 Views)