PLC Instructions

PLC Instructions Tutorials

PLC Programming Fundamentals - XIC Instruction

The XIC, also known as Examine If Closed, instruction is one of the fundamental instructions used in ladder logic programming for Programmable Logic Controllers (PLCs). This instruction is always found on the left side of a ladder rung and will verify if the specified bit is in a logic HIGH state. If that’s the case, the instruction will evaluate to true and allow the rest of the rung to execute.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting
Featured Tutorial

PLC Programming Fundamentals - XIC Instruction

The XIC, also known as Examine If Closed, instruction is one of the fundamental instructions used in ladder logic programming for Programmable Logic Controllers (PLCs). This instruction is always found on the left side of a ladder rung and will verify if the specified bit is in a logic HIGH state. If that’s the case, the instruction will evaluate to true and allow the rest of the rung to execute.

Vladimir Romanov
April 9, 2020
Featured Tutorial

PLC Programming Fundamentals – XIO Instruction

The XIO, also known as Examine If Open, instruction perform the function opposite to the XIC (Examine if Closed). It’s a fundamental instruction for working with Programmable Logic Controllers (PLCs). This instruction can be found on the left side of a ladder logic rung and will evaluate to true if the specified bit is set to a LOW state. If that’s the case, the instruction will allow the rest of the rung to execute.

Vladimir Romanov
April 9, 2020

PLC Programming Fundamentals - XIC Instruction

The XIC, also known as Examine If Closed, instruction is one of the fundamental instructions used in ladder logic programming for Programmable Logic Controllers (PLCs). This instruction is always found on the left side of a ladder rung and will verify if the specified bit is in a logic HIGH state. If that’s the case, the instruction will evaluate to true and allow the rest of the rung to execute.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Fundamentals – XIO Instruction

The XIO, also known as Examine If Open, instruction perform the function opposite to the XIC (Examine if Closed). It’s a fundamental instruction for working with Programmable Logic Controllers (PLCs). This instruction can be found on the left side of a ladder logic rung and will evaluate to true if the specified bit is set to a LOW state. If that’s the case, the instruction will allow the rest of the rung to execute.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Intermediate Instructions – TON | Timer On

The TON, also known as Timer ON, an instruction is used to keep track of time of occurrence of certain events. The conditions preceding the TON instruction will allow the timer to start counting up to a specified value. Once this value is reached, the program will set specific internal bits notifying the programmer as well as other instructions within the PLC that the timer has finished counting. Furthermore, experienced developers can leverage the instruction to know when a certain process is being executed.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Intermediate Instructions – TOF | Timer Off

The TOF, also known as Timer OFF, an instruction is used to keep track of time of occurrence of certain events. The conditions preceding the TOF instruction will allow the timer to start counting up to a specified value. Unline the TON Instruction, TOF will start counting when the preceding conditions are FALSE. Once this value is reached, the program will set specific internal bits notifying the programmer as well as other instructions within the PLC that the timer has finished counting. Furthermore, experienced developers can leverage the instruction to know when a certain process is being executed.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Intermediate Instructions – RTO | Retentive Timer

The RTO, also know as Retentive Timer, an instruction is used to keep track of time just like the TON Instruction. However, there is a key difference between the two. The TON instruction will automatically reset the accumulated time upon a transition from HIGH to LOW. The RTO will simply “pause” the accumulated value during this transition. In other words, the timer will retain the value it currently has until it is energized again or forced to reset. Due to this capability, it’s an excellent tool for a process which may be interrupted but needs to keep track of a continuous event. For example, you can easily create a timer which would allow a certain valve to only open for a certain duration even though it is stopped in between.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Intermediate Instructions – CTU | Count Up

The CTU, also known as the Count Up, instruction is used in pair with a Counter construct to count the number of LOW to HIGH transitions of the preceding logic. The CTU instruction will increment the “Accum” value each time the logic which leads into it is set to TRUE. Unline the Timer Instruction, the CTU will not keep incrementing until the rung is set to LOW and comes back to being HIGH. This critical element of ladder logic programming allows a programmer to keep track of how many products have passed a certain sensor, how many revolutions have been made by a certain motor, how many times a certain alarm was set and so on. It’s a widely used instruction which is extremely versatile and easy to work with.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Intermediate Instructions – CTD | Count Down

The CTD, also known as the Count Down, instruction is used to decrement the value of the counter associated with it. This instruction will detect a FALSE to TRUE transition of the logic leading to it and decrease the “Accum” value of the counter by 1. The effect of using this instruction is the exact opposite of what the CTU Instruction does to the counter. Just like its counterpart, this instruction will be found in a rung which will count a certain number of events. Due to the fact that it decrements the value, the use cases need to be very specific in order to be clear to the next programmer.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Comparison Instructions – NEQ | Not Equal

The NEQ, also known as the Not Equal, instruction is used to compare two values just like the EQU Instruction. However, the key difference is that the NEQ will return TRUE if the values are not equal to each other. In other words, the outcome of this instruction is the absolute opposite of what the EQU will give us.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Comparison Instructions – EQU | Equal

The EQU, also known as the Equal, instruction is used to compare two values. The EQU instruction is an input instruction which will return TRUE if the two values within “Source A” and “Source B” fields are equal to each other. If that condition is met, the instruction will allow what’s on the right of it to execute. The EQU will compare the two values and only evaluate to true is the two integers are equal. Should they become unequal, the instruction will update on the next PLC scan.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Fundamentals – OSR Instruction

Learn about One-Shot Rising instructions for Allen-Bradley PLCs

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Fundamentals – OSF | One Shot Falling | Instruction

The OSF, also known as One Shot Falling, instruction allows a programmer to create a scenario where an output is energized for a single scan when a transition from a logic HIGH to a logic LOW is detected on the input side of the instruction. The instruction allows an experienced programmer to capture key components based on such a transition and allow a one-time execution of particular bits of logic. This instruction can be found on the right side of a ladder logic rung and has two bits tied into it. One of these bits, labeled as “Output Bit”, can be used elsewhere in the code to energize other instructions when the OSF is enabled.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Fundamentals – ONS Instruction

The ONS, also known as the One Shot, instruction will allow the rung to execute once if the data leading to it is true. The instruction will not let the rung to evaluate again until the input is set back to LOW and then HIGH. The One Shot instruction is extremely useful when you need to execute a certain instruction once. A common example would be saving initial parameters of a process when it’s initialized. The ONS is found on the input side of a ladder logic rung structure.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Fundamentals – OTU Instruction

The OTU, also known as Output Unlatch, instruction will set a bit to LOW if all the conditions leading to it evaluate to true. This instruction is one of the fundamental instructions for Programmable Logic Controllers (PLCs), but it should be used with caution. This instruction will be found on the right side within a ladder logic structure and turn a bit to a LOW state if the preceding instructions evaluate to true.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Fundamentals – OTL Instruction

The OTL, also known as the Output Latch, instruction will force a single bit of logic into a high state if all the conditions leading to it are true. It’s a basic instruction which is powerful but can cause programmers a lot of grief if used improperly or too frequently. This instruction is found on the right side of a ladder logic rung and will switch a bit to a HIGH state once it executes. Unlike the OTE Instruction, the OTL will never turn the bit LOW. In order to make that happen, you can leverage other instructions that accomplish exactly that. That being said, the most common pairing with an OTL is an OTU (Output Unlatch).

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Comparison Instructions – LES | Less Than

The LES, also known as the Less Than, is an instruction used to compare two values against each other. The instruction takes two integers, floats or constants and will return TRUE if the value specified in “Source A” is less than the one in “Source B”. The “Source B” operand must be strictly less than the one specified in “Source A”. In other words, the instruction will return FALSE if they are equal.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Comparison Instructions – GRT | Greater Than

The GRT, also known as the Greater Than, is an instruction that compares two operands and evaluates if the value stored in “Source A” is greater than the value stored in “Source B”. If that’s the case, the instruction will evaluate to TRUE and allow the rest of the rung to execute. The GRT instruction may take integers, floats or constants as operands.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Comparison Instructions – LIM | Limit Test

The LIM, also known as the Limit Test, is an instruction which will compare the specified operand to two limits: lower limit and high limit. Should the value be greater than the lower limit and less than the higher limit, the instruction will set the output to TRUE. However, if the opposite is the case, the instruction will evaluate to FALSE. Furthermore, the reversal of the two limits will have the opposite logic effect on the instruction effectively resulting in a NOT of the original instruction.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Comparison Instructions – MEQ | Masked Equal

The MEQ, also known as the Masked Equals, is an instruction which will perform a similar function to the EQU (Equals) Instruction, with one key difference: a mask is applied to the compared bits. This instruction will take three operands: two which will be compared and a mask which needs to be applied. A mask is a key element of programming which boils down to selecting which bits need to be processed by the controller. In the case of the MEQ instruction, only the bits which have been masked as HIGH will be compared. Should those bits be the same within the two other operands, the instruction will evaluate to TRUE.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions

PLC Programming Computational Mathematical Instructions – ADD | Addition

The ADD, also known as the Addition, is an instruction which will perform a mathematical addition of two integers or floats. Performing an addition has a lot of uses in PLC programming. In addition to the obvious, it can be creatively used to create advanced functions such as step counters, average calculations and so on. The instruction takes three operands: two which will be added and one into which the result will be stored as the instruction executes.The ADD instruction is used all the time and is one of the most fundamental instructions of the Computational / Mathematical set. It’s something every programmer should be familiar with.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions

PLC Programming Computational Mathematical Instructions – SUB | Subtraction

The SUB, also known as the Subtraction, is an instruction which will perform a mathematical subtraction of two values which may be integers or floats. This instruction is used quite frequently in PLC programming and is one of the most fundamental mathematical operations. It can be used to calculate the difference between two sensor values, the deviation from a setpoint and much more. At its core, the instruction will evaluate the difference between the two values specified in “Source A” and “Source B” and store the resulting outcome in the “Dest” or the destination register.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Computational Mathematical Instructions – MUL | Multiply

The MUL, also known as the multiply, is an instruction which will perform a mathematical multiplication of two integers or floats. This mathematical instruction will be executed upon the registers specified in “Source A” and “Source B” and have the result stored within the register specified in the “Dest” field. This is a fundamental PLC instruction which is frequently used for scaling purposes. This need arises quite frequently when dealing with analog signals.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Computational Mathematical Instructions – MOD | Modulo

The MOD, also known as the modulo, is an instruction which allows the user to calculate the remainder produced by a division of two integers. This instruction is not frequently used in ladder logic programming but is very useful for calculating the remainder of a ratio, production excess, and several other parameters. The instruction takes three registers as operands. The first two are the dividend and the divisor. The result is stored in this third register which is labeled as the destination.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming Computational Mathematical Instructions – CPT | Compute

The CPT, also known as the compute, is an instruction which has extensive capabilities when it comes to mathematical and logic functions in ladder logic. This instruction allows the user to input a complex string of instructions composed of computational, operational and comparison functions and computes the result which is stored in the specified register. The instruction will work with operands used in the based instructions as well as many others.The CPT instruction has many advantages as well as drawbacks. Based on personal experience, you should only use this instruction if absolutely necessary and the same could not be achieved with several basic instructions. In other words, you can compute an ADD instruction through the CPT, but you shouldn’t.

Vladimir Romanov
April 9, 2020
Intermediate
PLC Instructions
Troubleshooting

PLC Interview Questions - Building a 2 Button Motor Starter System

There is a number of scenarios one can create to test PLC Programmers. One of the most simple, yet challenging for a beginner, questions is the famous motor starter. A simple system which utilizes two buttons and an output stumbles those who’ve little to no experience with PLCs. Furthermore, this question will reveal if the candidate asks the right questions, makes the correct assumptions and is able to reason through a simple assignment presented to him.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Interview Practice

PLC Programming Fundamentals – OTE Instruction

The OTE, also known as Output Energize, instruction will energize a single bit of data if the input leading to it is true. It’s a fundamental instruction used in Programmable Logic Controllers (PLCs). This instruction will be found on the right side within a ladder logic structure and turn a bit to a HIGH state if the preceding instructions evaluate to true. If the same instructions evaluate to false, the OTE instruction will set the specified bit to a LOW state.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Programming - Getting Started in RSLogix 500 & MicroLogix 1100 Programmable Logic Controller

Getting into Programmable Logic Controller (PLC) Programming can be stressful for a beginner. There aren’t many guides on how to get started and such guides are often convoluted and too complicated for a complete beginner.In this article, we will be exploring how you can get up and going in RSLogix 500 on a MicroLogix 1100 PLC. The reason for this software & hardware combination is that it offers a cost-effective way to get onto a robust platform which is used in many manufacturing facilities today. RSLogix 500 offers a free version of the software which can be used to practice most of the instructions used in most PLC platforms. A MicroLogix 1100 PLC is a legacy piece of hardware which can be purchased on eBay from 200$; extremely inexpensive for a PLC. Check out the PLC purchase guide here.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

User Defined Data Type [UDT] Tutorial - Explanation, Usage, Examples & Custom Definition in RSLogix 5000

User Defined Data Types or UDTs are commonly used in Programmable Logic Controller Programming in order to group data and maximize code reusability. This structure allows the user to combine any of the existing data types into a package which can be reapplied multiple types across the program, be exported and imported into other structures.

PLC Alarm Programming - Fault Capturing Example in Ladder Logic RSLogix 500 Allen Bradley

Alarms, Faults, and Warning play a critical role within every PLC Program. This logic allows the programmer to capture any abnormalities, alert the operator of a failure, and prevent system damage. Ultimately, this code is needed to make sure that equipment is brought to a safe condition after a critical failure.

Vladimir Romanov
April 9, 2020
Intermediate
PLC Instructions
Troubleshooting

PLC Programming Advanced Mathematical Instructions – SCP | Scale With Parameters

The SCP, also known as the scale with parameters, is an instruction which is commonly used for working with analog signals. It’s an instruction which can be utilized in ladder logic as well as function blocks. The instruction will take input, use input minimum & maximums parameters as well as outputs min/max parameters and convert the output scaling based on them.The primary reason as to why you’d want to utilize this instruction is the fact that analog data will typically be meaningless as it comes into the Programmable Logic Controller or Input Card. The reason being is that the 4-20mA or 0 to 10 VDC signal is generally scaled to the largest scale. On an RSLogix 500 based PLC, this is typically 16

Vladimir Romanov
April 9, 2020
Intermediate
PLC Instructions
Troubleshooting

PLC Alarm Programming - Advanced Alarm Capturing in Ladder Logic RSLogix 500 Allen Bradley

In a recent post, we’ve covered the importance of properly defining alarms, faults & warnings within a PLC routine. Although we went over the basics, an advanced practice would require us to go a step above what we’ve defined by implementing ladder logic which would capture the first fault which occurred. The purpose of this logic would be to notify the operator or engineer which fault came first as in many cases, an array of faults would be triggered after the first one.

Vladimir Romanov
April 9, 2020
Intermediate
PLC Instructions
Troubleshooting

PLC Forces Tutorial - Working with Forced Inputs, Outputs, Troubleshooting & Disabling Online Forces RSLogix

PLC Forces is an important tool which can be easily misused. It’s something with which you need to deal on a regular basis and something you should have in your toolkit as a competent PLC Programmer. The primary purpose of PLC Forces is to either enable or disable an input or output residing within the PLC Program. By doing so, the programmer can be certain that a certain input or output is energized or de-energized.

Vladimir Romanov
April 9, 2020
Intermediate
PLC Instructions
Troubleshooting

Add On Instructions Programming | AOI RSLogix / Studio 5000 PLC Programming Tutorial Example Logic

Add-On Instructions play a critical role in PLC programming. They give a programmer the ability to define custom instructions in order to maximize code reusability and simplify development. An Add-On Instruction or AOI is basically a function that is defined by the programmer and works in the same manner as the one provided by Rockwell.

Vladimir Romanov
April 9, 2020
Advanced
PLC Instructions
Troubleshooting

PLC Input Output Mapping / Buffering | IO Addressing Basics in RSLogix Studio 5000 Allen Bradley

One of the first tasks of PLC Programming is to properly map Inputs & Outputs. Although this task is fairly straightforward, many programmers either avoid it or implement it incorrectly due to their misunderstanding of it. IO Mapping or Buffering can help you in multiple ways. It allows one to contain all the primary input & output tags within a single program & easily manipulate them as needed. The necessity to manipulate may come from hardware failure or need to upgrade or expand the system. Furthermore, having these assets within a single program greatly reduces the time to troubleshoot and commission new systems.

Vladimir Romanov
April 9, 2020
Intermediate
PLC Instructions
Troubleshooting

PLC Sequencer Programming - Tutorial on SQI SQO Instructions in RSLogix 5000 Ladder Logic

Programming a Sequencer in Ladder Logic on a PLC is an advanced skill. It’s a technique which utilizes SQI and SQO instructions in order to create a sequence of events which is based on specific steps & allows the PLC to follow a prescribed sequence of events. Although the squencer isn’t something you’d expect to use on a regular basis, it’s an advanced technique which shines in specific applications.

Vladimir Romanov
April 9, 2020
Advanced
PLC Instructions
Troubleshooting

RSLogix 5000 Tag Structure - Creating Alias Tags for PLC Input Output Modules Point IO Studio 5000

Tag aliasing is a concept which is particularly important in RSLogix 5000. The reason is that most RSLogix 5000 based Programmable Logic Controllers (PLCs) aren’t able to save tag descriptions within their memory. If the program is lost & needs to be uploaded from the controller, it will be restored without a single description. However, if you’re working with Studio 5000 v21 or above, your PLC will most likely have the capability to store the descriptions you add into your program.

RSLogix PID Loop PLC Programming | Example of PID Control Instruction in Studio RSLogix 5000

A PID control loop is a critical function within many industrial processes. It gives an engineer the ability to control a certain process based on the feedback received from field devices. Although this concept has a very extensive control systems background & theory, we’ve come to a point where we can utilize a PLC-based instruction to control the system without worrying about all the details.

Vladimir Romanov
April 9, 2020
Advanced
PLC Instructions
Interview Practice

RSLogix 5000 Analog Input Programming | Wiring Scaling Tutorial for PLC Analog Input Signal Example

Analog PLC Inputs are crucial for modern control systems. They are utilized for pressure sensors, temperature sensors, weight-scales, flow meters, level transmitters & other devices which report a range rather than a simple ON/OFF signal. These devices typically send a 4-20mA or a 0-10VDC signal back to the main panel. At this point, the control system needs to provide an input capable of capturing this specific signal.

Vladimir Romanov
April 9, 2020
Advanced
PLC Instructions
PLC External Hardware

PLC Function Block Programming for Analog Input Scaling | FBD Tutorial in RSLogix 5000

Function Blocks are an essential programming tool in PLC programming. This method of programming allows the user to visual tie blocks of code together and utilize functions which aren’t available otherwise. Furthermore, certain PLC based logic components are much easier to implement and visualize in function blocks instead of ladder logic or structured text.

Vladimir Romanov
April 9, 2020
Advanced
PLC Instructions
PLC External Hardware

PLC Programming Tutorial | Allen Bradley Training in RSLogix 5000 Ladder Logic Basics for Beginners

PLC Programming is a highly desired skill in industrial automation. It’s what allows one to create a set of instructions in order to control different devices, pieces of machinery and entire manufacturing plants. However, there are multiple challenges when it comes to learning PLC programming: high complexity of the platforms, costly hardware & software costs as well as low availability of online materials.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Interview Practice

RSLogix Studio 5000 JSR JMP LBL Instruction | Navigating Routines PLC Programming Jump Control

PLC programs are executed sequentially. In other words, the PLC executes a rung before proceeding to the next one. Within a single rung, the PLC will execute each sub-branch before proceeding to the next one. A PLC programmer may choose to navigate between rungs in a non-sequential order as defined by the routine. In other words, using instructions such as JSR, JMP and LBL allows one to create an order which doesn’t follow the rung labels.

Vladimir Romanov
April 9, 2020
Beginner
PLC Instructions
Troubleshooting

PLC Interview Question - Array FIFO Logic Programming Example Average Rolling Mean RSLogix 5000

PLC Interviews aren’t very complex. Within a short period of time, you may be asked to implement a simple logical structure such as a Motor Starter, a stack light system or a basic FIFO set of rungs. By practicing implementing such structure, you will build your knowledge of PLCs, the software package of your choice and you’ll become a more proficient programmer.

Vladimir Romanov
April 9, 2020
Advanced
PLC Instructions
Interview Practice

What Next?