
Consider the following situation: your supervisor calls you due to a problem on a production line. Most of your work as a PLC programmer is going to be looking at rungs of logic and figuring out why the output is energized or what’s preventing it from turning on. Now that you’re familiar with how circuit branches work in ladder logic, it’s important to practice tracing the logic as you would in the field. Ladder Logic PLC Programming Circuit Branch Advanced Example Advanced Circuit Branching Ladder Logic Practice It's not abnormal to find multiple branched circuits in ladder logic. Here's a much more complex example for you to consider.
Step 4 - The current reaches the OTE Instruction and sets the “Energize1” bit to ON (or HIGH). Since the “Condition3” bit is HIGH, the XIC evaluates to TRUE. The XIC Instruction tied to bit “Condition3” is executed. Step 3 - The hypothetical current goes back to the first branch. Since “Condition2” is set to 0, the XIC Instruction evaluates to FALSE. Step 2 - The hypothetical current flows to the next XIC Instruction and attempts to evaluate it. The XIC Instruction is TRUE and allows the current to proceed. As it reaches “Condition1”, it evaluates the XIC Instruction. Step 1 - The hypothetical current starts on the main branch of the rung. Let’s analyze what’s happening with the execution of the Logic. The rung above has the primary rung and a branch that jumps the first two conditions with a 3rd one. Ladder Logic PLC Programming Circuit Branch Example Step 4 - The PLC moves to the rung below. Repeats Step 2 until the rung is completed. Step 3 - The hypothetical current goes to the next instruction. If the XIC is False, the PLC aborts this rung. Step 2 - When the hypothetical current encounters and XIC Instruction, it checks if the condition is TRUE or FALSE. Step 1 - The hypothetical current starts moving from left to right. If they’re FALSE, the Output Energize instruction will set the bit to 0 (or LOW). Output Energize - This output instruction will set the specified bit to 1 (or HIGH) if the input instruction conditions are TRUE. While the bit is set to 0 (or LOW), the instruction will evaluate to FALSE. Each instruction has a set of conditions that make it TRUE or FALSE.įor the purpose of this tutorial, we’ll start with two of the most basic instructions in ladder logic plc programming: Examine if Closed and Output Energize.Įxamine If Closed - This input instruction will look at the specified boolean bit and evaluate the condition to TRUE when the bit is set to 1 (or HIGH). The Logic evaluates to TRUE when a hypothetical current is able to pass through the instructions. As the PLC begins to process the rung, it reads the instructions on the left and determines if the Logic on that side of the rung is set to TRUE. The PLC executes the program loaded into it one rung at a time. A boolean takes a single bit in the memory, can be set to 0 or 1, and is used in most basic PLC instructions.
In the programming world, this data type is called a boolean. Just like computers, PLCs operate with binary signals each one can be set to zero or one. In this post, we will go over ladder logic components, cover basic principles, and outline what it takes to master this programming language. Learning ladder logic is typically the entry point into a career in control systems as a PLC programmer. It’s easy to learn, mimics electrical circuits, and is easy to troubleshoot once deployed. Each rung of the ladder spans from left to right and is executed from top to bottom by the PLC.Īs mentioned above, ladder logic is extremely popular among PLC programmers. On the left side, ladder logic instructions are set as conditions, while the ones on the right side are instructions that are triggered if the conditions are met.
#Develop a documented ladder logic program to implement the motor control software#
Ladder Logic is labeled as such because the software is laid out in the shape of a ladder. As PLCs took over this process, it was essential to keep a similarity of the old system thus, ladder logic was created as the first PLC programming language. Relays were costly, required constant maintenance, and could not be easily reconfigured. Before Programmable Logic Controllers, manufacturing plants employed relay-based circuitry to energize different loads based on how the relays were wired together. Ladder Logic is one of the top 5 most popular types of PLC programming languages used in manufacturing environments.