{"id":3514,"date":"2012-02-02T16:35:38","date_gmt":"2012-02-02T22:35:38","guid":{"rendered":"http:\/\/gregsowell.com\/?p=3514"},"modified":"2012-02-02T16:35:38","modified_gmt":"2012-02-02T22:35:38","slug":"monitor-tape-drives-with-plc-and-ir","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=3514","title":{"rendered":"Monitor Tape Drives With PLC And IR"},"content":{"rendered":"<p>We have tape rotation services for many customers here at the datacenter.  One of them does tape rotation of a specific job that only two people can verify.  These jobs happen to run over night which means these guys can&#8217;t verify when we need to swap the tapes.  If you don&#8217;t change the tape out quick enough the job fails, which means we have to check the tape roughly every 30 minutes all night long.  That&#8217;s just madness!<\/p>\n<p>This is where my newly acquired <a href=\"http:\/\/www.tri-plc.com\/nano10.htm\">NANO-10 PLC<\/a> comes in (Thanks John ;))<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.tri-plc.com\/nano10-1.jpg\" title=\"nano-10 plc\" class=\"alignnone\" width=\"405\" height=\"186\" \/><\/p>\n<p>Nano features:<\/p>\n<li>Built-in Ethernet port &#8211; Support MODBUS\/TCP<\/li>\n<li>Programmable via Internet<\/li>\n<li>4 inputs (24V NPN), 4 outputs (4A @24VDC)<\/li>\n<li>2 analog inputs (12-bit, 0-5V)<\/li>\n<li>1 RS485 Port &#8211; support Modbus RTU and ASCII<\/li>\n<li>4 Pulse Measurement, 2 Encoders, 2 PWM outputs<\/li>\n<li>1 channel Stepper Motor Controller<\/li>\n<li>Very Fast 32-bit CPU<\/li>\n<li>Built-in web server(controllable via browser)<\/li>\n<li>Basic scripting engine built in. (this allows for math as well as advanced functions like email sending.)<\/li>\n<p>I plan on taking at length about the Nano at some point, so I don&#8217;t know that I will spend too much time on it here.<\/p>\n<p>I matched this with a few products:<\/p>\n<li>Nano-10 PLC ($120)<\/li>\n<li>Project box from Ratshack<\/li>\n<li>Momentary switch<\/li>\n<li>Red LED &#8211; with limiting resistor<\/li>\n<li>About 5 foot of cat5<\/li>\n<li>RJ45 Jack<\/li>\n<li>24V PoE injector<\/li>\n<li><a href=\"http:\/\/www.jameco.com\/webapp\/wcs\/stores\/servlet\/ProductDisplay?freeText=2144462&#038;langId=-1&#038;storeId=10001&#038;productId=2144462&#038;search_type=jamecoall&#038;catalogId=10001&#038;ddkey=http:StoreCatalogDrillDownView\">INFRARED SENSOR, 3-80cm adjustable range<\/a> ($10.95)<\/li>\n<p>I mounted the LED, momentary switch, RJ45 Jack, and the PLC inside the project box:<br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06132.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06132.png\" alt=\"\" title=\"DSC06132\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3537\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06132.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06132-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06141.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06141.png\" alt=\"\" title=\"DSC06141\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3528\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06141.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06141-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06140.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06140.png\" alt=\"\" title=\"DSC06140\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3529\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06140.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06140-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Inside the box I: wired input one to the switch, output two to the LED, and broke out the power that was injected into the Ethernet cable and connected it to the PLC.<\/p>\n<p>I then reused the aluminum bracket that was included with the project box to make a bracket for the IR sensor:<br \/>\n<figure id=\"attachment_3531\" aria-describedby=\"caption-attachment-3531\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06126.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06126.png\" alt=\"\" title=\"DSC06126\" width=\"640\" height=\"480\" class=\"size-full wp-image-3531\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06126.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06126-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-3531\" class=\"wp-caption-text\">Send\/receive all in one unit.<\/figcaption><\/figure><br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06129.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06129.png\" alt=\"\" title=\"DSC06129\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3532\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06129.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06129-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06128.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06128.png\" alt=\"\" title=\"DSC06128\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3533\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06128.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06128-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<figure id=\"attachment_3534\" aria-describedby=\"caption-attachment-3534\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06130.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06130.png\" alt=\"\" title=\"DSC06130\" width=\"640\" height=\"480\" class=\"size-full wp-image-3534\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06130.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06130-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-3534\" class=\"wp-caption-text\">Screw on the back adjusts the power of the IR emitter.  The little bump on the back is an LED that indicates when an object is detected...this is extremely helpful while tuning the sensor.<\/figcaption><\/figure><br \/>\nThe sensor has 3 wires: 5V+, ground, and data.  When the sensor detects an object the data pin syncs to ground so your input will go high.  When it doesn&#8217;t detect it puts the data high.  I wired this guy to input four.<\/p>\n<p>Since we are using this to monitor tapes, I mounted it inline with the tapes so I can detect when either tape is ejected:<br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06135.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06135.png\" alt=\"\" title=\"DSC06135\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3535\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06135.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06135-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06133.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06133.png\" alt=\"\" title=\"DSC06133\" width=\"640\" height=\"480\" class=\"aligncenter size-full wp-image-3536\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06133.png 640w, https:\/\/gregsowell.com\/wp-content\/uploads\/2012\/02\/DSC06133-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>An amazing feature of the Nano is the ability to send email directly from the PLC!!!!  What happens is when the sensor detects an object it sends input four high.  This starts a timer.  If the input stays high for 1.5 minutes then an email is generated and sent.  After this an internal output is latched.  This latched output prevents the email from sending any more&#8230;otherwise an email would be sent several times a second until the sensor is cleared.  <\/p>\n<p>I have another timer that resets the email output after 15 minutes, which means that every 15 minutes an email will be generated until the sensor is cleared.<br \/>\nYou will also remember the momentary switch that is installed in the enclosure.  This enables a 15 minute sleep mode so you can change tapes without setting the email alert off.<\/p>\n<p>I also adjusted the ladder logic so that it updates a webpage on the internal web server so that you can login and see the status of the tape.<\/p>\n<p>These little PLCs are amazing and the IR sensor works a treat.  Any questions or comments, please drop me a  comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have tape rotation services for many customers here at the datacenter. One of them does tape rotation of a specific job that only\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,42],"tags":[],"class_list":["post-3514","post","type-post","status-publish","format-standard","hentry","category-hardware","category-plc"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/3514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3514"}],"version-history":[{"count":29,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/3514\/revisions"}],"predecessor-version":[{"id":3552,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/3514\/revisions\/3552"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}