From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,056 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,051 Views)