LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 port problems on WIndows XP Labtop using sample program "serial.cws"

Hi:

I wrote a program for RS232 communcication with anohter pieces of equipemnt using Labwindows CVI 7.0. It works fine when I test it on a Windows 2000 and a Windows XP desktop. However when I test the same program on a labtop, it seems that the RS232 can not received any data from my equipment, and the equipment doesn't response to my command at all.

I compare every comport setting of my labtop and my desktop (setting for COM1) and I couldn't find any differents between the two.

I power off my laptop ensure proper cable connection and I restart the laptop again, I use the sample program provide by Labwidnows CVI "serial.cws" and it still not working (The sample program works fine in the desktop enivronment.)

Can anyone tell me how I can overcome this problem?

Thank You

Best Regards
Vicky Lai
0 Kudos
Message 1 of 4
(4,704 Views)
Hi Vicky,

It looks like you have done a lot of good troubleshooting so far! It is very interesting that this program works on two desktops, but not on the laptop. When it doesn't work, what is happening? Is there an error that occurs? Also, have you tried communicating with your device through Measurement and Automation Explorer (MAX)? It may be a hardware problem rather than a problem with your program. Testing in MAX will help us narrow down where the problem is.

Let us know how we can help further!

john
Applications Engineer
0 Kudos
Message 2 of 4
(4,686 Views)
1. Check the Control Panel and the CMOS BIOS setup to make sure that the COM port is not disabled.
2. Use Hyperterm to try to communicate with your equipment.
3. Use Hyperterm to test loopback on COM1:
Create a new session in hyperterm.
Set the Flow Control to None.
Go to File >> Properties >> Settings >> ASCII Setup and verify that Echo Type Characters Locally is NOT checked.
On the COM port connector, connect pin 2 to pin 3. If you have a female to female cable, you can use a paper-clip to connect the two pins. This creates a loopback to connect the transmit pin to the receive pin.
Type some characters in the hyperterm window. If you see them show up on the screen, the COM port is active.
0 Kudos
Message 3 of 4
(4,681 Views)
Hi All:

Further regarding to the RS232 port problems on Windows XP labtop, I have find out the problem and corrected the bugs, however I don't understand how this problem general and would appreicate if any one can give me some hint on that.

The problems is when my program is run on a labtop, the baudrate is set to 110 and the databits is set to 5 when the "OpenComConfig" statement is being execute. What I do is I have to manuall set baudrate = 9600 and databits = 8 right before I call the "OpenComConfig" statement and then it works on the labtop. When I execute the program in a desktop without reset the baudrate and databits (both are initially set during the "GetComConfig" routine.

I check the comport setting under Control Panel for both desktop and labtop and they are identical, so I wonder what makes the labtop seeing the baudrate and databits differently?


Thank You and looking forward to your prompt reply.

Vicky
0 Kudos
Message 4 of 4
(4,632 Views)