OSR (one shot rising)

The OSR instruction detects a rising edge of a Boolean variable. The OSR block sets output Q for one cycle when input CLK toggles from cleared to set (a rising edge is detected at input CLK).
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
OSR
OSR
OSR parameters
Parameter
Parameter Type
Data Type
Description
CLK
Input
BOOL
Any Boolean variable.
  • TRUE: Rising Edge detected, set Q to TRUE.
  • FALSE: No Rising Edge detected, set Q to FALSE.
Q
Output
BOOL
  • TRUE: When CLK is TRUE.
  • FALSE: In all other cases.

OSR examples

OSR function block diagram example
OSR function block diagram example
OSR ladder diagram example
OSR ladder diagram example
OSR structured text example
OSR structured text example
Results
Results
(* ST Equivalence: OSR1 is an instance of an OSR block *) OSR1(cmd); nb_edge := ANY_TO_DINT(OSR1.Q) + nb_edge;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal