RSLogix 5000 OSR & OSF Bit Instructions – Complete Guide with Examples

Published on Aug 08, 2025 | Category: BIT

Share this Page:

The OSR (One Shot Rising) and OSF (One Shot Falling) instructions in RSLogix 5000 are special bit instructions used to detect quick signal changes. OSR activates for one scan when a signal changes from OFF to ON, while OSF activates for one scan when a signal changes from ON to OFF. They are perfect for preventing repeated actions in PLC programs.

On this page, we’ll explore how OSR and OSF work, when to use them, and how they fit into real-world automation tasks. You’ll see ladder logic examples, practical PLC applications, and tips for combining them with other instructions like timers and counters.

By the end, you’ll clearly understand the differences between OSR and OSF, know the best situations to use each, and be able to create more precise, event-driven control logic in your RSLogix 5000 projects.

What is OSR (One Shot Rising) in RSLogix 5000?

The OSR (One Shot Rising) instruction in RSLogix 5000 is a special bit instruction that turns ON its output for only one program scan when the input changes from OFF (0) to ON (1). This is useful for triggering actions a single time per event, even if the input signal stays active.

How OSR Works

The OSR instruction uses two key elements: the Storage Bit and the Output Bit.

Execution Behavior

In short, the OSR instruction detects the moment an input turns ON and creates a one-scan pulse on its output. This pulse can then be used to perform actions exactly once per activation, avoiding repeated triggers.

Example: Using OSR to Count Rising Edge Events Without a Counter

Below is an example of OSR being used to detect and count rising edge events in RSLogix 5000.

img/rslogix5000-bit/rslogix5000-osr-rising-edge-count-example.webp

In this example, we will use the OSR (One Shot Rising) instruction to detect how many times a signal changes from FALSE to TRUE, without using the built-in counter instruction. Instead, we will manually increment a tag value each time the rising edge is detected.

Tag Setup

Program Execution

  1. The OSR monitors Start_Signal. When it changes from FALSE to TRUE, the OSR sets Pulse_Output to TRUE for one program scan.
  2. Pulse_Output triggers an ADD instruction: Event_Count = Event_Count + 1, incrementing only once per signal change.
  3. On the next scan, Pulse_Output resets to FALSE until the next rising edge occurs.

How It Works

Each time Start_Signal turns ON from OFF, the OSR outputs a one-scan pulse to run the ADD instruction. This ensures Event_Count increases by 1 per activation, preventing multiple counts for the same signal.

What is OSF (One Shot Falling) in RSLogix 5000?

The OSF (One Shot Falling) instruction in RSLogix 5000 triggers its output bit for exactly one program scan when the rung-condition-in changes from TRUE to FALSE. In simple terms, it detects the falling edge of a signal and is useful when you want an action to happen only once when something turns OFF, rather than continuously while the signal remains OFF.

How OSF Works Internally

Common Uses of OSF

Example: Using OSF to Count Falling Edge Events Without a Counter

Below is an example of OSF being used to detect and count falling edge events in RSLogix 5000.

img/rslogix5000-bit/rslogix5000-osf-falling-edge-count-example.webp

The OSF (One Shot Falling) instruction in RSLogix 5000 is used to detect when a signal changes from TRUE to FALSE, and to trigger an action for just one scan. In this example, we will use OSF to count the number of falling edge events without using the built-in counter instruction.

Tag Setup

Program Execution

  1. The OSF monitors Stop_Signal. When it changes from TRUE to FALSE, the OSF sets Pulse_Output to TRUE for one program scan.
  2. Pulse_Output triggers an ADD instruction: Event_Count = Event_Count + 1, incrementing only once per signal change.
  3. On the next scan, Pulse_Output resets to FALSE until the next falling edge occurs.

How It Works

Each time Stop_Signal turns OFF from ON, the OSF outputs a one-scan pulse to run the ADD instruction. This ensures Event_Count increases by 1 per falling edge, preventing multiple counts from the same signal change.