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: 

Display and Save DAQ raw data simultaneously

Solved!
Go to solution

Hi,

I am new to LabView. I am trying to make a VI that continuously shows in an indicator or a gauge the value from an analog port from a DAQ, while upon user request, saving certain values of that signal on an array.
I can do each one of the things separately:
-real time displaying in an indicator or a gauge of the raw DAQ analog signal
-saving certain points of raw DAQ analog signal 
but when I try to do both i am unsure of where to put the DAQ assistant so that it samples when it needs to.
The attached VI is not working properly but you can see the 2 things I would like to have working in parallel.

Any help is greatly appreciated.

Thank you very much in advance.

0 Kudos
Message 1 of 5
(5,106 Views)
Solution
Accepted by Gabriel_Torre

Hello Gabriel_Torre

you can use Queues this is a simple way to split the acquisition part from the analyse or display part. This is the same like done in the producer consumer examples from LabVIEW.

I also recommend to set the Samples/Rate to factor 1/10 so the loop runs with 100ms not only every second. Now with this architecture all loops run with 100ms iteration time.

 

Idea.png

 

Hope it helps.

best regards
Alexander
Message 2 of 5
(5,092 Views)

Thanks a lot!, that was exactly what I was looking for, now i am looking at the producer consumer examples as you suggested to learn more about queues.
What I am no sure now is how to set the Samples/Rate, you mean using a wait block or filing the queue and working with the enqueue timeout?
Regards

0 Kudos
Message 3 of 5
(5,053 Views)

Hello Gabriel_Torre,

 

you can set this inside the DAQ assistent.

 

Unbenannt.PNG

 

Now if a packet of samples arrive and is written into the queuethen the other loops are event driven and read the values from the queue.

 

 

best regards
Alexander
0 Kudos
Message 4 of 5
(5,047 Views)

I will try that, thanks a lot.

0 Kudos
Message 5 of 5
(5,027 Views)