Back to tutorials
Beginner

PLC Programming Fundamentals – OSR Instruction

By
Vladimir Romanov
|
July 20, 2018
Table of Contents

Introduction

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

Outcome:
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

Got a question or comment?

Related Tutorials

Beginner

Opto 22 groov RIO Getting Started

The groov RIO module from Opto 22 has been released only a few months ago. The groov RIO is a feature packed piece of hardware that is easy to install, configure and deploy for many different field applications. The module comes pre-loaded with an array of software tools used across the industry and is ready to hit the floor running out of the box. Furthermore, the module is equipped with user configurable input and output nodes that have the capability unlike anything else on the market.

August 2, 2020
|
By
Vladimir Romanov
Beginner

Micro800 PLC Programming Getting Started

The Micro800 Control Systems by Rockwell Automation provide a cost effective solution for small to medium automation systems. The controllers within this family are typically used on stand alone machines or small process applications. The family offers five distinct controller types that are further customizable through add-on modules: Micro810, Micro820, Micro830, Micro850 and Micro870.Micro800 Programmable Logic Controllers Getting StartedUnlike the other Rockwell Automation controllers, this line of PLCs is programmed through a dedicated software: Connected Components Workbench. From within this tool, the programmer can flash the firmware, load the program and monitor the state of the controller. Furthermore, Connected Components Workbench (CCW) is often used to program other non-PLC Rockwell Automation devices such as Variable Frequency Drives (VFDs) and certain Safety Relays.

July 26, 2020
|
By
Vladimir Romanov
Beginner

An Introduction to DeviceNet Industrial Networks

In this tutorial you will learn about the DeviceNet industrial network, go over a basic offline configuration, and explore some advanced features.

July 24, 2020
|
By
Jacques Venter