User Interrupt Disable (UID)/User Interrupt Enable (UIE)

The UID instruction and the UIE instruction work together to prevent a small number of critical rungs from being interrupted by other tasks.
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:
  1. 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.
  2. Above the first rung that you do not want interrupted, enter a rung and a UID instruction.
  3. After the last rung in the series that you do not want interrupted, enter a rung and a UIE instruction.
  4. 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.
Available Languages
Ladder Diagrams
Ladder Diagram_User Interrupt Disable (UID)_v1
Ladder Diagram_User Interrupt Enable (UIE)_v1
FactoryTalk Design Studio
DSL - Ladder Diagram
UID();
UIE();
Affects Math Status Flags
No.
Major/Minor Faults
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
Example
Ladder Diagram
FTStudio-UID_UIE-LD-EX-V1
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.