The Latch block holds a binary value until you command it to reset. Latch blocks help capture rapidly changing binary states that might otherwise be missed. The Input of the Latch block is a binary attribute, sampled every time the logic system runs (every 5 seconds). Use an Attribute Reference block to create the Input for Latch.
Reset determines if the Output of the block changes with a change in the value of the Input. When Reset is True, the Output of the Latch block stays its original value, even if the Input changes value. Reset is also a binary attribute. To change the value of Reset, double-click the binary attribute block in View Mode and issue an Inactive or Active command.
This table translates the value of the Input or Reset binary attribute into True and False values for the Latch block:
Binary Attribute Value |
Command/State |
True or False |
---|---|---|
1.0 |
Active |
True |
0.0 |
Inactive |
False |
The following table and figure summarize the operation of the Latch block:
Input |
Reset |
Output |
---|---|---|
Goes from False to True |
False |
True Even if the Input goes to False, the Output stays True as long as Reset is False. |
Goes from False to True |
True |
False |
Goes from True to False |
False |
True Even if the Input goes to True, the Output stays False as long as Reset is False. |
Goes from True to False |
True |
False |