{"id":1706,"date":"2009-09-08T15:35:43","date_gmt":"2009-09-08T21:35:43","guid":{"rendered":"https:\/\/scadametrics.com\/blog\/?p=22"},"modified":"2022-10-15T16:16:06","modified_gmt":"2022-10-15T22:16:06","slug":"serial-snooper-utility-6","status":"publish","type":"post","link":"https:\/\/scadametrics.com\/blog\/?p=1706","title":{"rendered":"Serial Snooper Utility"},"content":{"rendered":"<p><div id=\"attachment_3732\" style=\"width: 160px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3732\" src=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2025\/07\/IMG_0987-1-150x150.jpeg\" width=\"150\" height=\"150\" data-srcset=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2025\/07\/IMG_0987-1.jpeg 2x\" alt=\"James Mimlitz &#039;Slim&#039;\" class=\"avatar avatar-150 wp-user-avatar wp-user-avatar-150 photo\" \/><p id=\"caption-attachment-3732\" class=\"wp-caption-text\">Jim &#8216;Slim&#8217; Mimlitz, SCADAmetrics<\/p><\/div>Over at control.com, a PLC engineer was working\u00a0to troubleshoot the connection between two PLC\u2019s.<\/p>\n<p>Having done this way back when, I decided to post\u00a0what I think was a pretty\u00a0nifty solution.<\/p>\n<p>(Besides, this could be useful for troubleshooting communications between any two pieces of computer equipment, including an EtherMeter.)<\/p>\n<p>In my case, I had both a\u00a0master and a slave PLC connected via RS-232 serial (null-modem) cable; and I planned to use my notebook computer\u2019s two serial ports to \u201csnoop\u201d the data transmitted from each of these PLC\u2019s.<\/p>\n<p>I cut open the RS-232 cable and used alligator clips to \u201csnoop\u201d the TxD lines from both PLC\u2019s plus the GND line. I did not break the connection, though.<\/p>\n<p>On my notebook (snooper) COM1, I connected my RxD and GND to the Master PLC\u2019s TxD and GND\u2026. and on my notebook (snooper) COM2, I connected my RxD and GND\u00a0to the Slave PLC\u2019s TxD and GND.<\/p>\n<p>COM1 would listen to (and log) data from the Master; and COM2 would listen to (and log) data from the Slave.<\/p>\n<p>This eliminated the need to have my \u201csnooper\u201d software receive and re-transmit data.\u00a0 I only needed to listen to, and log data from, each of\u00a0my notebook\u2019s\u00a0COM ports.<\/p>\n<p>The reason that this works is because a single RS-232 TxD line is capable of driving two RS-232 RxD lines.<\/p>\n<p>My \u201csnooper\u201d program was written in C++ and compiled with MS VC++ 6.0<\/p>\n<p>Here is a link to\u00a0the \u201csnooper\u201d source code file\u2026<\/p>\n<p><a href=\"https:\/\/scadametrics.com\/src\/snooper3.cpp\">https:\/\/scadametrics.com\/src\/snooper3.cpp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over at control.com, a PLC engineer was working\u00a0to troubleshoot the connection between two PLC\u2019s. Having done this way back when, I decided to post\u00a0what I think was a pretty\u00a0nifty solution. (Besides, this could be useful for troubleshooting communications between any two pieces of computer equipment, including an EtherMeter.) In my case, I had both a\u00a0master <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"https:\/\/scadametrics.com\/blog\/?p=1706\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[19,20,22,21],"class_list":["post-1706","post","type-post","status-publish","format-standard","hentry","category-troubleshooting","tag-rs-232","tag-rs-485","tag-serial-line-snooper","tag-serial-port"],"_links":{"self":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1706"}],"version-history":[{"count":2,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1706\/revisions"}],"predecessor-version":[{"id":2458,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1706\/revisions\/2458"}],"wp:attachment":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}