SparkFun Electronics Commentsurn:uuid:214d0e4e-f1b1-d287-ce26-ac5b4c9f82492024-03-28T08:07:06-06:00SparkFun ElectronicsRod222 on Ladder LogicRod222urn:uuid:bdb0b841-9569-6b7e-850b-28c15b1dbacf2013-06-14T14:15:18-06:00<p>I'll take a crack at your Allen Bradley text logic...<p>First contact “XIO” = examine if open
BST = branch start
Second contact after bst “XIC” = examine if closed
NXB = next branch
Third contact after nxb “XIC” = examine if closed ( Paralleled with the 2nd contact )
BND = branch end
Forth contact after bnd “XIC” = examine if closed
OTE = Output energized</p><p>For some reason I can't paste a picture of the ladder but basically it is a NC contact in series with 2 NO parallel contacts followed by another NO contact in series with the parallel contacts and then the coil... I think</p></p>
Customer #370431 on Ladder LogicCustomer #370431urn:uuid:9345ef2b-5a27-3d99-20eb-cbe3b8e3904f2013-06-09T08:08:49-06:00<p>Also, as points of interest, I believe that is a Melsec in Paul's title picture. And please notice the "tape" jack on the programming
terminal- that's right, we used to store programs on cassettes.</p>
Customer #370431 on Ladder LogicCustomer #370431urn:uuid:54d59300-1fa4-729a-b2bb-4685118d46c52013-06-09T08:04:16-06:00<p>If you guys want some pictures of ancient programming terminals and PLC's, wait til I get to the office tomorrow! I've got
some dinsosaurs...
And Koyo made (makes) that same PLC for GE/Fanuc, Siemens, Texas Instruments, and PLC/Automation Direct. A 100
Word demo IDE is downloadable free from automationdirect.com.
The text language Paul is using is implemented by other older PLC manufacturers, particularly Mitsubishi's early Melsec
series. But other manufacturers ASCII interface looked like this "xio bst xic nxb xic bnd xic ote." Extra credit to Paul or anyone else that can translate that to a ladder diagram...</p>
Atomic on Ladder LogicAtomicurn:uuid:caf466aa-7c2c-ee75-ecce-cc4f5744de2e2013-06-08T07:00:47-06:00<p>When I was a kid we didn't have no fancy fang-dangled PLC thingamajig. We wanted to crush cans we just put 'em on the floor and stomped on 'em.<p>Cool machine though!</p></p>
bigG on Ladder LogicbigGurn:uuid:361fd1df-ff8f-d1af-0df7-b86845bed2802013-06-07T15:59:20-06:00<p>http://cubloc.com/product/01_01cb210.php<p>This is a product that has been out for awhile. The CB210 combines a CUBLOC PLC controller with a USB interface on an "Arduino" format circuit board. Has 1kB available for your ladder logic.</p><p>Anyone tried it?</p></p>
TRYAN3131 on Ladder LogicTRYAN3131urn:uuid:27e1ac4c-ff6e-07b1-9d84-586e8212775b2013-06-07T12:14:39-06:00<p>I remember working with a PLC guy to map registers from the PLC over to our DCS (using a serial comm). On our end it took a couple seconds to locate the placeholders for the registers, while it took minutes to find each register in the ladder logic. It was fairly nightmarish.</p>
Fraze on Ladder LogicFrazeurn:uuid:30868430-9104-5c08-1d59-665193d9c93f2013-06-07T12:02:41-06:00<p>Fun Fact: The first PLC created ran for 25 years successfully before it finally died out(modicon 084 and was then called a Modular Digital Controller). They used to require their own dedicated industrial computers the size of a small refrigerator.<p>I designed/prototyped an open-source PLC but didn't think there would ever be any interest in it. Nice to see SF shedding some light on it!</p></p>
TheCentaur on Ladder LogicTheCentaururn:uuid:9bbccfa6-eb0e-3c69-eeea-96b52af4d1ed2013-06-07T10:20:38-06:00<p>Thanks! Now I understand.<br>
Thanks for the writeup and I so love that can crusher. Bravo!</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:44e45276-5f10-fbf3-b0f3-a2deba2d249f2013-06-07T09:03:43-06:00<p><a href="https://dlnmh9ip6v2uc.cloudfront.net/assets/f/f/2/e/d/51aff50ace395f346b000000.jpg" rel="nofollow">Like dis</a> - for scale, those bolts are 1/4-20s</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:ffced131-b0dd-eb15-966e-56934037ac5d2013-06-07T09:02:50-06:00<p>Yep you are correct. I waited until the night before to finish this. I was up a bit late.... Thank you.</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:6c5062b7-e7b2-d7a9-9147-3afcc03615592013-06-07T08:59:12-06:00<p>Good catch, thanks. I believe the difference between the two are that timers use tenths of a second increments 0.1 - 999.9 seconds , and counters just count by 1's 1-9999. Counters also require two rungs of logic, the first rung controls when the counter is incremented and the lower one allows you to reset the counter.<p>Also, my explanation was incorrect in the first counter diagram - I had been explaining it as if it was a timer, but it is a counter. A timer will continue to count when conditions are met, up to 999.9 seconds. A counter will increment by one when conditions are met, but the conditions must be reset and then met again for the count to increment again.</p><p>In the challenge, coil 375 is actually a 10Hz signal generator providing 0.1 second pulses to counter 603. After 10 pulses (1 second_ counter 603 pulses once and resets. That single pulse is sent to counter 600, which keeps track of seconds. As time builds up, the numbers cascade through the rungs until 24 hours have passed at which point it returns to zero.</p><p>Sorry for the confusion.</p></p>
Mattams17603 on Ladder LogicMattams17603urn:uuid:6e9bbdee-10de-e243-9c23-ac8d538b226c2013-06-07T08:29:12-06:00<p>That's really cool to look at where PLC's came from. I work on Beckhoff PLC's myself and it's really amazing where they've come from and the capabilities they've gained over the years.</p>
jdhibbs on Ladder Logicjdhibbsurn:uuid:9baa62a8-8a1c-9976-b4b5-36a9e8ae85042013-06-07T08:26:44-06:00<p>Nice write-up. I agree with you and the comments of others. A new modern PLC does all the things that most have commented on and more (Hot swap, redundant processors, on-line configuration, etc.) and are truly great machines. But these features have always come with a high price tag. For example, an AB 1756-L61 lists for $6K, and that does not include backplane, com card, power supply, IO and all of the other things that make it work. Granted that this way overkill for the home or hobbyist, you get an idea of cost. The nice thing about some of the modern microcontrollers is that you get some of the great features of the PLC for $10 of dollars verses $100s or even $1000s. Would I use a basic Arduino to run a chemical plant, probably not. But for around the house stuff and simple machines, you betcha!</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:96642310-4a68-f1ae-8cd5-88f0d78d5de42013-06-07T08:08:35-06:00<p>Alright, as long as we're all being friendly.</p>
TFlock on Ladder LogicTFlockurn:uuid:96fe8d79-0c5f-1703-8902-9e32220051622013-06-07T07:05:13-06:00<p>So that's what a PLC looks like. I always thought they were just microcontrollers, it's sweet to see a bit of the history behind it.</p>
Edwilson1989 on Ladder LogicEdwilson1989urn:uuid:816ad536-6079-4ddd-096a-9f1f25f343bf2013-06-07T05:51:47-06:00<p>I think there maybe a mistake in your text.<p>Pseudocode: If (271 and 135), or (135),</p><p>I believe it should read</p><p>Pseudocode: If (271 and 132), or (135).</p><p>This is a great article very welll written. PLC have always amazed me and I would love to play with one. Unfortunately I don't have the space to set one up. I have a number of designs for implementing one using the arduino boards.</p></p>
Rod222 on Ladder LogicRod222urn:uuid:e80ae73f-b532-0ab0-557e-3bf19e0028ed2013-06-06T23:01:04-06:00<p>Nicely done Paul, If I remember correctly Koyo made basic PLCs for a few manufacturers a while back. GE and PLC Direct were a couple. That is why the software and keypads are the same for the GE Series One Junior and the PLC Direct 305. I had to make a program change recently on a PLC Direct 305 using that same keypad you used, oh boy lots of fun. I'm used to using old DOS or windows ladder logic software. I have an old Allen Bradley PLC 2 rack with a very old heavy programming terminal that comes with it's own CRT built in. I'll think of something to do with it eventually but at the moment I am having too much fun with arduinos, lol.</p>
Ichbinjoe on Ladder LogicIchbinjoeurn:uuid:02488235-479d-99a6-8831-e200f943f3d62013-06-06T17:16:17-06:00<p>Sorry! Just wanted to throw it out there for the people who didnt know!</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:6f56c4b7-e924-7035-a58a-49ecf18437472013-06-06T17:14:43-06:00<p>Hah! Yea there was one running off screen. It's an older model, but still has the collapsible fluid-operated self-guided flywheel actuator adapter. And really, that's all you need.</p>
TheCentaur on Ladder LogicTheCentaururn:uuid:69fbae4c-92e4-196d-3e00-8086bc7e20902013-06-06T17:13:10-06:00<p>PS, in your first Timer diagram, Timer 603 is reset on contact 13, not 17, as listed in code and text. ;)
PPS. I R Confused. In your Timer and Challenge diagrams, you're calling them CNT. What are they counting? Shouldn't they be TMR? I dunno. Never used that specific PLC.</p>
sgrace on Ladder Logicsgraceurn:uuid:c02f581a-f211-2481-3532-9d5d38e4dc032013-06-06T17:12:12-06:00<p>Hz to MHz (and in some odd cases GHz) yes, millions. Plus more memory!</p>
TheCentaur on Ladder LogicTheCentaururn:uuid:eb1007c6-eebf-80e6-0099-f9b30906857d2013-06-06T16:58:41-06:00<p>Ah yes, PLCs, ladder diagrams and relay logic... Love it. Been messing with the various forms since the 1980's. Used to work for a museum, and was in charge of most of the technical operations, from building HVAC to exhibits. A good deal of the HVAC used PLCs of one form or the other. Actually, one of the biggest PLC installs I saw was when we had rented some of the big traveling lifesize moving Dinosaur exhibits. All pneumatic driven movements, and all the air valve cycling controlled by programs running on PLCs not all that different from the can crusher.<p>Great article, and thanks for the spotlight on the PLCs. Great Can Crusher too! :)
True, PLCs are a cut above pure relay logic and much easier to program, but sometimes I miss the chatter of relays cycling.</p><p>True Story: At our museum, back in the 1980's our building elevator was all relay logic driven, much like the octal cube relays on top of the can crusher.
There were 3 floors to the building, and on the second floor were some nature dioramas that included a fullsized stuffed moose. Well the moose was across the aisle facing the elevator.<br>
For some reason, once in a blue moon, if you got in on floor 1, and pressed the button for floor 3, the elevator would start up - and even with no call on floor 2 - sometimes the elevator would stop on floor 2. The door would open, no one would be there but you would stare at the moose who was staring at you, and then the door would close and you would continue up to 3.</p><p>This was only once in a while, and most times without anyone else even being on the second floor. It was like the stuffed moose would move and sometimes run across the hall and press the button for the elevator. Door would mysteriously open... there was the stuffed moose.... door would close. We wound up calling it "Visiting the Moose" and it was local lore that the stuff moose knows how to work the elevator.</p><p>Elevator company could find nothing wrong- all buttons, switches, motors, sensors were working fine. There was a full printout of the relay control logic and wiring at the panel, and yes, it was all in Ladder Diagram. Dozens of relay coils and contact points, buttons, sensors, indicator lights, etc.</p><p>I spent a week reading that diagram and following the relay logic, and watching the relays (luckily with indicator lights on each) cycle as the elevator did its thing. I eventually found it. It was a race condition between a set of contacts closing on one relay and the elevator position sensor relay for floor 2. If one relay dropped out just a split second too slow before the other pulled in it created a false "stop at floor 2" condition. Since relays do take a finite amount of time to transition from one state to the other this can indeed cause issues in close timing applications. The fix here was to move 2 wires from the offending relay contacts to a relay that was actually controlled from that relay. The extra few milliseconds delay as one relay cascaded to the next was enough to prevent the race condition and the elevator stopped mysteriously stopping on floor 2.</p><p>I still swear the moose moves though while I'm not looking...</p></p>
andy4us on Ladder Logicandy4usurn:uuid:125fa3e6-9ebf-59d3-e186-a81b0c743a8d2013-06-06T15:16:00-06:00<p>Sounds like you could have done with some Rockwell Automation Retro Encabulators in there !<p>https://www.youtube.com/watch?v=TuhYd9L_d7w</p></p>
Nick Poole on Ladder LogicNick Pooleurn:uuid:02d15221-84e2-02fe-c80f-a71d994e4b612013-06-06T14:41:08-06:00<p>Big thing smash can good. Good make big thing.</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:ef00d8ab-59b6-e040-eacb-fb1f0583d1cb2013-06-06T14:32:53-06:00<p>I'll see what I can do this weekend. I haven't turned it on in 2 years because Colorado doesn't like it when you crush your cans. Or something. I don't know, but I was upset when I found out.</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:7665976b-c459-ad55-648a-1cbdf7b81c2b2013-06-06T14:30:50-06:00<p>The frame was already built, but I made everything else. All the individual electronics and pneumatics were sitting around.</p>
JohnathanN. on Ladder LogicJohnathanN.urn:uuid:47048f3f-2fd7-851c-ce86-3d00a20fc9572013-06-06T13:05:40-06:00<p>Hopefully well shaken cans of soda...I think this idea calls for a follow up video :P</p>
0xDBFB7 on Ladder Logic0xDBFB7urn:uuid:f05c4c25-32b1-80c0-55fc-efc3ceb70a082013-06-06T13:00:15-06:00<p>And, quite probably, on the order of millions of times faster.</p>
Jeff Haas on Ladder LogicJeff Haasurn:uuid:1b51d5fd-9fed-b0fb-1240-df8feeab2de12013-06-06T12:53:20-06:00<p>OK, here's the obvious comment on the video, made by my inner 8-year-old boy...<p>Have you ever done it with FULL cans of soda? Heh heh heh.</p></p>
JohnathanN. on Ladder LogicJohnathanN.urn:uuid:7cd31aa1-ef7f-c9c4-8e00-e504b59757742013-06-06T12:50:01-06:00<p>Did you construct all of the mechanical parts or did you find/modify what you needed from existing components?<p>I wish I had a Dad with some awesome stuff hanging around. Nice work</p></p>
JohnathanN. on Ladder LogicJohnathanN.urn:uuid:fef94276-dc0c-65f9-0250-eafad746141c2013-06-06T12:47:13-06:00<p>It makes me want to build one. It is a nicely done project.</p>
Pete-O on Ladder LogicPete-Ourn:uuid:402130bd-012c-ce05-3191-4aa846dfbc732013-06-06T12:41:46-06:00<p>FWIW, y'all might like to know that the video he's posted had a hand in getting Paul hired here, to the tune of "Sweet! Aw, damn, that rocks!"</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:e3f617f8-3673-a99f-b89d-025bfb67125e2013-06-06T12:29:16-06:00<p>I know, but I wanted to demonstrate keypad only use. Plus I don't know how.</p>
North Alabama PC on Ladder LogicNorth Alabama PCurn:uuid:ba7af8c2-ceaf-605d-9323-76600d7db53a2013-06-06T12:26:30-06:00<p>Hey I trained on one like this and I do remember those diagrams for programming the PLC (RETS Electronics). Memories!
I haven't used one since.</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:b8852e23-ce3f-3f1d-003c-031eec15f5b82013-06-06T12:26:18-06:00<p>That looks like a headache to rebuild....</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:52efe8a1-1488-3f2b-c673-0ccc502d1f562013-06-06T12:23:44-06:00<p>We could go for days about what things can do, this post is about an old PLC. If I wrote a post about an old car and how it didn't have power steering would you suddenly feel like new cars aren't getting the attention they deserve and get defensive because your car has power steering?<p>Everyone relax, this is just a fun post about a old controller that was fun to blow the dust off and use. Please refer to my original quote if you are still upset.</p></p>
sgrace on Ladder Logicsgraceurn:uuid:f496aea6-8861-700e-d613-e9caab5c7c202013-06-06T11:52:52-06:00<p>What has always surprised me about PLC is that it wasn't too long ago you'd have a closet of these things controlling something fairly simple, and now the cutting edge 16nm FinFET transistors are letting FPGAs do the same thing in a fraction of the size (try in the millimenter scale).<p>Science and technology is great.</p></p>
Customer #444314 on Ladder LogicCustomer #444314urn:uuid:9ff21e55-6ecf-4e2a-3bc2-bc24e24730a12013-06-06T11:35:40-06:00<p>Sorry to say the GE Series One Junior can be programmed by a computer! Check out AutomationDirect series 305 PLCs.</p>
michael_yoyo on Ladder Logicmichael_yoyourn:uuid:33fed384-e632-6fba-6839-5c43468f8c4d2013-06-06T11:32:41-06:00<p>It's worth a mention that new PLC's are entirely capable, can be fault tolerant and completely redundant, with hot swap modules and redundant fiber optic network and I/O connections. Some have web servers built in and can speak many, many protocols for communication. They're programmed in standard text based languages if need be. It's not fair to give a bad impression of something by using old technology and only giving a one sentence mention to the newer models(which aren't actually too new) that do things well beyond the capabilities of those ancient dinosaurs. I work on Siemens S7-400H systems all day so I may be a bit defensive. But it deserves more a mention then what new PLC's got.</p>
jmlynesjr on Ladder Logicjmlynesjrurn:uuid:82c6728d-a022-755d-491c-920b51a6c10b2013-06-06T11:32:34-06:00<p>Many if not most roller-coasters since the 1970s have been controlled by PLCs. Allen-Bradley was involved and pushed to continuously provide faster and higher capacity PLCs for this application area.<p>Industrial technicians aren't software engineers and in many cases are mechanics. Ladder logic is easily taught to these techs which allows the tech to troubleshoot low to medium complexity problems on their own. The engineer(s) are probably not on-site or even in-country at this point in time.</p><p>Pneumatic controls are still heavily used in nuke plant controls due to the slow, expensive process required to qualify any new equipment for that environment. Utilities keep equipment forever, so you'll see a mix of technologies still in-use.</p><p>James</p></p>
joesugar on Ladder Logicjoesugarurn:uuid:c4df9e6e-b447-d334-849b-13777b82d8172013-06-06T11:27:34-06:00<p>Love the sound that the air makes as the plunger is retracted. And every project needs a big red button.</p>
HelicopterGuy on Ladder LogicHelicopterGuyurn:uuid:9ae0b15d-4064-1b93-1492-02cfcf5cdb852013-06-06T11:14:06-06:00<p>Nice build, and nice article. I did an event years (and years) ago, in which I got to program a fully articulated giant dinosaur, using a PLC and only a keypad controller much like the one shown. So time consuming!</p>
MattM. on Ladder LogicMattM.urn:uuid:b8706aec-4bc7-49c7-324a-6363ab3ca0122013-06-06T11:11:36-06:00<p>I don't think they would care, typically I see these things a few hours before we go in and take it all out. I don't have any on me at the moment, but I will definitely take a few pictures next time I get chance. In the mean time, here's an old analog beast, you can see all the wire wrapping and relays on the door. http://instagram.com/p/aOa-dMA91R/</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:a6b7ab49-aeda-d669-1881-2d14e5ad69d22013-06-06T11:05:12-06:00<p>Correct. Nice work.</p>
jma89 on Ladder Logicjma89urn:uuid:6689bd72-9de0-b411-83ad-b574f23cffd72013-06-06T10:54:07-06:00<blockquote>
<p>I’ve seen everything from vacuum tubes & pneumatics...</p>
<p>I would love to see a system running on vacuum tubes and pneumatics. Any chance you could get some pictures/video of how they operated, or is that too touchy being a utility and all?</p></blockquote>
Dave Mueller on Ladder LogicDave Muellerurn:uuid:9e3d5183-f5fe-786a-0ddb-364a142849162013-06-06T10:52:05-06:00<p>24 hour clock with tenths of seconds.</p>
MattM. on Ladder LogicMattM.urn:uuid:342e5a54-441b-54c7-41ac-93c63f7b70f72013-06-06T10:49:10-06:00<p>Good article! I do control system retrofits for utility generators, thankfully I have not had to extract programming from something that old, yet, most of the time we're adding so many new components it's easier to just redo the program from scratch. You'd be surprised what the electrical grid is running on, I've seen everything from vacuum tubes & pneumatics to fiber optics and modern processing.</p>
Paul Smith on Ladder LogicPaul Smithurn:uuid:17497f74-f97e-f9c2-4766-22629a56c3c62013-06-06T10:19:12-06:00<blockquote>
<p>Now hold on. Before you get your caps lock ready, yes I know PLCs are still used in everything everywhere and can be quite modern. I’m talking about really old PLCs. The ones that didn’t interface to a computer and had to be programmed directly from a keypad.</p>
</blockquote>
Ichbinjoe on Ladder LogicIchbinjoeurn:uuid:dbbcfea4-6940-24be-1137-5da25e046f842013-06-06T10:12:27-06:00<p>Modern "PLC"s have many modern features like ARM processors and such. So while older PLC's follow this, many new models are quite capable with their abilities. In example: I am currently designing a PLC like interface board for a Raspberry Pi. A modern example from National Instruments would be their line of a C-RIO line. They are able to be programmed in languages like Java, C++, and LabView. So while they can still be programmed in a PLC-esque manner, (from labview), they have become much more compact and adaptable.</p>