Topic: DMD0148

Help File Version: 2.10.0.636

HALT - Halt Program or Task


The HALT Program or Task (HALT) instruction is used to programmatically stop running the specified Program or Task. This instruction is typically used by a supervisory code-block to abnormally terminate the execution of another Program or Task.

 

When the Program or Task is halted, the Termination LogicClosed The additional processing that an instruction has that is run when the code block that contains the instruction is disabled. For example, it is the termination logic of an Output (OUT) coil in a stage that turns OFF the coil when that stage is disabled by a Jump or Stage Reset instruction. for the Program or Task will run. During their termination scan, the Program or Task will run the termination logic for each individual instruction that is contained within the code-block, then will run its own termination logic. All of the Output Coil (OUT) instructions, and any output coil in any instruction that has one as a parameter (for example TIMEPROP) are turned OFF. All of the Timers and Counters are reset. If the Program contains Stage (SG) instructions, all of the Stages in that Program will be disabled. The code-block's associated structure will be initialized (clearing internal flags, counters, etc.) in preparation for being restarted.

 

 


Parameters:

Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.

 

Code Block is the Code Block (Program or Task) to be halted. The HALT instruction does not allow $Main to be selected.

 


See Also:

END - End Coil

 

ENDC - Conditional End of Code-Block

 

EXIT - Exit This Program

 

HALT - Halt Program or Task

 

RESTART - Restart Program or Task

 

SUSPEND - Suspend Program or Task

 

YIELD - Yield Program or Task

 


Related Topics:

Overview of Code Blocks (Programs, Tasks, Subroutines and Interrupt Service Routines)

 

Modifying the Execution Order of Programs and Tasks

 

Termination Scan Behavior

 


Rung Example: