Contents
Beginner

PLC Programming Fundamentals – ONS Instruction

By
Vladimir Romanov
|
July 20, 2018
Table of Contents

Introduction

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.

Example & Usage of ONS

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

  1. A Micrologix 1100 Allen Bradley PLC is used to control a process.
  2. The F8:0 register is used to read the temperature of the process.
  3. The F8:1 register is used to store the initial temperature of the process.
  4. A “Process Running” status is tied to I:0/0
  5. An ONS instruction is built using the B3:0/0 bit.
  6. The process is started and I:0/0 bit is set to HIGH.
  7. The ONS allows the MOV instruction to execute.
  8. The MOV instruction moves the contents of the F8:0 register to the F8:1 register.
  9. While the process is running, the MOV does not execute.

Programming example in RSLogix 500:

ONS One Shot Instruction RSLogix 500

Outcome:
The ONS instruction allows a single transfer of temperature when the process is initialized. Without an ONS, the temperature would keep transferring continuously.

Data Types Allowed for ONS

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

  • Boolean – The ONS does not evaluate the bit tied to it but does require a Boolean to work with.

Important Notes

  • Note 1 – The ONS instruction requires a non-input boolean bit to function. This bit should not be used anywhere else in the program.
  • Note 2 – The ONS instruction should only be used in cases where an instantaneous execution is required. It should not be used in conjunction with OTL and OTU instructions to create loops which could be avoided and simplified through simpler instructions.

Video Tutorial

Got a question or comment?

Related Tutorials

Beginner

How to Build an Allen Bradley PLC Trainer Kit for PLC Training at Home

The best way to learn PLC programming is to get hands-on experience. However, as many are trying to learn how to program these devices before landing a job, it becomes crucial to invest in your own hardware in order to accelerate the learning process. That being said, a PLC programmer will face three challenges when it comes to building an effective PLC trainer.

April 10, 2020
|
By
Vladimir Romanov
Beginner

Photo Eye Sensor | How to Wire a Photoelectric Sensor into a CompactLogix Allen Bradley PLC

Learn how to work with photoelectric sensors, understand the basics, how to wire them, how to tie them into various PLCs and field devices and lastly how to troubleshoot them.

April 24, 2020
|
By
Vladimir Romanov
Beginner

PLC Programming | How to Read Ladder Logic

Learn the basics of Ladder Logic, one of the top 5 most popular types of PLC programming languages used in manufacturing environments.

April 7, 2020
|
By
Vladimir Romanov