Bistable instructions
308
Part II IEC Instructions
RS
Reset/set
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
For RS declare the following:
SET (S1) Set
The output Q is set for each rising edge at SET if RESET is not set.
RESET (R) reset
The output Q is reset for each rising edge at RESET.
Q (Q1) signal output
is set if a rising edge is detected at SET and if RESET is not set; is reset if
a rising edge is detected at RESET.
The names in brackets are the valid parameter names of the ST-editor.
Q is reset if a rising edge is detected at both inputs.
Time chart
PLC types Availability of RS (see page 1330)
Data type I/O Function
1st input Set
2nd input reset
BOOL
output set or reset depending on inputs
Description
The function block RS (reset/set) allows you to both reset and set an output.
Data types
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.