The Latching Relay node sends 1 to the output when the Set input is set to 1 and sends 0 to the output when the Reset input is set to 1.
When both Set and Reset are equal to 0, the previous state of the output is maintained.
The Behaviour property determines which input must be dominant when both Set and Reset are equal to 1.
Behavior of node when Set input is dominant
Behavior of node when Reset input is dominant
| Connector | Type | Description |
|---|---|---|
| Set | Input | Sets the output to 1 when activated. |
| Reset | Input | Resets the output to 0 when activated. |
| Output | Output | Current latched state of the node. |
| Property | Description |
|---|---|
| Behaviour | Defines which input is dominant when Set and Reset are both equal to 1. |
The Latching Relay node stores its output state until a new command changes it.
Its basic behaviour is:
This means that the node acts as a memory element.
When both inputs are equal to 0, the output does not change.
The node keeps the last valid state that was previously set or reset.
The behaviour of the Latching Relay depends on the values of Set and Reset.
When only one of the two inputs is active, the behaviour is always the same:
| Set | Reset | Output |
|---|---|---|
| 0 | 0 | Maintains previous state |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | Depends on Behaviour |
The last case depends on whether Set or Reset is configured as dominant.
If the Behaviour property is configured so that Set is dominant, when both inputs are equal to 1 the output becomes:
1
The complete logic is therefore:
| Set | Reset | Output |
|---|---|---|
| 0 | 0 | Maintains previous state |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 1 |
This configuration gives priority to activation.
If the Behaviour property is configured so that Reset is dominant, when both inputs are equal to 1 the output becomes:
0
The complete logic is therefore:
| Set | Reset | Output |
|---|---|---|
| 0 | 0 | Maintains previous state |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 0 |
This configuration gives priority to deactivation.
Assume the following sequence:
| Event | Set | Reset | Output |
|---|---|---|---|
| Initial condition | 0 | 0 | 0 |
| Activation command | 1 | 0 | 1 |
| Inputs return idle | 0 | 0 | 1 |
| Reset command | 0 | 1 | 0 |
| Inputs return idle | 0 | 0 | 0 |
The example shows that the node keeps its state even when both inputs return to 0.
Assume that the node is configured with:
Behaviour = Set dominant
and the current output state is 0.
If both Set and Reset become 1 at the same time, the resulting output is:
1
because the Set input has priority.
Assume that the node is configured with:
Behaviour = Reset dominant
and the current output state is 1.
If both Set and Reset become 1 at the same time, the resulting output is:
0
because the Reset input has priority.
The Latching Relay node is useful whenever a command must be memorized until a separate command changes it.
Typical applications include:
The Latching Relay node can be tested using the Logic Module simulation tools.
A typical test procedure is the following: