LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading multiple channels from DAQmx

Solved!
Go to solution

Hi everyone,

I am quite new to Labview (2020) and need to update an existing .vi with a new sensor.

The existing .vi does read channel ai0 (load cell), whereas the new sensor is located at ai3 (displacement sensor). What I managed to do is to create a new .vi in which I can read both signals simultaneously (screenshot_working). This works just finde by switching the error in series. But once, I want to expand the already existing .vi block diagram I get the error "-50103" in detail "The specified resource is reserved. The operation could not be completed as specified" (screenshot_not_working). As far as I understand does the program not know, which channel it should read first..

 

Does anyone know how the block diagram has to be adapted to enable simultaneous reading of channels ai0 and ai3?

 

I am very grateful for any help.

Thank you so much!

 

Not working:

screenshot_not_working.PNG

 

Working:

screenshot_working.PNG

  

0 Kudos
Message 1 of 4
(203 Views)
Solution
Accepted by topic author LabviewUser207

Hi User207,

 


@LabviewUser207 wrote:

Does anyone know how the block diagram has to be adapted to enable simultaneous reading of channels ai0 and ai3?


Instead of using two DAQmx tasks to read analog in signals you should create just one (1) DAQmx task with two channels (ai0, ai3) and read both signals with one DAQmxRead function…

 

LabVIEW/DAQmx come with lots of example VI: learn from them!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(197 Views)

To supplement what GredW has shared:

Getting Started with NI-DAQmx

Easily Synchronize and Trigger NI-DAQmx with Channel Expansion

-------------------------------------------------------
Control Lead | Intelline Inc
Message 3 of 4
(155 Views)

Thank you so much, this worked. Appreciate your help!

 

Have a great day

0 Kudos
Message 4 of 4
(144 Views)