3 ms·
> For controls guys who had dealt with relays for most of their professional lives, that relay-oriented logic flow made sense. Ladder logic is based on ladder
by MisterTea 3y ago
> For controls guys who had dealt with relays for most of their professional lives, that relay-oriented logic flow made sense.
Ladder logic is based on ladder control schematics. They were used for machine control circuits to present the circuit as a series of rungs running from left to right, the left side representing a connection to the control power supply hot or positive line and the right represented the control power supply return or negative. Each rung is a circuit that handles some logic. eg you have a laser machine with three doors and two access panels each holding a normally open switch closed to complete the circuit - when all the doors are closed the output is signal is high which you can use to ensure the doors are closed so no one gets melted. The sequence reads top to bottom so when you trouble shoot you walk down the steps checking each right hand output device and if it didn't work, work your ways backwards through the rung with a volt meter.
Way back I got to fix an old Marvell power feed metal cutting band saw. All relay logic and the saw would run one cycle, retract and do nothing. So I grabbed a meter and the ladder diagram and worked my way down until I found a rung with no output. Turns out the saw carriage return limit switch bracket came loose and the return switch was never pressed which would reset another rung to restart the cycle again.
> A typical computer science student's idea of boolean logic gates and procedural control flow just wasn't part of their lexicon.
Nonsense. I was exposed to industrial automation in high school where I was preparing to become an electrician via a robotic manufacturing system from eshed robotec. I really liked computers but was never interested in programming them at that point even though I knew some gw basic and the robots were programmed in basic. Then I wound up taking an AP c++ programming class and it clicked.
To me ladder is a great language and perfect for representing the boolean data flow through sensors and switches to visually group functions into rungs. It's so much faster to visually parse a rung vs a block of text. It's the default on every controller for a reason.
Though I'll say this: automation software sucks shit through a straw. So much of it was designed on Windows while riding the 90s OOP hype train. And the design by committee with languages and standards baked into iec/iso standards is depressing. 61131-3 defines a crappy Pascal like language called "structured text" but everyone bolts on their own oop extensions to the language in various proprietary ways. And you don't want to begin to fuck with the absolute dog shit Byzantine garbage fires that are PLC IDEs. They're so invasive that everyone in the biz runs then in VMs so they don't bork the OS.
- spieswl 3y agoAnother thing to note is that, depending on the standards (e.g. NFPA vs IEC), your control diagrams would be in horizontal [0] or vertical [1] format. So the typical left-right ladder flow you might see in RSLogix or something worked really well with drawings produced to NFPA standards, but the mapping broke when given "waterfall"-like schematics from a European shop. You are 100% correct about the tooling being crap and ladder representation being useful as a visual mapping. [0] https://library.automationdirect.com/wp-content/uploads/2013/09/input-type-devices-left-and-output-devices-right.jpg https://library.automationdirect.com/wp-content/uploads/2013... [1] https://multilinedesigns.com/wp-content/uploads/2018/02/IEC-PLC-Card.jpg https://multilinedesigns.com/wp-content/uploads/2018/02/IEC-...
- MisterTea 3y agoLadder is completely unknown in most of Europe. I think it's mostly ST (structured text) followed by fbd (function block diagram) or sfc (sequential flow chart). I'm not against st or c or whatever, I've done control programs in all of them. To me, Debugging ladder is awesome as most IDEs give you a live view of the io state and it's great to sit the laptop or computer cart by the machine and begin pressing switches and wiggling wiring/connectors to see what is not working and the ladder contacts light up when they go high. Simple fast visual debugging. We've incorporated some flow chart and ladder like io debug screens on our hmi's. Pop open the debug screen and see what isn't on and the association of inputs and the output condition they set. Mostly eliminates the need to drag around the computer.