Set/reset
This is a user-defined function from a system function block. SR_FUN (set/reset) allows you to both set and reset an output.
Input
Set
The output Q1 is set for each rising edge at Set
Reset
The output Q1 is reset for each rising edge detected at Reset, except when S1 is set (see time chart)
Input/output
Internal memory containing the internal values and states, which corresponds to the instance memory of the associated FB.
Output
Set or reset depending on inputs
set if a rising edge is detected at Set
reset if a rising edge is detected at Reset if Set is not set.
set if a rising edge is detected at both inputs (Set and Reset).
Upon initialising, Q1 always has the status zero (reset).