LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple COM devices freeze LV

I'm pretty sure this is not a Labview issue, but in case someone else has had a similar problem.

 

I am trying to run 8 Serial devices (linear traverses) using VISA calls in LV 7.1.  Each device has a USB to RS422 converter that gives an individual COM port for each device.  Because I did not have enough USB ports, the 8 USB connections run though two 4-slot USB hubs. 

 

I tested the connection to a single device using hyperterminal and labview and it communicates fine.  When I plugged in additional devices, the ports were registered by Windows (show up in the Device Manager and say they are working properly), I adjusted the BAUD rate to match the device specs.  I can communicate with the devices for 1-2 times, then the program hangs.  I attempted to do this same actions with hyperterminal and encountered the same problem.  The biggest problem seems to be when closing the connection to one port and opening another port.  Even when I disconnect from one port before connecting to the next.  Rebooting LV doesn't fix the hang (it just hangs again when I restart) and hyperterminal won't even close.  The only way to restart communication was to reboot the computer and the same problem recurrs upon restart (can communicate 1-2 times, then crash).  MAX has problems with hanging up while searching for available ports.

 

If you hyperterminal locks up, moving to using the LV program hangs up just opening the file. 

 

Running LV 7.1, Windows XP SP2, connecting to an IMS stepper motor.

 

Does anyone know what the problem might be or how to fix it?  Is there a limit to how many COM ports a computer can manage?

0 Kudos
Message 1 of 7
(3,235 Views)

Hi,

 

Just came across you post....not familiar with this issue, but I will see if I can find anything out for you.

Regards,
Claire Reid
National Instruments
0 Kudos
Message 2 of 7
(3,211 Views)

Is there any chance this hang occurs when creating a VISA resource name constant or control?

 Let me know

Regards,
Claire Reid
National Instruments
0 Kudos
Message 3 of 7
(3,209 Views)

Just an idea.

 

Are the usb hubs powered hubs?

 

USB adapters usually draw some power from the USB interface to power their internal circuitry.  I'm wondering if you start putting on too many on your usb bus that they are drawing too much power and there isn't enough power for them to function properly.

0 Kudos
Message 4 of 7
(3,203 Views)

To add-on to the USB hub comment...

Under normal circumstances USB devices should not stop responding during acquisition. However this issue can occur when plugging or unplugging USB devices while the computer is powered on.

The southbridge or I/O controller hub (ICH) is responsible for USB communication for your PC. Making or breaking another USB connection while your data acquisition device is connected may cause one of the above communication errors. This has been observed on chipsets with ICH versions 2, 4 and 6, but may affect others as well.

To determine the chipset in your PC, you can find it listed in the Windows Device Manager or in your motherboard's BIOS. If you know you have an Intel processor, Intel also provides a Chipset Identification Utility that you can download to identify what chipset your motherboard has.

If your application requires plugging/unplugging of USB devices and your PC has one of these ICH versions, a quality powered hub connected to USB 2.0 may help. Alternatively, consider using a PC with a different chipset.

If you are using a laptop computer, check your power settings to make sure that the USB ports are not being turned off to conserve power.

Regards,
Claire Reid
National Instruments
0 Kudos
Message 5 of 7
(3,199 Views)

Thanks for your ideas!

 

The USB hubs are independently powered (they have their own power supplies separate from the computer) so I would think that the power draw from the computer would be minimal. 

 

It is quite likely that LV does hang when loading the VISA resource name constants.  This correlates to when MAX locks up as well (MAX will load fine, but locks up when I try to expans the Ports section of the device tree).  My program uses several resource name controls to allow the user to choice which COM port correslates to which traverse.

 

My program doesn't require the physical unplugging of different ports.  Basically, I open the COM port that correslates to the correct traverse, send commands, close the port and then repeat the procress with the next COM port.  Could the frequent opening and closing of different ports be causing a problem?

0 Kudos
Message 6 of 7
(3,182 Views)
Opening and closing the com ports should not cause the problem your seeing. But there is no good reason to open and close each port repeatedly.  Open all 8 ports at the beginning of our program, read and write to each as necessary in the looping part of your program.  Close all 8 ports when you are done.  It would at least allow your code to execute a little more quickly and also reduces the chance of lost bytes that might arrive while a port is closed.
0 Kudos
Message 7 of 7
(3,170 Views)