Set Dominant (SETD)

The SETD instruction uses Set and Reset inputs to control latched outputs. The Set input has precedence over the Reset input.
The Set Dominant instruction uses the Set and Reset input parameters to control latched output parameters Out and OutNot. The Set input has precedence over the Reset input.
Out will be latched true whenever the Set input parameter is set true. Setting the Reset parameter to true will set Out to false only if the Set input is false. OutNot will be set to the opposite state of Out.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
Structured Text
SETD(SETD_tag);
Operands
Structured text
Operand
Type
Format
Description
SETD tag
DOMINANT_SET
structure
SETD structure
See Structured Text syntax for more information on the syntax of expressions within structured text.
DOMINANT_SET Structure
Input Parameter
Data Type
Description
EnableIn
BOOL
Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
Set
BOOL
Set input to the instruction.
Default is cleared.
Reset
BOOL
Reset input to the instruction.
Default is cleared.
Output Parameter
Data Type
Description
EnableOut
BOOL
Indicates if instruction is enabled.
Out
BOOL
The output of the instruction.
OutNot
BOOL
The inverted output of the instruction.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Structured Text
Condition/State
Action Taken
Prescan
EnableIn and EnableOut bits are cleared to false.
Normal Execution
EnableIn and EnableOut bits are set to true.
The instruction executes.
Postscan
EnableIn and EnableOut bits are cleared to false.
Example
When Set is true, Out is set true. When Set is false and Reset is true, Out is cleared. The Set input has precedence over the Reset input. The SETD instruction sets OutNot to the opposite state of Out.
Structured Text
SETD_01.Set := set_input;
SETD_01.Reset := reset_input;
SETD(SETD_01);
out_output := SETD_01.Out;
outNot_output := SETD_01.OutNot;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal