LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daqmx digital timing

Solved!
Go to solution

In the application I need to acquire one sample from 16 channels every 5 secs.

Currently the application works when it uses

1. Daqmx Start

2. Daqmx Read (Analog 1DBL N Channel)

3. Daqmx Clear and then stop

There is a timer loop that waits for 5 sec before acquiring the next set of samples from conigured array. I am trying to replace this timer loop by using Daqmx timing vi

 

My question is if DAQmx timing vi is used are the setting correct in the attach screen shot to acquire one sample every 5 secs from 16 channels?  

 

 

 

0 Kudos
Message 1 of 4
(2,580 Views)

As a general rule of thumb, you want your "samples to read" which in continuous acquisition sets your buffer size, to be one tenth of your sample rate. Since you are reading at such a slow rate, you could theoretically set this to a relatively small number as opposed to 1000. In addition, you could entirely do away with the timing VI and just do software timed acquisition. You can do this by simply using a timed while loop with the wait(ms) function with the correct constant wired into it, in your case, 5000. Hope this helps!

 

Regards,

 

 

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 2 of 4
(2,527 Views)

Thanks Daniel,

 

As you wrote

*******************

You can do this by simply using a timed while loop with the wait(ms) function with the correct constant wired into it, in your case, 5000

********************

Will the acquisition mode set in MAX for each channel be set to 1 Sample (On Demand) or any other Acquisition mode? Although the acquisition is at a slow speed it does have to run for over thousands of hours (approx 20,000 hrs max). If I understand your response then adding the hardware buffer (using DAQ timing) would not add any substantial benefit as the acquisition speed is slow even though the duration of acquisition is long.

 

TIA.

0 Kudos
Message 3 of 4
(2,516 Views)
Solution
Accepted by topic author sonotk

Yes, on MAX, it is the equivalent of doing 1 sample on demand and running continuously. And yes, using the hardware buffer (DAQmx timing VI) would not give you any added benefit from this. This would be best used if you are doing very fast acquisition. However, for acquisition of once every 5 seconds, the determinism of your operating system should not be considerably detrimental to your timing.

 

Regards,

 

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 4 of 4
(2,504 Views)