Ideas for Ladder Logic
- Like a real ladder, ladder logic requires moving one step at a time in calculated increments.a ladder image by timur1970 from Fotolia.com
Ladder logic is a form of programming that uses boolean equations to determine the appropriate steps or branches to take. In essence, every command follows after yes/no or true/false equations that either allow the command to be executed or go into a loop until the state becomes true. Programmers use ladder programming for high risk applications that stress timing and safety concerns, such as assembly lines and amusement rides. - Boolean logic applies math functions called operands to make decisions.binary numbers image by Photosani from Fotolia.com
Grand Valley State University explains that ladder logic deviates from boolean logic because boolean logic allows fuzzy solutions or branches using such logic manipulation as conditional NOT and extended OR evaluations. In ladder logic, each step is either yes, no or both. This is critical in high risk programming where fuzzy logic introduces potential missteps in the program performance.
Think of climbing a ladder. At each rung, you reach, you will have the right foot, the left foot, or both feet on the rung. Which one of these choices is true will determine how you proceed to the next step. Each progression depends on the preceding step in what information it can accept and how that information can be processed. - A row of dominoes forms an example of ladder logic when the first one is tipped.domino image by Wojciech Gajda from Fotolia.com
Standing dominoes up in a line and then tipping the first one over constitutes a simplified demonstration of ladder logic. As each tile falls, it creates a true or false equation where there is either another domino in front of it or not. Branches occur when the falling domino strikes two others, each pointed in a different direction. Each branch becomes its own subroutine and can function independently of what any other branches do. The dominoes do not attempt to make any other decisions: each one either strikes another or becomes a programming dead-end. - Elevator equipment uses ladder logic for timing and safety.Construction elevator ascending side of building. image by ryasick from Fotolia.com
A project developed by Penn State University uses a model elevator constructed from a DC motor, inexpensive materials and nine-step ladder logic programming that can cycle along a three-floor path. The first step is to make sure the door is clear before it closes and the elevator moves. The next step entails moving in the designated direction. Since the elevator should only stop at the proper door level, ladder logic checks the location of the elevator by the simple question of "Is there a door here?" before it allows the door to open. Similar checks take place at each floor, cycling through the queued commands. If someone has pressed the button for the second floor, then it will be true and the elevator will stop at that floor. - The introduction of computerized ladder logic makes factories safer and more efficient.Fabrik image by J??rgen Weidner from Fotolia.com
Assembly line production requires materials to appear at the right place when and how they are needed. If the machinery is out of time, it can disrupt the flow of the entire production line. To overcome this, ladder logic verifies that a part lies on the conveyor belt, faces the proper direction, and appears at precisely timed intervals. - Ladder logic is often used in applications where lives may be in danger.Color Roller Coaster image by Julie Balderston from Fotolia.com
Other examples of high risk programming might include the landing gear on aircraft, the launching of spacecraft and the common traffic light. In all three situations, the green light, or "go ahead," cannot activate until other requirements are met. Each new action determines those that follow.
Basics of Ladder Logic
Visual Logic: Dominoes
Ladder Logic and Elevators
Automated Production Logic
High Risk Programming
Source...