LabVIEW

cancel
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
(3,431 Views)

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.

Putnam
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
(3,428 Views)

This is the vi of one IR sensor.

0 Kudos
Message 3 of 14
(3,410 Views)

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


"Should be" isn't "Is" -Jay
Message 4 of 14
(3,402 Views)

How i can do this?

0 Kudos
Message 5 of 14
(3,395 Views)

@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.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 14
(3,384 Views)

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
(3,381 Views)

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

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 8 of 14
(3,379 Views)

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
(3,374 Views)

Capture.PNG

In the DAQ Assistant select Add to Add the other channel


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 14
(3,365 Views)