Name :Set/reset triggers

Symbol:SR

Illustrate:

        You can use the Set Reset Trigger command to set or reset the number of operands based on the signal state of input S1 and R1. If the signal status of input S1 is "1" and the signal status of input R1 is "0", then the specified operand is set to "1". If the signal status of input S1 is "0" and the signal status of input R1 is "1", the specified operand is reset to "0".
        Input S1 takes precedence over input R1. When the signal status of input R1 and S1 is "1", the signal status of the specified operand is set to "1".
        If both inputs S1 and R1 have a signal status of "0", the command will not be executed. Therefore, the signal state of the operand remains the same.
        The current signal status of the operand is transmitted to output Q1 and can be queried there.

Image:

Parameter:

Parameter | Statement | Type | Description
--- | --- | --- | ---
S1 | Input | BOOL |
    Enable set
R1 | Input | BOOL |
    Enable reset
Q1 | Output | BOOL |
    The signal status of the operand

Example:

LD:

ST:

SR_inst1(S1 := TagIn1, R1 := TagIn2, Q1 => TagOut);

Interpretation:

    When one of the following conditions is met, the "TagOut" operation is asserted:
    ●The signal status of the operand "TagIn1" is "1", and the signal status of the operand "TagIn2" is "0".
    ●The signal status of the operands "TagIn1" and "TagIn2" is "1".
    The operand "TagOut" is reset when the following conditions are met:
    ●The signal status of the operand "TagIn1" is "0", and the signal status of the operand "TagIn2" is "1".