LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

With Labview can I distinguish between USB ports?

Solved!
Go to solution

I’m designing an application in which I will have ten (10) stations for testing a device via CAN. My plan is to utilize one NI-8473 for each station. The PC will have ten (10) integral USB ports. The code used will be LabVIEW, and will be structured such that each the station is controlled by an independent while loop. There is no need for any interdependence between the stations, and the test takes about twenty (20) hours and will run independently. My question is that will LabVIEW be able to distinguish between the ten (10) USB ports. For example station 1 will utilize USB port 1/ NI-8473 #1; station 2 will utilize USB port 2/ NI-8473 #2; ………; station 10 will USB port 10/ NI-8473 #10.

 

Thank you,

Chuck M.

0 Kudos
Message 1 of 9
(3,175 Views)

Hi,

of course, your CAN device will be named : the 1rst will be CAN0, then CAN1..etc..

 

Just a question : why using ten NI-8473, while 1 can have 31 slaves without repeter ?

 

Best regards,
Vincent

V-F
Message 2 of 9
(3,163 Views)

I'm using 10 NI-8473s because the test's, which are complicated have to run independently, including being able to stop and start at different times, so rather than trying to develop difficult code to multiplex 10 stations to one 8473, ie turn the CAN off and on through a switch box I"m using 10.

 

For another project where I burned in 10 devices on ten stations I multiplexed the 10 stations with a 34970 Agilient mux and the code was difficult and occasionally I would get CAN communications errors.

 

I don't understand what you mean by 31 slaves without a repeater.

 

Thank you,

Chuck M.

0 Kudos
Message 3 of 9
(3,154 Views)

I will also mention a thread discussing Windows reassigning ports when the are plugged into a different usb port. In this case they weren't, it was the motherboard usb "glitching", just a heads up. Not sure how CAN devices are handled in this case, these were RS485 serial com ports.

Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 4 of 9
(3,148 Views)

Thank you - Does anyone have experience using multiple 8473 devices where each is attached to a different USB port, and they are being accessed by different independent loops?

0 Kudos
Message 5 of 9
(3,137 Views)

I use 2 NI USB-9472 devices to control valve solenoids.  After configuring the devices in MAX, they can be plugged into differently USB ports with apparent impunity.  MAX must recognize the device by a serial number or something.  But this a good question for the customer support folks.

0 Kudos
Message 6 of 9
(3,123 Views)
Solution
Accepted by topic author chuck72352

Because of the nature of Windows switching the resources for the USB ports, MAX associates the device by serial number.  I hope that helps.

National Instruments
Applications Engineer
Message 7 of 9
(3,054 Views)

I will add the caveat that ID'ing works when the device have recognizable serial numbers, in the case I was referring to the initial serial - USB adapters didn't, the NI ones did.

Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



Message 8 of 9
(3,051 Views)

I think you can change the CAN number in

MAX

 

Select

My System

  Devices and Interfaces

    NI-CAN Devices

      USB-8473

        CAN0

 

Right-Click CAN0

 

Select Properties

 

Port Properties Dialog will come up.

 

There is a field "Interface:"

You can scroll down in this widget and select

CAN0 to CAN63

 

I have two CANs connected.

CAN0

CAN1

 

There is an "*" next to CAN1

so I don't pick it when changing the "Interface" field for CAN0.

 

 

0 Kudos
Message 9 of 9
(2,635 Views)