Today is...
Saturday, June 15, 2019
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
EtherCAT with CTC’s master lets your multivendor network play well together...
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Strange W2K RS232 behavior - help?
I'm using a Java program to talk to a Canon LCD projector using a very common projector control RS232 protocol, and I'm seeing erratic behavior trying to open the port. Seems related to the order in which the devices are plugged in or some cable issue.
By Matt Gorbet on 4 April, 2001 - 3:33 am

Any help/pointers/ideas would be greatly appreciated. Here are the problems in detail: 1. When I first boot up, if the projector is connected to the serial port, the port will not open. It is listed as being in use by an unknown device. However, unplugging and plugging it back in clears this up and my code works fine to control the projector. Of course, this is not a practical solution, becaues the final project needs to be able to be permanently wired. 2. I sometimes get an error generated by the Windows driver when I attempt to open the port: "unable to getCommConfig() - 995". I think that refers to error 995, described on MS website as: "...995: The I/O operation has been aborted because of either a thread exit or an application request. ERROR_OPERATION_ABORTED" Running my code over and over again without changing anything, it works about 50% of the time. If I simply unplug the cable, my code can access the port 100% of the time without this error (of course the projector is not being controlled!) It seems to me that this is a flow control issue, but I've played with as many of the handshaking and flow control options as I can, and I'm unclear on what should be happening, or what the projector expects, flow-control-wise. And the fact that it works sometimes and not others just baffles me. I'm using JavaComm API, but I don't think that's the problem because the errors occur before I get control with Java. I get similarly erratic blocking behavior using a standard terminal like Hyperterm or Java's BlackBox app. Any ideas would help a lot. Thanks for your time. Matt PS - here's the cabling and data config: Configuration: 19200, n, 8, 1 9-pin DIN -> 8-pin mini-din (rs232C) pinout on projector side: 1 - RXD 2 ---- 3 ---- 4 - GND 5 - RTS/CTS 6 - TXD 7 - GND 8 - GND

By Matt Gorbet on 4 April, 2001 - 2:55 pm

Thanks for your responses! I think I have found the root of the startup problem: the projector is apparently supposed to be able to act as a serial mouse (control the pointer from the remote) and Win2K is seeing the serial connection and "auto"-detecting a mouse there, which closes the serial port on startup. By disabling this device in the hardware manager, I now no longer have that problem. The other problem seems to be fixable by resetting the serial port (first disabling it, then re-enabling it in the HW manager). This is a poor workaround, especially because there doesn't seem to be a command line way to do this. But things are looking up. Thanks again for help from those who responded. Matt

By Webmaster UsodeRazon on 4 April, 2001 - 3:01 pm

Matt, We've had similar problems in Windows NT, and solved them using the /NOSERIALMICE option in the boot.ini file. Otherwise NT will try to detect a mouse in every serial port. Alfonso Garcia Una Cuestion de Logica