|Syntactic Confectionery Delight|
Re^7: Win32::SerialPort v. New computersby afoken (Abbot)
|on Nov 08, 2011 at 13:35 UTC||Need Help??|
one of my pumps spins for a fraction of a second. This does not happen with the native RS-232 serial port. I fear the win32 device may have been infected with a certain virus.
I think the adapter chip emits some noise on power-up. The RS-232 to RS-458 converter converts that noise to properly formated signal. And finally, the process control system misinterprets that as pump start / pump stop commands. The on-board RS232 COM port probably generates less noise, or has some extra hardware to keep the output lines on a sane level until the chip has reached stable conditions.
Note that USB ports can be powered off by software. This is not implemented in all USB ports, but in some of them. If you connect to an on-board port, try a different port. If you connect to an add-on card, try an on-board port. If you connect to a hub, try connecting directly to the computer. If not, try going through a hub. Look at the Windows device property pages. Some Windows versions can automatically shut down unused ports to save energy. Disable that feature, if enabled.
There is a standard for detecting devices connected to the COM ports. It toggles the handshake lines several times and waits for the device to identify itself by toggling other handshake lines and / or sending some characters at 1200-7N1. Windows seems to use this standard. The RS232-to-RS485 converter does not convert the handshake lines, simply because RS485 does not have handshake lines. How it responds to Windows toggling the handshake lines is not defined. If Windows is convinced that it has found a device because of the handshake lines response, it may send some identification commands to the RS485 device, something like ATI or AT+FCLASS for a modem. That bytes may switch on and off your pump, reliably and every time Windows decides it is time to test for a new PnP serial device.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)