User Interrupt Disable (UID)/User Interrupt Enable (UIE)
This information applies to the
CompactLogix
5370, ControlLogix
5570, Compact GuardLogix
5370, GuardLogix
5570, Compact GuardLogix
5380, CompactLogix
5380, CompactLogix
5480, ControlLogix
5580, and GuardLogix
5580 controllers.The UID instruction and the UIE instruction work together to prevent a small number of critical rungs from being interrupted by other tasks.
vailable Languages
Ladder Diagrams
Function Block
This instruction is not available in function block.
Structured Text
UID();
UIE();
Operands
Ladder Diagram
This instruction is not available in ladder diagram.
Structured Text
This instruction is not available in structured text. You must enter the parentheses () after the instruction mnemonic, even though there are no operands.
Description
When the rung-condition-in is true, the:
- UID instruction prevents higher-priority tasks from interrupting the current task, but does not disable execution of a fault routine or the Controller Fault Handler.
- UIE instruction enables other tasks to interrupt the current task.
To prevent a series of rungs from being interrupted:
- Limit the number of rungs that you do not want interrupted to as few as possible. Disabling interrupts for a prolonged period of time can produce communication loss.
- Above the first rung that you do not want interrupted, enter a rung and a UID instruction.
- After the last rung in the series that you do not want interrupted, enter a rung and a UIE instruction.
- If required, you can nest pairs of UID/UIE instructions.
When the UID is called for the first time, it bumps priority, saves the old priority, and increments a nesting counter. Each subsequent call increments the count. The UIE will decrement the nesting counter. If the new value is 0, it will restore the saved priority.
Affects Math Status Flags
No.
Fault Conditions
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Ladder Diagram
Condition/State | Action |
Prescan | N/A |
Rung-condition-in is false | N/A |
Rung-condition-in is true | The UID instruction prevents the containing user task from being Interrupted. The UIE instruction enables the containing user task to be interrupted as is normally in the case. |
Postscan | N/A |
Structured Text
Condition/State | Action |
Prescan | N/A |
Normal execution | The UID instruction prevents the containing user task from being Interrupted. The UIE instruction enables the containing user task to be interrupted as is normally in the case. |
Postscan | N/A |
Example
Ladder Diagram
Structured Text
UID();
<statements>
UIE();
Provide Feedback