LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 Analog Input don't work together

Highlighted

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
(1,384 Views)
Highlighted

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

This is the vi of one IR sensor.

0 Kudos
Message 3 of 14
(1,363 Views)
Highlighted

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
(1,355 Views)
Highlighted

How i can do this?

0 Kudos
Message 5 of 14
(1,348 Views)
Highlighted

@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
LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 6 of 14
(1,337 Views)
Highlighted

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
(1,334 Views)
Highlighted

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


aputman
LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 8 of 14
(1,332 Views)
Highlighted

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
(1,327 Views)
Highlighted

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
(1,318 Views)