LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication with Labview 7 and multiple COM ports

I am getting this problem: When connecting a device to port COM1 (built in) and using Instrument I/O express VI, I am able to communicate with the device.
However when I connect the same device to COM3 or COM4 (on an additional card), I am not able to communicate.

The card has been added because I need 3 COM ports, but I have tried with two different cards and still get the same result. The port are detected by Windows (it says they should work properly) and Labview (ports COM3 and COM4 are available in the list). Settings for all the ports are the same.

Could someone explain me how I can fix this problem?
Thanks
0 Kudos
Message 1 of 6
(5,147 Views)
Are you only having trouble communicating with the instrument over COM 3/4 inside of the Instrument I/O Assistant? Or is it a problem from other utilities, too? One way to check is trying to communicate with the device through VISAIC (Open Instrument Session on the COM port from MAX). This will help determine if there is a VISA problem or a problem specific to the Instrument I/O Assistant.

-Tommy Connell
National Instruments
0 Kudos
Message 2 of 6
(5,146 Views)
Yes I also tried in MAX and get the same problem: what works on COM1 doesn't work on COM3 or 4, but MAX indicates that all those ports should be working fine.
0 Kudos
Message 3 of 6
(5,146 Views)
I just wrote an application that uses 8 com ports with a RocketPort board and had no issues. It may be that the default settings of your add-in board are different than com1. Have you done a VISA Configure Serial Port on each port? Have you used Hyperterminal to talk to the instrument through each port?
0 Kudos
Message 4 of 6
(5,146 Views)
Hi YannKOP,

There are a couple of things we can try in troubleshooting your serial issue:

1. Use HyperTerminal to perform a serial loopback test. This page will walk you

through this process step-by-step:


href="http://zone.ni.com/devzone/conceptd.nsf/webmain/D48BA43C59B60277862569EE000501FD?opend

ocument&...

Note: Make sure you have the configuration (i.e. baud rate, stop bits, etc) set correctly!
If this step is successful, HyperTerminal will display the characters that are being written to the COM port.

2. Use the Labview <-> Serial.vi example program. To find this program, open Labview, select Help -> Find Examples... Search (a tab) -> type Serial. Open up the block diagram
(select Window -> Show Block Diagram) and make sure that the input into the VISA Configure Serial Port.vi is correct. This VI assumes several default settings, so a good idea is to verify that these are correct given your actual port configuration.

3. Another good idea is to download PortMon, a port monitoring utility from http://www.sysinternals.com. Have this utility running in the background while you are trying to communicate with your COM ports. Compare the data log from PortMon for the COM port that works and the COM port that does not work. Hopefully this will provide more useful information as to exactly where the serial communication is having trouble.

Good luck!

Kileen Cheng
Applications Engineer
National Instruments
0 Kudos
Message 5 of 6
(5,145 Views)
COM Ports have had problems in pc's ever since IBM's Peanut. Correct
use depends on RS232 parallel communications as well as serial
communications. UARTS, the IC's that provide serial connectivity, can
lock up in ways that require power-on resets. Very few serial devices
use the RS232 handshaking timing correctly. Your ports can be
configured to cause IRQ and address conflicts. If you use USB devices
or a modem, a conflicting IRQ may not be directly associated with the
serial port. You can have two devices attempting to use the same
IRQ--an idea that only works well in theory not generally in practice.
Your ports and cards must be configured consistently in BIOS as well
as Windows to operate correctly. In addition, some serial cards have
straps or s
oftware configurable settings that must be addressed. Hope
that this gives you a few places to look.
0 Kudos
Message 6 of 6
(5,145 Views)