LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

naming multiple USB cards

We have several test boxes each containing a USB 6229 ( or similar) at present each box tests a different product and uses its own set of vi's. We name each of the cards in MAX and the vi's call the i/o ports by this given name. All this works fine. Which ever box we plug in to the same USB port Max recognizes it and the tests run.

But now we are building additional duplicate boxes for new test stations. As long as the boxes stay on the test station they are known on all works. But we would like to be able to move test boxes to any free test station. 

The problem is duplicate names are not allowed, and if we give each box an unique name then the vi's can not find their i/o ports.

 

0 Kudos
Message 1 of 5
(2,346 Views)

MAX allows you to save your configuration to a file. There is a LabVIEW function to programatically import and export your MAX configuration.

 

Place your configuration files on a shared drive and load the appropriate one as needed.

 

See this KnowledgeBase entry: Import and Export a MAX Configuration Through LabVIEW


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 2 of 5
(2,337 Views)

Thanks for that I was not aware I could change the config on the fly.

I am still thinking about how to use this, my first thoughts are I would have to do this before I plugged in the new box, knowing which box I had.

Ideally I am looking of a totally automatic system, the operator does not need to do any more than plug a box and hit go.

But this is a solution.

David

 

0 Kudos
Message 3 of 5
(2,321 Views)

If all boxes use the same USB device, you might be able to use a couple of DIO pins as an ID.

Define a common name in all profiles that refers to the ID pins.

 

Have your code read the pins and use a lookup table to determine which file to load for a given type of box.

 

Alternately, you might be able to retrieve the SN of the USB device and use that to determine which config file to load. If you go with the SN, it might be better to place this in a text file than in your code. If you make more boxes, you can just update the text file.


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 4 of 5
(2,298 Views)

I think I must be missing the obvious here.

We had looked at using a Ain pin using a couple of resistors to give a unique voltage on each box type.

But to read a pin you need to access the USB device via its name.

Everytime I plug in a new USB card it is given a new unique name.

0 Kudos
Message 5 of 5
(2,228 Views)