Showing results for 
Search instead for 
Did you mean: 

2 Analog Input don't work together

I am doing a project using usb 6221 and DAQmx.
Using 2 IR Sensors to measure the distance
Everyone of them work good individual but together i get an 50301 error
The problem is I can't use two IR's Together and get the measures from them
How can i solve this problem to get the values from 2 sensors.

0 Kudos
Message 1 of 14

You should be able to use two at a time. Do you have any LabVIEW code that we can look at to see what you are doing? Also a sketch of how the sensors are connected to the 6221 will also be very helpful.

Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5

LabVIEW Champion

0 Kudos
Message 2 of 14

This is the vi of one IR sensor.

0 Kudos
Message 3 of 14

You can only have one AI Task running on that device at at time.  You can however, configure the Task to have both channels

Message 4 of 14

How i can do this?

0 Kudos
Message 5 of 14

@El-Awny wrote:

How i can do this?

Inside the DAQ Assistant, add another channel.  You will need to get rid of the other VI for the second sensor.

LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 6 of 14

I have done this already but i can't extract the data of 2 Sensors from the Daqmx.
Only One Sensor i can get its data.

0 Kudos
Message 7 of 14

Where is your code showing this attempt?  Do you have the wires hooked up correctly to the second sensor?

LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 8 of 14

This is the code
and yes the wiring is right
my problem when i put the 2 sensors in One Daqmx .. I get one read from 1 sensor .. i can't the other ( The indicator is a numeric data of 1 sensor not an array )

0 Kudos
Message 9 of 14


In the DAQ Assistant select Add to Add the other channel

0 Kudos
Message 10 of 14