Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^8: Win32::SerialPort v. New computers

by hennesse (Sexton)
on Nov 10, 2011 at 17:47 UTC ( #937421=note: print w/replies, xml ) Need Help??

in reply to Re^7: Win32::SerialPort v. New computers
in thread Win32::SerialPort v. New computers


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.


  • Comment on Re^8: Win32::SerialPort v. New computers

Replies are listed 'Best First'.
Re^9: Win32::SerialPort v. New computers
by Anonymous Monk on Nov 10, 2011 at 22:26 UTC

    I finally realized that the culprit could only be ME, and after some searching, my face turned red with embarrassment.

    A friendly tip, make sure to vocalize these moments, it helps your blood pressure :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://937421]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2018-01-19 15:50 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (221 votes). Check out past polls.