///// START OF VIDEO SCHEMA ///// ///// END OF VIDEO SCHEMA /////

What Are the Most Common Bit Instructions in Connected Components Workbench?

Learn the most common bit instructions in Ladder Diagram programming.
Common Bit Instructions - thumbnail
Listen to this article

In this article, I’ll introduce you to the most common instructions used in Connected Components Workbench.

By working through a practical example, I will show you what the instructions are and how they work.

Before we dive into the example though, I want to take one minute to introduce you to Connected Components Workbench.

Connected Components Workbench is the development environment for Allen Bradley Micro800 PLCs. Since it is free to download and includes a built-in simulator, Connected Components Workbench is an ideal development environment for learning PLC programming.

If you’re interested in learning how to program Micro800 PLCs with Connected Components Workbench, check out our PLC Programming from Scratch courses.

These courses teach you PLC programming with Connected Components Workbench from first principles and are included with all RealPars memberships.

Now that we know what Connected Components Workbench is, let’s quickly talk about the Ladder Diagram programming language and the most common Ladder Diagram instructions.

Principles of Ladder Diagram

Ladder Diagram is the most popular PLC programming language in use today. It is a graphical programming language that resembles electrical schematics.

Since it is a graphical language, it is relatively easy to write and troubleshoot, making it an ideal programming language for writing complex Boolean logic.

In Ladder Diagram, each line of code is called a rung because it resembles a rung on a physical ladder.

Ladder Diagram showing direct contact, reverse contact, and direct coil controlling a motor run output in a seal-in circuit.

Programming is done by adding instructions and program elements to a rung.

Some instructions are output instructions. Output instructions turn on outputs and write values to variables. These instructions go on the right-hand side of the rung.

Other instructions are input instructions. These instructions control outputs based on the value of variables.

Connected Components Workbench interface displaying a Ladder Diagram rung with input contacts and output coil for a Micro800 PLC.

The vertical rail on the left of the rung is called the power rail. When there is a logical path from the power rail through the input instructions, we say that there is logical continuity on the rung, and the outputs are turned on.

Connected Components Workbench showing a highlighted Ladder Diagram rung with logical continuity.

Instructions can be combined to create complex logic. In this example, the instructions placed in series create AND logic. With AND logic, all of the instructions in a set must evaluate to True for the output to turn on.

Connected Components Workbench Ladder Diagram rung demonstrating AND logic with inputs set to True for a Micro800 PLC.

We can also place instructions in parallel using branches to create OR logic. With OR logic, at least one instruction in a set must evaluate to True for the output to turn on.

Connected Components Workbench Ladder Diagram rung showing OR logic with a truth table for a Micro800 PLC project.

Branches create OR logic by providing an alternative path from the power rail to the output instructions.

Now that we know how Ladder Diagram works, let’s look at the instructions in this example and see how they work.

Direct Contact

The first instruction on the rung is called a Direct Contact instruction. A Direct Contact examines a Boolean variable and evaluates to True if the variable has the value True. Otherwise, it evaluates to False.

Connected Components Workbench showing Micro800 simulator, rung logic, and variable table with DI_Start_BTN set to True.

In this example, the Direct Contact instruction is examining the DI_Start_BTN variable. If this variable has the value True, then there is a logical path through the instruction towards the output instructions.

Reverse Contact

The next instruction on the rung is a Reverse Contact instruction.

This is another input instruction that is the exact opposite of a Direct Contact instruction. It evaluates to True if the variable it is examining has the value False. Otherwise, it evaluates to False.

Micro800 simulator rung logic in Connected Components Workbench with DI_Stop_BTN False and DO_Run_MTR True.

In this example, the Reverse Contact instruction is examining the DI_Stop_BTN variable. If this variable has the value False, then there is a logical path through the instruction towards the output instructions.

Direct Coil

The last instruction on the rung is a Direct Coil instruction.

A Direct Coil instruction is an output instruction. When there is logical continuity on the rung, the Direct Coil instruction writes the value True to a variable. Otherwise, it writes the value False to the variable.

Micro800 simulator in Connected Components Workbench showing rung logic with DO_Run_MTR set to True.

In this example, the Direct Coil instruction is controlling the DO_Run_MTR variable. If there is logical continuity on the rung, then the instruction writes the value True to the variable. Otherwise, it writes the value False to the variable.

Putting it together

In this example, the instructions have been combined to create complex Boolean logic.

The motor will run if the variable DI_Start_BTN is True and the variable DI_Stop_BTN is False. Once the motor starts running, it will continue to run when DI_Start_BTN is False because the branch seals in the logical continuity of the rung.

The motor will stop running when the stop button is pressed because the Reverse Contact instruction breaks the logical continuity on the rung.

This example is known as a seal-in circuit, and it is a very common design pattern in PLC programming.

Wrap-Up

In this article, I introduced the basic principles of the Ladder Diagram programming language and the most common bit instructions that are used in Ladder Diagram.

At this stage, you know what a Direct Contact, Reverse Contact, and Direct Coil are. You also know how they work and how they can be combined on a rung to create complex Boolean logic.

If you want to continue learning how to program PLCs in a free development environment, check out our PLC Programming from Scratch Courses.

By following these courses, you can learn PLC programming from first principles and excel as an automation professional.

If you're a plant manager looking to train your team, visit realpars.com/business. Just add your contact information, and our team will quickly get in touch to discuss how we can support your team's development.

FAQS

Frequently asked questions

How do Direct Contact instructions work in Ladder Diagram programming?
What is the function of Reverse Contact in Ladder Diagram programming?
How do Direct Coil instructions work in Ladder Diagram programming?
What is the purpose of using branches in Ladder Diagram programming?
What is the difference between AND and OR logic?

Learn from Industry Experts

Start your learning journey today!
With a 7-day trial, then 35/month
Start Learning for Free