LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Log data only while digital input is true.

Hi,

 

A stuipidly simple question I know, but I'm trying to log data to a TDMS file, only while a digital input(switch) is true). I think I need a DAQ loop and a Logging loop, but I'm unsure how to correctly set up the logging loop. Is it case of just putting the logging loop inside a case structure?

 

Thanks,

Kevin

0 Kudos
Message 1 of 2
(2,081 Views)

I would recommend having a DAQ loop and a Logging loop.  To do this properly, you should look into the Producer/Consumer architecture.  In short, you use a queue to send the DAQ data to the logging loop.

 

Now for you extra requirement.  Use a case structure so that the daq data only gets enqueued when your line is true.


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 2
(2,076 Views)