LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial port not working anymore...problems with Windows XP?

I wrote a program that communicates through a serial port and it worked fine on my computer at my desk (which runs Windows 2000) and the executable of that program worked fine on other computers also running Windows 2000.

However, when I loaded the executable onto a laptop PC with Windows XP, the program runs but it won't communicate. Anyone else seen this problem before?
********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 1 of 44
(45,485 Views)
Here's some more info...on my development PC and on the PC's where the serial port does communicate, I have serial cards that connect to mutliple serial outputs. So in that program, the VISA resource names are set up as "ASRL1::INSTR", "ASRL2::INSTR" and so on.

On the laptops running Windows XP, they have a standard card with only one com port. So I set up that version of the program to use COM1 as the VISA resource name. I also made sure that the baud rates, stop bits, etc. all matched up. That didn't seem to help.

Any ideas?
********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 2 of 44
(45,467 Views)
Hi,
Have you done the loopback test which is decribed in "Serial Communication Starting Point"?
0 Kudos
Message 3 of 44
(45,450 Views)
The first Q I ask when a laptop doesn't talk serail but the tower did is,

Do you have a good ground?

Towers find a ground through the chassis.

Laptops float rlative to ground.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 44
(45,449 Views)
I suggest checking that the laptop does not have any other program running that may take over the serial port. Common suspects are PDA synchronization software or GPS software.

Allen Weekley
allen@weekleyconsulting.com
0 Kudos
Message 5 of 44
(45,433 Views)
I'm not real familiar with XP, and neither am I very familiar with the software that usually runs in the background. What kind of programs should I look for when I pull up the Windows Task Manager that might take over the serial port?
********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 6 of 44
(45,413 Views)
Use hyperterminal to communicate with something through the port. If you can, the port is free and the problem is apparently on the LV side. Try putting the Serialdevices... line into your exe's INI file.

___________________
Try to take over the world!
0 Kudos
Message 7 of 44
(45,401 Views)
The com port was tested with a Windows com port testing program and the port does work.

You'll have to explain your last statement about the Serialdevices line.
********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 8 of 44
(45,395 Views)
Well, I've found that getting an executable with serial comm in it to work might turn out to be a mini Via Dolorosa but try the following:
1. First, create an installer and make sure you include serial support in it.
2. Next, install MAX on the target machine. I'm not sure if this is necessary, but it helps.
3. Put the following line in your INI file, just to be sure:
serialDevices="COM1; COM2; COM3; COM4; LPT1;"
4. Hope.

___________________
Try to take over the world!
0 Kudos
Message 9 of 44
(31,956 Views)
Hi Spaceman:

Are you able to communicate with your instrument by opening a VISA session in Measurement and Automation Explorer? Please test this out first.

Thank you,

Emilie S.
Applications Engineer
National Instruments
0 Kudos
Message 10 of 44
(45,383 Views)