One Shot (ONS)

This information applies to the
CompactLogix
5370,
ControlLogix
5570,
Compact GuardLogix
5370,
GuardLogix
5570,
Compact GuardLogix
5380,
CompactLogix
5380,
CompactLogix
5480,
ControlLogix
5580, and
GuardLogix
5580 controllers.
The One Shot (ONS) instruction makes the remainder of the rung true each time rung-condition-in transitions from false to true.
Available Languages
Ladder Diagram
Operands
IMPORTANT: Unexpected operation may occur if:
  • Output tag operands are overwritten
  • Members of a structure operand are overwritten
  • Except when specified, structure operands are shared by multiple instructions.
Ladder Diagram
Operand
Data Type
Format
Description
Storage bit
BOOL
tag
Internal storage bit.
Retains the rung-condition-in from the last time the instruction was executed.
There are various operand addressing modes possible for the storage bit, see Bit Addressing for examples.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State
Action Taken
Prescan
The storage bit is set to true to prevent an invalid trigger during the first scan.
Rung-condition-in is false
The storage bit is cleared to false, rung-condition-out is cleared to false.
Rung-condition-in is true
See ONS Flow Chart (True).
Postscan
N/A
ONS Flow Chart (True)
onsFlowChart
Example
Ladder Diagram
In this example, the sum increments each time limit_switch_1 goes from false to true.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.