KB Controls is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Read more in our disclaimer

How to Add Bit Instructions to a Routine

A big thank you to our partners who keep this newsletter free to the reader:

Today's issue is brought to you by RealPars. RealPars provides high quality industrial automation courses at an affordable price. Join today for less than €20 a month and get access to RealPars full course catalog including courses for Siemens, Allen-Bradley, and CODESYS control platforms. For even more savings, the first 100 readers who use my discount code "kb-controls" get an additional 10% off the price of their membership.

I would also like to thank my second sponsor - you. If you are enjoying and getting value from Learn Logix then please consider using the Buy Me a Coffee widget on this page to support the newsletter.

In Studio 5000 Logix Designer, the actual application code is written in routines. In this edition of Learn Logix, we will see how to add bit instructions to a routine using three different techniques.

Let's start by opening the routine in our Logix Designer Project.

Open a Routine

In Studio 5000 Logix Designer, routines are located contained within programs and programs are contained in tasks. When we created our Logix Designer project, a routine called MainRoutine was automatically created for us. This routine is a part of the MainProgram program which is a part of the MainTask task.

To access the routine, we expand the Tasks folder of the Logix Designer project as shown here and double click on MainRoutine.

Tasks Folder

When you open a new routine, a rung is automatically added to the routine. Select the rung by clicking on the area to the left of the power rail as shown here.

Select Rung

Add an Instruction to a Routine with Drag and Drop

The most common way to add an instruction to a routine is by dragging the instruction from the Language Elements Toolbar and dropping it in the correct position on a rung.

The Language Elements toolbar is located above the routine and contains all of the instructions available for a programming language organized by category.

Bit level instructions are available in both the Favorites and Bit tab of the Language Elements Toolbar.

Bit Folder

Let's add an Examine On, also known as XIC, instruction to our routine.

To start, click and hold the XIC instruction icon

XIC Icon

Then drag the instruction into the routine. As you are dragging the instruction, valid positions where the instruction can be placed on the rung are shown as grey dots. When you hover your mouse over a valid position, the dot turns green to indicate where the instruction will be placed on the rung.

Entry Position

Once a position is shown in green, release your mouse to add the instruction to the routine.

Added Instruction

Add an Instruction to a Routine with a Single Click

You can also add an instruction to a routine by simply clicking on the instruction in the Language Elements toolbar. The instruction is automatically added to the right of the selected instruction on a rung.

Click to Add an Insruction

Add an Instruction to a Routine with the Insert Key

Finally, we can open a browser to search for a specific instruction using the Insert key.

To open the Add Ladder Element Browser, select an existing instruction and press the Insert key.

In the Add Ladder Element Browser dialog box, you can use the search bar to find a specific instruction, such as the OTE or Output Energize instruction. Once you have found the correct instruction, select it in the list and click OK.

Add Ladder Element Dialog

The instruction is added to the right of the selected instruction on the rung.

OTE Instruction

Wrap Up

In this tutorial, we learned how to add Bit instructions to a routine in Studio 5000 Logix Designer.

Although we focussed specifically on adding bit instructions to a routine, this same approach can be used to add almost any kind of instruction to a routine based on any programming language available in Studio 5000 Logix Designer.

When you're ready, I recommend that you learn more about PLC programming by following an affordable course based on free software.

PLC Programming From Scratch teaches you everything you need to know to be an intermediate PLC programmer by developing and testing the software for two industrial automation applications. By the end of the course, you will have two portfolio projects to discuss in interviews and you will know how to approach projects to design good PLC software.

Introduction to PLC Programming with CODESYS teaches you the fundamentals of PLC programming with CODESYS, a hardware independent PLC software development system that is becoming increasingly popular in industry.

Learn How to Program Logix 5000 PLCs

Learn how to write and test your first PLC program using Studio 5000 Logix Designer.

Learn More

PLC Bootcamp

Learn how to write, test, and simulate your first PLC program for free. No hardware or software required.

PLC Bootcamp

Connect with Me

LinkedIn Icon

Recent Posts

Related Content