Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial port problems with Win XP 2

Status
Not open for further replies.

ZappaDog

Technical User
May 13, 2002
25
US
I am trying to transfer text files from laptop to industrial machine. We could do this fine with laptop running Win95, but not with new XP laptop. I am able to receive data from the machine, but can not send to it. We have the same problem with several different machines, so I think it is with XP. Computer is a toshiba laptop - celeron 1.0Ghz 256MB Win Xp Home. Am using a usb to serial cable, but receiving works Ok, so I think the cable works. Does XP handle serial ports differently than older windows versions? (I also made sure terminal settings were identical on both computers & tried a different terminal program with same result.)
 
I would assume you are using USB on the computer side and RS232 on the device side?

I would also suspect that the problem is not specific to XP, but rather the USB to RS232 converter.

To rule this out, short the transmit and receive on the RS232 connector (pins 2 & 3 of a DB9 or DB25). Open Hyperterminal, select a direct connection to the port in question. On the settings page, click the ASCII setup button and verify that the box for Echo characters locally is not checked. Click OK and type a bit. Should see what you type comming back at you on the screen if all is well.
 
I tried that and it worked fine. I don't think it's the cable because I have been able to receive data from the machine, just not send to it. Also a machine tech. that my boss talked to said that windows XP just will not work for sending to machines. I have a hard time believing that there is not some way to make it work, but I can't seem to figure it out.
 
"Also a machine tech. that my boss talked to said that windows XP just will not work for sending to machines. I have a hard time believing that there is not some way to make it work, but I can't seem to figure it out. "

Get a parallel connector (on your laptop) to parallel connector (on your machine) cable.

Tell your boss to get a new machine tech. There is not one credible individual that I know of that views how Win2k and upwards for MS operating systems that does not know that because of ACPI compliance all com ports are scanned at startup (one of the first things that ntdetect does), that exceptions can be made in special cirucmstances as boot.ini parameters, and that using USB devices, (not even supported at all in the original release of Win95, Win98, Win98SE, NT (not even today), Win2k, or XP) is an unproductive way to try and do something as immediate as workstation to machine tool serial communications and control.

Sheesh,
Get a serial cable and bag the USB to serial conversion.
If your laptop has its serial cable occupied by a mouse or another device, get a PCMCIA card an run a new com port from that. Anything, anything than trying USB to serial.

The difficulty with USB-Serial is that it can work perfectly for specific devices where you can find WHQL certified drivers. But as a generic solution there is usually enough to go outbound, but nothing in the driver to receive the serial communications after conversion. This is very device driver and manufacturer specific and decidedly not a generic solution.

And again, if your boss's machine tech told him it was an XP problem be glad he is not in the IT department.




 
I am using a laptop which does not have a serial port, that is why I got the USB to serial cable. We have over a dozen different machines with all different types of cables for communication. They are all set up for serial. I have had the same problem with our oldest machine (Mitsubishi Lathe) and our newest (Mazak Multiplex). The computer will receive data from the machines fine. When I send, the data is either garbled or incomplete. I think it is sending something because the control on the machine seems 'busy' while sending. I have even managed to end up with a partial file on the machine side, but it is around 20 charaters instead of 2500. These machine programs require a % symbol at beginning and end of program. I think when this is getting to the machine side, I get a partial file, when it's not I get nothing.
 
Put a network card in each and use a crossover cable. Then you will have a simple two-computer network. You can then use Windows Explorer for transferring files or even Replicator by Karenware ( and it is free.
 
If the serial communications is garbled, it is a bit, and/or parity issue.

Connect with direct serial from one of the machines capable of doing so, and play with data, stop, and parity bit settings.

You are correct it can be a "speed setting", so try the connection at lower and lower baud rates.

When you finally discover it is, e.g. 1200,N,8,1 or 9600,E,7,1 or whatever, try your USB again. Call the machine manufacturer and ask, as baud rates, parity settings, start, stop and data length bits are poorly if not at all discovered in serial communications. It is easier to ask.

 
It is running Windows XP Home Edition. I have tried different baud settings down to 300 bps with no luck (usual is 9600). I can receive data from the machine with no problem, but when I send nothing gets to the machine. I have checked the parameters on both the machine and windows terminal. It tends to crash windows terminal when I try to send. I have no problem sending with Windows 95 computer.
 
I meant the machine... Usually I see them running dos. It has to have some software to communicate with the xp laptop, what is it?

Matt J.
 
We use rs 232 to communicate with electronic cashregisters.The old communication program we got works fine on w98 but sends only data on win2000/XP but receiving data doesn't work. So I think there is a difference on handling the serial ports in dos(win) or NT
 
What Program are you runing to try to move the data, if it is a old dos base program that trys to talk directly to the hardware NT based OS 2k or XP are not going work.
 
ZappaDog,

I have seen issues with USB-to-Serial, and I really do not like it, preferring native serial ports or the use of PCMCIA serial adapters. In your situation your laptop does not have a serial port, you have the USB connector, see if any of the following may help.

1. Yes, Win2k and XP enumerate serial ports differently than previous OS versions. On startup NTDETECT is run, and one of its purposes is to resolve issues between BIOS enumerated devices and the Plug-and-Play service of XP. In particular, to handle ACPI issues, the advanced power features of current computer BIOS.

Does it screw this up? Yes, it can and does screw this up fairly often. The principal reason is that during an initialization on startup it mis-identifies a new device. this mis-identification is persistant unless the entries are removed from the configuration settings for the computer. More on this in a moment.

The most common misidentification occurs because someone connected an unidentified port and/or device prior to installing drivers for it. The New Hardware Wizard runs, and the user says Okay, automaticly detect the device.

The chances of Windows correctly identifying the device if it is anything other than a Mouse is nearly zero.

In most cases the guess will be that your serial device is an older ballpoint serial mouse. It will install drivers for this device. The serial port is now read-only (one does not have a need, nor does the driver support, a write to the mouse).

Workaround

In Device Manager, Hardware, View, Show all hidden devices.

Under the section, Mice and other Pointing Devices, Disable and do not uninstall the ballpoint Mouse device.

Check as well the "Human Interface Devices" section, and [Disable[/i] not uninstall any erronous entries.

Finally, under Ports, uninstall all serial ports shown whether greyed-out or not.

These steps are often best done in Safe Mode.

Reboot (without the USB adapter, and without any other serial connection). XP will re-enumerate the devices.

If the New Hardware Wizard appears, cancel it.

Final step.

Control Panel, Add Hardware. Let it autodetect new devices. For each new device set the values yourself, rather than let XP automaticly select the driver. For serial port devices select the correct port and IRQ assignments. Remember that COM1 & COM3 share IRQ4, COM@ and COM4 share IRQ3 by default. If possible, you want no IRQ sharing.

For your USB device you install the drivers prior to connecting the adapter to your computer. Look carefully at the userguide, as this differs by manufacturer. Check the web site of the adapter manufacturer, as there often have been updates to the driver set. But, if the manufacturer specifies driver installation prior to connecting physicly the device to the system do not take this as casual advice. The sequence is critical.

Further, do not be fooled by the New Hardware Wizard into thinking it can autodetect the appropriate device and driver set for this adapter. You must use the "Have Disk" method of specifying the driver location. Windows is almost assured of screwing this up if you let it automaticly determine the best driver for the device.

Summary:

. Clean from your device tables mis-identified devices;
. Do not let XP automaticly determine serial devices, you select them;
. Do not have connected to the computer new devices prior to driver installation and port specification, in most cases.

Resources:

Look in Event Viewer, many clues are there:

Be Careful of Serial Port enumeration issues:
 
Robbel,

I looked last year at a cash register application issue with new XP machines. The application was a Clipper compiled dBase storefront front-end, with serial port connection to a cash drawer.

In every single case the issue was that the cash drawer was connected to the machine on first boot and the installer allowed the New Hardware Wizard to automaticly detect the device. In every case it detected the device as a Microsoft ballpoint serial mouse. Please see my workarounds above for the issue.

They have had no issues after correctly enumerating the ports. Note that a serial port is one thing, a COM port is a communications device. If the serial port is allowed to enumerate as the wrong type of communications device, in this case a Mouse, yes you will have issues such as the device being read-only.

Hope this helps. If you Google for something like "xp+"serial port"+"cash register" you will get a lot of help from both Google Web and Google Group searches to sort the issue.

 
All,

USB-to-Serial adapters are not my favorite thing in the whole world. If you have seemingly intractible problems using this particular connection, and in particular with laptops, I hope the following gives some useful advice:

1. The RS-232C standard nominall requires a voltage range of +/- 10 volts on the interface. Many older machine tools and a fair number of modern devices will not work well unless these voltages are supplied.

i. Some manufacturer's USB-to-Serial devices supply on 5 volts; and will not work with some devices.

ii. Some devices will supply the correct voltages if connected through a powered-USB Hub connection, but will not if connected to a passive USB connection. Add a powered Hub to the passive USB connection (inexpensive) and try again.

iii. Some USB-to-Serial devices appear not to work at all.

The loudest, noisiest and most active explorers of USB-to-Serial issues are the folks connecting them to GPS devices. If you Google something like "notebook+GPS+serial+XP" you will likely find in a Google Web or Google Group someone who has your notebook and your adapter cable and has issues. I keep my fingers crossed that in your Google results there will also be someone who "fixed" the problem.

I almost never make a specific hardware/software recommendation. In this case I will just state the following two "truths":

. I would not use the Belkin adapter, or the Async specialists adapter;
. The "Murphy" adapter seems to solve a ton of problems: . Make sure you have this patch applied to your XP system:
Best,
Bill Castner
 
Well, I solved my problem (for 1 machine at least). I had to lower baud rate from 9600 to 1200. I tried this earlier, but there was also a problem where the computer needed to be restarted after an unsucessful transfer attempt before it would work again. I think I must have been in that mode when I tried reducing baud rate earlier. Thanks to all & particularly bcastner for your help. I'll be back if any of the other machines present a problem.
 
P.S. - I found this link to be very helpful. It provides charts for communications parameters for many industrial machine controls. This stuff is extremely hard to find, so it's nice to get a lot in 1 place.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top