|go ahead... be a heretic|
Re^8: Win32::SerialPort v. New computersby hennesse (Sexton)
|on Nov 10, 2011 at 17:47 UTC||Need Help??|
Brilliant work on the PnP - but the cause was actually a virulant agent: ME
I originally set this system up under FreeBSD, and had no such problem. When I converted it to run on a Win32 platform (with tremendous help from BrowserUK and many others) I did most of the work in the office, only occasionally checking it out in the lab/production environment. I did hear some unusual noise, but couldn't identify it, and dismissed it as something unrelated. It was only when I started fooling with the USB->RS-232 converter that I positively identified the noise as the "hot liquor pump" starting up and then immediately turning off.
While there was no ill effect, this condition just shouldn't happen, and I was (wrongly) convinced that it had something to do with the USB. I went back to the straight serial port and it still happened. I did have a ground-loop, and as you suggested, untied the RS-485 ground from the RS-232 ground. Still happened. After working through the PnP document, I started thinking - there is no way that Windows, or any kind of noise, could send an ASCII sequence of #9SB08 with the correct 2-character checksum appended.
I finally realized that the culprit could only be ME, and after some searching, my face turned red with embarrassment.
It turns out I had left an artifact in one of my threads while testing Thread::Queue communications - and it was turning the pump on. While my digital input/output PLC is configured to start or reset with all outputs off, my software initialization sequence explicitly turns each output off - just to make sure. So I was turning it on in one thread, and my init sequence in another thread was immediately turning it off - just long enough for it to make a brief noise.
Thank you for all your help.