LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with DAQ in while loop

Hello everyone,

I am using labview's DAQ to acquire signal from a thermistor. My experiment is going to run for 7 hours. I am using a sampling rate of 1 Hz and keep getting errors from the write measurement file express VI because the timeout setting is too low. Is there any way to change the default timeout for the express vi or get around that?

Any help is appreciated I am fairly new to labview

 

Nohely

0 Kudos
Message 1 of 6
(1,284 Views)

Hi nohelyriv,

 

so you took a screenshot - with your 12MP camera? And you forgot to rename the file with a useful suffix?

All you show is a JPG image with some expressVIs…

 

Please attach your VI - images are hard to debug using LabVIEW!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 6
(1,275 Views)

Sorry I forgot to attach it.

 

Here is the vi document

 

0 Kudos
Message 3 of 6
(1,271 Views)

In an express VI, to change the timeout setting, go to the Advanced Timing page.

 

It is set for 10 seconds, but your express VI would take 100 seconds to run because you are collecting 100 samples at 1 Hz.

 

You've got multiple other problems.

 

1.  Because it takes 100 seconds to execute the express VI, (only 10 seconds now because it times out), it would take a very long time for your VI to react to someone pressing the stop button.  Possibly up to 200 seconds.

2.  Your Collector express VI is pointless.  The waveform chart is a "collector" in itself because it maintains a history of past data.  So maintaining a history of data, then passing that history to a waveform chart means you are duplicating, repeating, and just expanding the amoutn of data you are getting.

3.  Your Write to TDMS express VI belongs in the while loop.  Right now it only executes once you stop your VI, so nothing is being written while you run for 7 hours  (risk for a lot of data loss), and then when it writes, it will only write out the amount of data that might have been captured by the collector VI.

 

Learn to use real DAQmx functions.  Collect smaller amounts of data at once, not 100 seconds worth.  1 second acquisition rates are pretty slow in timing, so you might not need this.  But it is a good idea to separate data acquisition from data logging by using queues within a producer/consumer architecture.

Message 4 of 6
(1,241 Views)

This is probably a stupid question but where would I find the Advanced Timing page?

 

Thank you

0 Kudos
Message 5 of 6
(1,232 Views)

Third tab up top on the express vi properties page.

 

Configuration

Triggering

Advanced Timing

Logging

0 Kudos
Message 6 of 6
(1,224 Views)