LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb hub serial problems

Hi LV,

I was able to disconnect and reconnect some NI USB-rs232 and rs485 dongles and have them maintain port assignments in XP and in 7 (sorry Vista is harder to come by!). This also worked using an external USB hub.  Do your EasySync converters glitch when connected directly to the motherboard?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 21 of 31
(1,778 Views)
I don't know. I'm sure that in the last three + months that I must have had them plugged in to the motherboard, I just don't recall. The original symptom was the USB-DAQ "glitching" as indicated by MAX launching multiple instances, but that seems to have been resolved by connecting it to the MB rather than the hub. I'm beginning to think that it may be a flakey EasySync box, as there are two attached, but only one has gotten much use, the other instrument not on very often at this stage. Another thought that comes to mind as I type this is the behavior of the "unused" adapter. I wonder how it behaves with the instrument turned off, but connected, and with it disconnected, the cable (about 5 m) just laying there, unterminated. Nothing is being sent out the port when the glitches have occured but ... I would hope that 485 is a little more noise resistant than that, also don't know what might cause the usb connection to glitch, if that is what is happening,would more expect to see weird chars at the serial port than anything else.
Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 22 of 31
(1,766 Views)

I’m not sure that an attached cable would cause any problems, glitches, extra chars or otherwise. I do know though that for NI serial USB devices the COM assignment is dependent on the serial number of the device and that information is stored in your registry. If you suspect the EasySynce box to be at fault then upgrading to a NI USB serial device seems like a reasonable step. Additionally, if it is more OS or USB hub dependent then with NI USB serial devices you would at least be able to obtain your same COM numbers without having to implement a lot more code.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 23 of 31
(1,739 Views)

Thanks for looking into this. Could you clarify your statement " Additionally, if it is more OS or USB hub dependent then with NI USB serial devices you would at least be able to obtain your same COM numbers without having to implement a lot more code. " Are you saying that my VISA aliases in MAX will remain? Thanks,

 

Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 24 of 31
(1,708 Views)

Sorry if I was unclear. What I meant was that if the problems you are seeing with communication dropping to your USB com ports is due to the USB-COM adapters themselves then using NI hardware might resolve your situation completely. If, however, the com ports dropping is due to something other than the USB-COM port adapters (ie, OS, USB hubs, wiring) then when connection is reestablished the NI USB-serial converters will maintain their com assignments.

Your VISA aliases in MAX will remain as well because those are stored in the MAX database which is not affected by the USB’s behavior.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 25 of 31
(1,684 Views)
Does this mean that MAX will be able to "rediscover" the same ports, allowing me to use the existing aliases? Do the VISA references "drop out" if there is a glitch (presuming that the glitches are due to the port(s) and not the hub)? or would I still have to close, reinit port, open, to use them? Would it just mean I would still be able to "ID" the port, or would I be able to continue using as though it hadn't "glitched"?
Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 26 of 31
(1,682 Views)

Oops, apparently I was typing the question as you were answering it.  Do you know whether this "dropping and reestablishing connections" will drop the VISA reference, requiring me to do some error handling and closing reference, reopening? I' guessing yes, that the ref num will become invalid. At the moment I can't even do that because the ports come up with different com assignments, and I don't know which is which (they probably come up consistently the same, could shotgun it and say if com 5 OR com14 (or whatever), blah, blah, but I don't know for certain what the new port assignment might be, and in fact am "assuming" that they are consistent, and that they are in the same order, but that isn't a given. While it would be inconvenient if the glitching remained, due to the hub or whatever, but MAX could say that is "L300" (one of my aliases) is connected, then I could at least close the old reference and reinit, etc. Currently MAX doesn't maintain the alias to physical port assignment through the glitch because it just knows which alias refers to which "com port assignment".

 

Thanks,

Message Edited by LV_Pro on 01-04-2010 12:35 PM
Message Edited by LV_Pro on 01-04-2010 12:37 PM
Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 27 of 31
(1,667 Views)

I'm going to chip in regardless of the danger of being way wrong....

 

Windows reacts differently to USB devices which have a serial number and those which do not.  A serial number should ideally be a unique identifier for a USB device and allows Windows (or any OS for that matter) to recognise a device as being a SPECIFIC device rather than being another device of the same model.

 

A side-effect of this is allowing me to install two different drivers for the same (non-serialnumbered) device onb two different USB ports (different controllers) on my PC.  Windows then treats them as totally different devices.  If I want to test a USB device woth a supplier DLL, I stick it into port 1, if I want to use VISA instead then I can use port 2.

 

This might have something to do with windows receiving an errant "connect" signal without first disconnecting the already-connected device.  If the device has no serial number, then Windows has no basis to believe it isn't simply another device of the same model number.  If the device HAS a serial number it might just be smart enough to realise the problem and simply replace the old device with the new one.  Whether this gets rid of the break in communications i do not know.

 

Just thought it might be useful information somehow.

 

Shane.

0 Kudos
Message 28 of 31
(1,642 Views)

Good Morning All,

    Well, we looked into puting a PCI card into the machine and avoiding the whole USB issue, but it turns out that the PCI slot on the MB is blocked by the power supply, and the only PCIe solution NI has is an 8 port unit for a bunch of $. So my question is, in addition to the previous one about whether MAX/Windows will see my usb ports if they "glitch" for whatever reason, will I have to do any fancy recovery on my end, like trap the error, close the old VISA ref, reinit, etc., and has anyone experience with NI's 778476-02 USB-485/2 port adapter? I've got to make a decision and either order it or have the customer order it, and soon, both for "political" reasons (the customer is warming up hot tar and gathering feathers) and because NI shows only 8 in stock (in Hungary) so if not ordered soon the lead time might be very long.

 

 

So anyone with experience with this interface, or more knowledge about the other question(s) please wade in, so I can click on the "solution" button!

 

Thanks!

  

Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 29 of 31
(1,614 Views)

Hi LV,

Your MAX Aliases will remain, and yes you will need to close and reinitialized your port. Sounds like you have an idea already on how to accomplish this.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 30 of 31
(1,602 Views)