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: 

I wish to read a channel from a DAQ card. I want to do it periodically, but do not want it continuous nor have to configure it every time I want a reading from that channel. How can I do this?

Configuration on every read is too time consuming, but a continuous read is to resource intensive, I simply want to read voltage off of a pin once in a while.
0 Kudos
Message 1 of 2
(2,123 Views)
Jason;

You have two main options to accomplish that task.
If the frequency of reading is not high, you can do the Read One Point, in a while loop, and store those values in an array of points. That is not a buffered acquisition, so you don't need to configure the task at each time.
If the frequency of the reading is high, you will need to have some buffering configured, but you can do an asynchronous DAQ operation. By doing that, the CPU time is free to run other tasks, and will be assigned to the DAQ task only when the buffer needs to be flushed into the RAM. You didn't mention what programming language you are using, but you can find some examples of asynchronous DAQ at the NI-DAQ\examples folder and at the Labview\Search Examples option.
Hope this helps.
Fil
ipe
0 Kudos
Message 2 of 2
(2,123 Views)