LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Second RS232 port on the PC won't work.

I have a small program that talks to a device through the first serial RS232 port (using "Serial Port Read.vi" for example). This works fine using port number 0 in my program. I need my PC to to talk to two devices, so, to convince myself this would be no problem, I moved the plug to the second RS232 port socket on the back of my PC and changed the software to talk to port number 1. The program can't receive through this port. I've swapped back to the first serial port and all is OK again - so I didn't damage the cable during the transfer. The problem only shows up on the second port. Am I doing somethig silly? Any ideas that would help solve this problem would be appreciated.

I'm running Windows NT and Labview version 5.1 (!)


Richard.
0 Kudos
Message 1 of 16
(3,616 Views)
Can you use COM2 with another application, e.g. Hyperterm?
If not, have you checked your BIOS CMOS setups to make sure the port is enabled?
Are you sure that somewhere in your program you haven't hard-coded using COM1 or defaulted to it with an unwired input (when you initialize it or read from it, etc.)?
0 Kudos
Message 2 of 16
(3,616 Views)
Check that it is enabled in the BIOS. Most have an option to turn off the serial ports.

"Al S" wrote in message news:506500000005000000D3D50000-1042324653000@exchange.ni.com...
> Can you use COM2 with another application, e.g. Hyperterm?
> If not, have you checked your BIOS CMOS setups to make sure the port
> is enabled?
> Are you sure that somewhere in your program you haven't hard-coded
> using COM1 or defaulted to it with an unwired input (when you
> initialize it or read from it, etc.)?
0 Kudos
Message 3 of 16
(3,616 Views)
Thanks for your suggestions and I'm sorry not have replied sooner � I got dragged away. I am sure all my VIs attempt to access the desired serial port (COM1 or COM2, using port number 0 or 1 respectively). I have tried Hyperterminal (not very familiar with this) and get some response from COM1 but not COM2. I have checked the BIOS too which indicates the following:

Serial port 1 Address - Auto
Serial port 2 Address - Auto
Serial port 2 IR mode - Enabled [I've tried Disabled here too, with no effect]

Serial port 1 status COM1 3F8 IRQ4
Serial port 2 status COM2 2F8 IRQ3

This all looks OK to me but I still can't access COM2. I would be grateful for any more ideas...

Regards Richard.
0 Kudos
Message 4 of 16
(3,616 Views)
Have you used the Control Panel to check on the ports? The Device Manager should show you if you have any resource conflicts with another device.
Can you try your LabView application or your Hyperterm files on another PC?
0 Kudos
Message 5 of 16
(3,616 Views)
I know it sounds silly, but have you checked the serial port is wired to the motherboard inside the computer? Quite often i find cables unplugged or missing inside PCs where i work.

Otherwise you should try checking the device manager (Right click on My computer>Properties>Hardware>Device manager>Ports>You should see 2 comm ports).

I hope this helps you.

Kim
0 Kudos
Message 6 of 16
(3,616 Views)
Hello Richard,

Did you solve this problem? It sounds like your second device requires a different serial cable. So if you are using a straight-thru serial cable on the first device you might need a null-modem cable for the second and vice-versa.

Remington.
0 Kudos
Message 7 of 16
(3,616 Views)
Still no joy in using the second RS232 port on my PC. Action on my part appears slow because I need to use the PC (first RS232 port) to acquire data for long periods which limits my ability to debug the problem (and I have other work to do!)...

I have written and attached a small VI to illustrate the problem (I think this eliminates possible coding errors in my bigger program). This VI initialises both ports and then sends characters to each port until I press a stop button. Looking at the COM1 9-pin socket on the back of the PC with an oscilloscope, I can see data on pin 3 as expected. There is no activity on any pin on the COM2 9-pin socket. I note that the VI reports no errors (error numbers zero) during initialisation or during the output loop.

I've had a look inside the PC. The ports are built into the PC motherboard and there appear to be no link settings on the board. There is no clear identification on the board either. This is a 1997 Viglen machine - a Pentium Pro. Yes, rather old but adequate for simple/slow data acquisition.

I've checked the BIOS as I said in a previous post, and repeated the results here for convenience:

Serial port 1 Address - Auto
Serial port 2 Address - Auto
Serial port 2 IR mode - Enabled [I've tried Disabled here too, with no effect]

Serial port 1 status COM1 3F8 IRQ4
Serial port 2 status COM2 2F8 IRQ3

Unfortunately it is not easy for me to try this on another PC - I'll have to search for one with LabVIEW installed and a 'scope handy...


To respond to comments specifically:

Remington - I would be surprised if the two ports were wired differently in the PC but I have never needed to use COM2 before and am prepared to live-and-learn. Having checked all pins on the second port while running my program, I doubt that this can be my only problem.

Kim - As I've implied above, there appears to be no way to disable the port by unplugging cables and the device manager reports OK to me. When I try to get to "Right click on My computer>Properties>Hardware>Device manager>Ports", I get as near as possible by "Right click on My computer>Properties>HardwareProfiles>" then all options are greyed except in the "Available Hardware Profiles:" box it says "Original Configuration (Current)" which I cannot change. (I'm not an administrator on this machine). I can also "Left-click-Start>Settings>ControlPanel>Devices>Serial" which is reported as "Started" and "Automatic". HWProfiles button then gives "Device: Serial", "Status: Enabled", "Profile: Original Configuration"

ALS - "Left-click-Start>Settings>ControlPanel>Ports" gives "COM1:" settings as 9600 baud, 8 data bits no parity, 1 stop bit and no flow control. Settings for "COM2:" are identical.


Thanks for you comments so far - Any more thoughts or questions anyone?

Richard.
0 Kudos
Message 8 of 16
(3,467 Views)
Remington, Please see my response below, Richard.
0 Kudos
Message 9 of 16
(3,467 Views)
Kim, Please see my response below, Richard.
0 Kudos
Message 10 of 16
(3,616 Views)