Back to tutorials

PLC Programming Fundamentals – OSR Instruction

Vladimir Romanov
July 20, 2018
Table of Contents


The OSR, also known as One Shot Rising, instruction allows a programmer to create a scenario where an output is energized for a single scan when a transition from a logic low to a logic high is detected on the input side of the instruction. The OSR is identical to the ONS in the performance. However, it does give the programmer slightly more flexibility due to a dedicated output bit. Furthermore, the instruction is also a lot more explicit. It resides on the right side of the ladder logic rung and allows the user to use its output tag where needed within the program.

Example & Usage of OSR

Here’s a real-world scenario of an OSR instruction:

  1. A Micrologix 1100 Allen Bradley PLC is used to control a process.
  2. A “Heating Process Start” status is tied to I:0/0.
  3. The F8:0 register is used to read the temperature of the process.
  4. The F8:1 register is used to store the initial temperature of the process.
  5. An OSR Instruction is tied to the output of the“Heating Process Start” XIC instruction.
  6. The “Output Bit” of the OSR instruction is used on an XIC instruction in rung “0001”
  7. Once the I:0/0 is pulled HIGH, the OSR is executed once.
  8. Once the OSR executes, the “Output Bit” is set to HIGH for one scan of the PLC.
  9. The MOV instruction moves the contents of the F8:0 register to the F8:1 register.

Programming example in RSLogix 500:

OSR One Shot Rising RSLogix 500 Example Usage

The OSR instruction is energized by the “Heating Process Start” condition. As soon as this condition is met, the “Output Bit” of the OSR is set to HIGH for a single scan of the PLC. During this scan, the bit allows the MOV instruction to energize through an XIC instruction. The MOV instruction transfers the contents of a register into another at the start of the process.

Data Types Allowed for OSR

The OSR instruction will work with the following data types within the RSLogix 500 environment:

  • Boolean – The OSR requires two bits to operate. One is called the “Storage Bit” and the other the “Output Bit”. The “Output Bit” should be the only one used outside of the instruction.

Important Notes

  • Note 1 – The OSR instruction requires two non-input boolean bit to function. The “Storage Bit” should not be used anywhere else in the program. The “Output Bit” should be used as a condition to execute other instructions.

Video Tutorial

Back to tutorials

Related Tutorials


HMI Software - Different Tools, Applications and Solutions to Meet Your Needs

HMI Software is commonly referred to as the development application that will be used to create the runtime application for an HMI terminal. It’s important to understand this distinction as we will be going over the HMI development environments used by PLC and HMI programmers to create the screens rather than the end-user applications you will see at the plant level.Numerous HMI programming software solutions are found on the market. Although they aim to achieve the same result, different packages have a distinct advantage over others in terms of price, reliability, ease-of-use and technical capability. It is therefore possible to find the right solution that will fit your specific application if you spend the time to research all options.

September 25, 2020
Vladimir Romanov

PLC Programming Example Project - Batching Tank Ladder Logic PLC and HMI Tutorial

Generally speaking, there are two types of processes in manufacturing: discrete and analog. A discrete process is a manufacturing methodology that will produce separate widgets. In other words, a production line may output one item, two items, three items, etc. An analog production process is where the plant will create a quantity of product that is quantifiable by weight. Examples include the production of beverages, sauces, raw ingredients, etc. Although it is possible to design a flow that will continuously output the product, such production is often managed in batches. It is important to note that although batches are considered to be analog or continuous flow, most of them end up being packaged for consumption which converts them into a discrete manufacturing process.

September 14, 2020
Vladimir Romanov
PLC Programming Career

PLC Programming Certification - Complete Guide

You may choose to pursue a traditional college degree, learn through online tutorials, or take a course that will issue a plc programming certification upon completion. However, what is the best option, and what are the best PLC programming certifications?

August 6, 2020
Vladimir Romanov