![a single rung of a ladder logic program is arranged with a single rung of a ladder logic program is arranged with](https://media.cheggcdn.com/media/ff2/ff2caa7b-739b-4078-ac6e-87cb689c005d/phpqmuEmc.png)
![a single rung of a ladder logic program is arranged with a single rung of a ladder logic program is arranged with](https://blog.jonasneubert.com/assets/2019/2019-10-29-ladder-logic-slide-terminology.png)
In modern PLC systems, each discrete input channel has a tag name created by the programmer which is applied to the contact(s) within the program. In legacy PLC systems, each discrete input channel has a specific address which must be applied to the contact(s) within that program. Each contact in a Ladder Diagram PLC program represents the reading of a single bit in memory, while each coil represents the writing of a single bit in memory.ĭiscrete input signals to the PLC from real-world switches are read by a Ladder Diagram program by contacts referenced to those input channels.
![a single rung of a ladder logic program is arranged with a single rung of a ladder logic program is arranged with](https://electrical-engineering-portal.com/wp-content/uploads/2017/06/simple-relay-layouts-schematics.png)
Contacts and coils are discrete programming elements, dealing with Boolean (1 and 0 on and off true and false) variable states. The most elementary objects in Ladder Diagram programming are contacts and coils, intended to mimic the contacts and coils of electromechanical relays. This is especially true when the program’s status is viewed remotely over a computer network, allowing maintenance staff to investigate system problems without even being near the PLC! Contacts and coils Not only is status highlighting very useful in de-bugging PLC programs, but it also serves an invaluable diagnostic purpose when a technician analyzes a PLC program to check the status of real-world input and output devices connected to the PLC. Otherwise, the Ladder Diagram is nothing more than black symbols on a white background.
A single rung of a ladder logic program is arranged with software#
The output value of the math instruction box happens to be 2400, also shown in red text.Ĭolor-highlighting of Ladder Diagram components only works, of course, when the computer running the program editing software is connected to the PLC and the PLC is in the “run” mode (and the “show status” feature of the editing software is enabled). Likewise, the current count values of timers T2 and T3 are shown as 193 and 0, respectively. By contrast, each normally-open T3 contact is uncolored (since coil T3 is unpowered) while each normally-closed T3 contact is shown colored to indicate its conductive status. Correspondingly, each normally-open T2 contact appears colored, indicating its “closed” status, while each normally-closed T2 contact is uncolored. Another form of status indication seen in this PLC program is the values of certain variables in the PLC’s memory, shown in red text.įor example, you can see coil T2 energized at the upper-right corner of the screen (filled with light blue coloring), while coil T3 is not. Other instructions appear as rectangular boxes.Įach horizontal line is referred to as a rung, just as each horizontal step on a stepladder is called a “rung.” A common feature among Ladder Diagram program editors, as seen on this screenshot, is the ability to color-highlight those virtual “components” in the virtual “circuit” ready to “conduct” virtual “power.” In this particular editor, the color used to indicate “conduction” is light blue. Coils are somewhat different, appearing as either circles or pairs of parentheses.
![a single rung of a ladder logic program is arranged with a single rung of a ladder logic program is arranged with](https://dipslab.com/wp-content/uploads/2020/02/DipsLab.Com-image-and-feature-image.png)
Normally-open contacts are empty within the space between the line segments, while normally-closed contacts have a diagonal line crossing through that space. The following computer screenshot shows a typical Ladder Diagram program being edited on a personal computer:Ĭontacts appear just as they would in an electrical relay logic diagram – as short vertical line segments separated by a horizontal space. None of the contacts or coils seen in a Ladder Diagram PLC program are real rather, they act on bits in the PLC’s memory, the logical inter-relationships between those bits expressed in the form of a diagram resembling a circuit. Ladder diagrams are to be thought of as virtual circuits, where virtual “power” flows through virtual “contacts” (when closed) to energize virtual “relay coils” to perform logical functions. While Ladder Diagram programming has many shortcomings, it remains extremely popular and so will be the primary focus of this chapter.Įvery Ladder Diagram program is arranged to resemble an electrical diagram, making this a graphical (rather than text-based) programming language. This language was invented for the express purpose of making PLC programming feel “natural” to electricians familiar with relay-based logic and control circuits. This is a graphical language showing the logical relationships between inputs and outputs as though they were contacts and coils in a hard-wired electromechanical relay circuit. In the United States, the most common language used to program PLCs is Ladder Diagram (LD), also known as Relay Ladder Logic (RLL).