12-30-2009 01:42 PM
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?
12-30-2009 03:21 PM
12-31-2009 10:47 AM
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.
01-03-2010 10:49 AM
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,
01-04-2010 10:45 AM
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.
01-04-2010 10:47 AM
01-04-2010 11:29 AM - edited 01-04-2010 11:37 AM
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,
01-04-2010 03:18 PM
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.
01-05-2010 10:00 AM
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!
01-05-2010 10:50 AM
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.