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

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.

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.

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.

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.

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.

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.

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.

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.

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.
Frequently asked questions
A Direct Contact checks a Boolean variable and evaluates to True if the variable is True.
A Reverse Contact works opposite to a Direct Contact, evaluating to True if the variable is False.
A Direct Coil writes a True or False value to a variable depending on the logical continuity of the rung.
Branches create OR logic, allowing an alternative path for logical continuity.
AND logic requires all conditions to be True for the output to be True, while OR logic requires at least one condition to be True for the output to be True.
Learn from Industry Experts
With a 7-day trial, then €35/month