Ladder Logic Symbols | PLC Programming in RSLogix 5000 Studio Allen Bradley
April 8, 2020
What are the Ladder Logic Symbols?
Ladder Logic is one of the most common PLC programming languages. The standards of the language are well documented by the International Electromechanical Commission (IEC) in the exhibit 61131-3. However, official documentation of the ladder logic symbols isn’t easy to digest and doesn’t provide concrete examples of each one.
Ladder Logic symbols are foundational elements that are memorized by every plc programmer. They’re essential to know if you plan to do any work with this PLC programming language.
In this tutorial, we will discuss each symbol, the functionality it brings to the ladder logic plc programming language as well as illustrate two examples where they may be used.
Normally Open (NO) Contact / Examine if Closed (XIC)
The most fundamental symbol of ladder logic programming is the Normally Open Contact or the Examine If Closed XIC Instruction. This symbol was created as a direct reapplication of the relay-based contact used in early electrical drawings.
How does the Normally Open Contact Work?
Initially, the contact was tied to a coil of an electrical relay. When the coil of the relay was energized, the contact would close. The ladder logic symbol operates in the same way. It will specify a logical bit that can be set to 0 (LOW) or 1 (HIGH). Based on the state, the instruction will either evaluate to TRUE or FALSE. If the instruction is TRUE, it will let the current through and allow the PLC to evaluate the next instruction. If it’s FALSE, the ladder logic symbol will stop the execution there.
Practical Application of the Ladder Logic Symbol - NO Contact / XIC
The Normally Open Contact symbol is prevalent in ladder logic. It’s the most basic logical check for most conditions in PLC programming.
1. Verification of an Input
The rung above is using the Normally Open Contact to verify the “PointIORack1:1:I.0” input. If the input is energized (HIGH), the condition indicates that the “Box Counter Photo Eye - No Box” is turned ON. In other words, there’s no box in front of the Photo-Eye present on the line.
2. Count Up Condition
The rung above is using the Normally Open Contact to enable the “BoxCounter” CTU instruction. Each time that the NO Contact transitions from LOW to HIGH, the counter will increment by 1. As shown in the rung, the counter has counted ten boxes and is now set to the .DN (Done) condition.
Normally Closed (NC) Contact / Examine if Open (XIO)
The opposite of the Normally Open Contact is the Normally Closed. This validation will look at the specified bit and evaluate to TRUE when the bit is de-energized and FALSE when it’s energized. The application would allow the user to check if the coil of the specified bit is de-energized and take appropriate action in ladder logic PLC programming.
How does the Normally Closed Contact Work?
The normally closed contact would also be tied to the coil of a solid state relay. When the coil has no current running through it, the contact would let current to flow through. However, when the coil would be energized, no current would flow through the contact. The NC Contact or the XIO instruction in PLC programming ladder logic would work the same way. In other words, the bit would allow the current to flow through when it’s LOW and no current would flow through when the bit is HIGH.
Practical Application of the Ladder Logic Symbol - NC Contact / XIO
The XIO is very common in the ladder logic plc programming language. It’s an instruction that allows us to examine the OFF state of a bit as described above. Here are two common examples of where this instruction is used.
1. Stop Button Condition
The rung above incorporates the normally open and normally closed ladder logic symbols. It creates a condition that will energize the GREEN_LIGHT_ON bit when the “START_PRESSED” is energized. However, the XIO is tied to two bits: STOP_PRESSED and RESET_PRESSED. When either one of these conditions is set to HIGH, the “GREEN_LIGHT_ON” bit will be set to LOW during the rung evaluation cycle.
2. Timer Continuous Latch
The rung above will allow the Timer to operate based on the HMI_Rotation_Enable condition. However, a typical timer would count until it reaches the “Preset” value. In the rung above, the timer will reset once the timer is set to .DN (Done) due to the XIO being tied to the same bit of the timer.
Output Energize (OTE)
When certain conditions are met, the system should take a certain action. Unlike the two symbols above, the output energize will be used to execute an action. Within the scope of an electrical diagram, this symbol would indicate that a coil of a relay needs to be energized when conditions are met.
How does the Output Energize Symbol Work?
The output energize ladder logic symbol will change the state of a bit based on the conditions specified on the left side of the rung. When the conditions are TRUE leading to the OTE instruction, the value of the specified bit will be set to HIGH or 1. When the conditions are FALSE, the OTE instruction will set the value of the same bit to LOW or 0.
Practical Application of the Ladder Logic Symbol - Output Energize
The OTE instruction is very common in ladder logic applications. As mentioned above, it’s used to drive outputs based on certain conditions. This translates to operating external PLC hardware such as relays, motor contactors, valves, cylinders, etc. By energizing the bit that is tied to the output, a PLC programmer can change the state of the output to the desired position.
1. Turn ON Light / Output
In the rung above that we’ve already seen, the output is energized when the conditions are met. The “GREEN_LIGHT_ON” bit is tied to an output of the PLC that will turn on an LED in the field. By using the Output Energize (OTE) Instruction, the PLC programmer will turn ON the light on the plant floor.
2. Set the System to Faulted State
The following rung verifies one faulted condition: System 1 - Fault. When the system is faulted for that specific reason, the “RPiS_BOOL” bit will be set to HIGH through the Output Energize (OTE) Instruction. Once the system is no longer faulted, the faulted status will remain ON until the Reset button is energized and validated through the XIO condition. The Reset will allow the OTE instruction to clear the bit and set the faulted state back to LOW.
Output Latch (OTL)
The Output Latch ladder logic symbol is not something that can be created with relay based logic. This instruction will permanently keep a bit set to 1 when the condition holds.
How does the Output Latch Symbol Work?
The output latch instruction will execute only when the preceding conditions are TRUE. If they are, the instruction will set the bit associated with the OTL to HIGH (1). If the bit is set to 1 or the conditions are no longer true, the bit will remain HIGH (1). This difference is important as the Output Energize (OTE) will set the bit back to 0.
Practical Application of the Ladder Logic Symbol - Output Latch
The OTL instruction is not commonly used in ladder logic programming. The reason is mentioned above: the instruction will not automatically reset the bit back to 0. This minor difference leads to code confusion and potential issues when it comes to executing, changing or evaluating conditions after implementation.
1. Fault Latching
As we discussed before, faults play a critical role in PLC programming. It’s important to properly detect, act upon and identify the faults occurred within the system. Once they occur, the user will throw the faults to the operator in order to troubleshoot. For that reason, it’s important to keep the faults in place until the system is audited and reset when deemed operational.
The rung above displays a condition in which we are required to clear a fault on a variable frequency drive PowerFlex 525. Once the fault is latched, the motor is kept in a faulted state while a separate routine takes care of safely stopping the drive. The OTL will set the bit to HIGH and wait until the fault is reset.
2. Condition Setting
In the rung above, the OTL instruction is used to open the valve of the riser. Although this could have been achieved through an output energize (OTE) instruction, we’ve decided to use the OTL due to a number of conditions that may set the bit RiserBOOL to HIGH. Note that this routine also contains the OTU that will reset the bit back to LOW as needed by the PLC programmer.
Output Unlatch (OTU)
The Output Unlatch ladder logic symbol is often used in conjunction with the OTL. It’s a way to create a disable of the bit specified within the logic of the controller.
How does the Output Unlatch Symbol Work?
The output unlatch instruction will execute only when the preceding conditions are TRUE. If they are, the instruction will set the bit associated with the OTU to LOW (0). If the bit is set to 0 or the conditions are no longer true, the bit will remain LOW (0).
Practical Application of the Ladder Logic Symbol - Output Unlatch
The OTU instruction will have to be used with the OTL in order to reset the bit back to LOW as discussed above. Therefore, this instruction will be always found whenever the OTL is used. Let’s examine the same two examples, as we saw above.
1. Fault Latching
In the rung above, once the fault is cleared through the Reset_PB XIC instruction, the fault is unlatched using the OTU instruction. Notice that the unlatch is within the same branch as the PF1:O.ClearFaults instruction that will be energized once the reset is set.
The five most used ladder logic symbols are as follows: Normally Open Contact, Normally Closed Contact, Output Energize, Output Latch and Output Unlatch. These five instructions are commonly used in ladder logic for bit manipulation. The first two are conditional instructions that will allow the current to flow depending on the status of the bit. The last three are output instructions that will execute if the logic leading to them is TRUE. They will set the bit to either 0 or 1 depending on the instruction used.