I am using a Mac Mini to control a bunch of lab hardware using LabView with, among other things, seven USB-to-serial adapters (PL2303-DB9) plugged into a 7-port USB hub (USB2-HUB-AG7).
Perhaps surprisingly, this arrangement functions fine, but I find myself deeply confused by how the assignment of serial port IDs works on the Mac. There are two levels of name assignment here – first, each serial adapter gets a port name in /dev, e.g., /dev/cu.usbserial1, usbserial2, or whatever. Second, NI-VISA (the comms driver software that underlies Labview) assigns an internal resource name to each of these /dev entries.
Unfortunately, neither of these naming schemes functions reproducibly, i.e. if I restart the machine and/or disconnect/reconnect USB connections, the various physical ports wind up with different port identifiers, and the various port identifiers get mapped to different VISA resource names. I can’t figure out what the underlying strategy is. Obviously, this is annoying, although not crippling, because every time I restart, I need to identify which port identifier is connected to which piece of hardware again.
It would be nice if I could figure out in advance which physical connection will have which software address. Can anyone enlighten me as to the underlying logic here? Presumably it involves both the driver software and how the USB hub is constructed.