Select Page

The easiest visual programming languages for controls is a called ladder logic or ladder diagram when it comes to a PLC programming language which is one of the best ones to learn because of the impact and the ability to have one of the best jobs or careers.

YOU DO NOT WANT TO MISS THIS ONE!

Ladder diagram systems are the best programming language to learn and the smart thing that the designers did was make it very similar to standard electrical circuits that used relays and act just like a single line diagram in some instances. If you happen to be in the electrical field already then you probably have experience with wiring relays or even reading prints for relay controls then learning logic will be extremely easy and make the process much faster.

Are you interested in a ladder logic tutorial?

I have put together a great reference to break down the process and prove this is your place to turn to learn everything you need to know about ladder diagram plc programming. After this tutorial, you will be able to start a plc program and understand what it takes to be successful so I highly recommend that you take a few online plc programming courses to better your growth leave you without a question, an expert in the industry.

Are you ready to get started?   Let’s get to it!

## PLC Programming for Beginners

This programming language is the simplest of the programming schemes but has also been known as a ladder diagram or LD for short, it has been come to be known as a primary name of ladder diagram logic instead of these multiple names. That is also what I will call it in this tutorial.

The main reason for the common name and everyone agreeing on this is basically because ladder by ladder the program is scanned and executed and the scheme of programming is to make logic work. Meaning, if you can think it then you can logically make it happen if the thought aligns with real-world logic.

Basically just a bunch on 1s and 0s or better known to be referenced as the binary decimal code.

Of course with RSlogix 5000 and Studio 5000 there is an understanding of how that binary code works which leads into setting up I/O cards no matter what plc brand you are using but in my examples I show RSlogix 5000 or Studio 5000 so here is a quick reference to set up and scale a PLC analog input card, with this said, ladder is made up of other I/O cards for inputs and Outputs which can be referenced in my Adding I/O in Studio 5000 program video but ladder diagram logic is mainly a to set for bits logic operations.

There is an organization that sets the standards for PLC ladder logic which is called PLCOpen, They have named a standard is called IEC 61131-3.

Well, even though we are talking about ladder examples, it would not be fair to act like this is the only plc programming language.

Here is a quick list of all the plc programming languages:

• Function Block Diagram
• Structured Text
• Sequential Function Chart

First, learning how to read the logic and that is easy as I said if you know how to read an electrical schematic then rung by rung and ladder by ladder, it flows the same way. A logic diagram is laid out from left to right and the operands are located on the right side of the screen just like an electrical schematic. We will be talking about the operands like OTE, OTL, OTU, XIC, and XIO a little later in this ladder logic tutorial and with that being said, reading the plc code is first to know about.

Is it easy to read? Yes….

In Rockwell software such as RSLogix 5000 or Studio 5000, they make reading the logic very easy by making a bit colored if active and not if not active. Generally, when the software is installed the default colors are green if active and not if not active. Note that some bits are used in the inverse function like the difference in an XIC or XIO instruction set.

You can draw it on paper first for ideas….

What has helped me in the past is to draw out the start off the logic on a plain sheet of paper to using as a scratch pad as in the examples I talked about, 15 years ago, I started learning PLC logic and when I did, I often compared it to standard relay logic so drawing it out helped me make sense of it and then it was just learning the software and the future belongs to Rockwell so, in my opinion, it is best to learn RSlogix 500, RSlogix 5000, and Studio 5000 but no worries.

We can help!

To start off, we have training modules designed for beginners and the advanced users as well but just to take some of that weight off your should, RSlogix 5000 and Studio 5000 are the same with minor differences so you really just need to learn RSLogix 500 and Studio 5000. Check out what we offer —-> Training Center Overview

There is an executive order of operation…

The last reason for drawing ladder diagrams horizontal is to set the order of execution. Order of execution is how the PLC will run your control logic. To be more precise in what order your logic instructions will be executed by the PLC. A PLC will always start at the top of your ladder diagram logic and then execute its way down

#### An XIC instruction

The first instruction for plc ladder logic that we are going to talk about is the examine if closed or better known as XIC which is an instruction that is active or true when the bit status is in a 1 state and not in a 1 state of the binary condition. Meaning, as we talked about earlier in this article a bit is binary and computer programming is binary so 1s and 0s and with that being said then when the bit transitions from a 0 to a 1. In the words of Rockwell, the XIC instruction examines the data bit to see if it is true.

• If the binary bit is true, rung condition out is set to true.
• If the binary bit is false, rung condition out is cleared to false.

#### An XIO instruction

Next, we talk about the counterpart to the XIC and this instruction is examine if open or better known as the XIO which is an instruction that is active when the bit status is in a 0 state instead of a 1 state of the binary condition. This instruction acts slightly different, in fact, acts in the opposite of the first instruction, in the software it is active when the binary status a 0. In the words of Rockwell, the XIO instruction examines the data bit to see if it is false.

• If the binary bit is true, rung-condition-out is cleared to false.
• If the binary Bit is false, rung-condition-out is set to true.

#### An OTE instruction

When it comes to watching bit states and their states, XIC and XIO are used in many different ways but as far as controlling bits and making them change states then you need to use an OTE instruction which is an outp