Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 471
Program Control Instructions (JMP, LBL, JSR, RET, SBR, JXR, TND, MCR, UID, UIE, AFI, NOP, EOT, SFP, SFR, EVENT) Chapter 11
Arithmetic Status Flags: Not affected
Fault Conditions: None
Execution:
Example: When an error occurs (error_bit is on), the FSC instruction checks the error code
against a list of critical errors. If the FSC instruction finds that the error is critical
(error_check.FD is on), an alarm is annunciated. The UID and UIE instructions
prevent any other tasks from interrupting the error checking and alarming.
Relay Ladder
Structured Text
UID();
<statements>
UIE();
Condition Relay Ladder Action Structured Text Action
Prescan The rung-condition-out is set to false. No action taken.
Rung-condition-in is false The rung-condition-out is set to false. N/A
Rung-condition-in is true The instruction executes.
The rung-condition-out is set to true.
N/A
EnableIn is set N/A EnableIn is always set.
The instruction executes.
Instruction execution The UID instruction prevents interruption by higher-priority tasks.
The UIE instruction enables interruption by higher-priority tasks.
Postscan The rung-condition-out is set to false. No action taken.
UID
error_bit
EN
DN
ER
File Search/Compare
Control error_check
Length 10
Position 8
Mode ALL
Expression error_code=error_list[error_check.POS]
FSC
error_check.FD
alarm
UIE