SAH: Detecting and holding a rising edge
Original instructions
Function description
The function block passes the input value PV to the output OUT the first time it is called. With a rising edge (0 to 1) on input CLK, the input value IN is pased on to output Output. This value remains on the output until the next rising edge loads a new value from IN to OUT.
The data types for the input values IN, PV and the output value Output must be the same.
EN and ENO can be configured as additional parameters.
Note
If a variable and a link are connected to OUT and the variable Output is changed (e.g. by writing through the program or by forcing), the link follows the Output variable instead of keeping the last output of the SAH.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL SAH_Instance (IN:=InputValue, CLK:=ClockInput, 
    PV:=PresetValue, OUT=>Output)
Representation in ST
Representation:
SAH_Instance (IN:=InputValue, CLK:=ClockInput, 
    PV:=PresetValue, OUT=>Output) ;
Parameter description
Input parameter description:
Parameter
Data type
Meaning
IN
Input value
CLK
Clock input
PV
ANY
Presetpoint
Output parameter description:
Parameter
Data type
Meaning
OUT
ANY
Output value