Topic: DMD0154

SUSPEND - Suspend Program or Task


The Suspend Program or Task (SUSPEND) instruction is used to programmatically stop the designated Program or Task from running.

 

 

When this instruction has power flow the designated Program or Task will not run. The current state of all of the ladder logic in the Program or Task will be maintained. When this instruction loses power flow the designated Program or Task will resume running from the point it was suspended.

 

When a Program or Task that is suspended, its .InstrSuspend structure member will be ON and the name of that Program or Task will be shown with a  yellow  background in the Project Browser.

 

Note: a Program or Task cannot contain a SUSPEND instruction that targets itself, that is, a Program or Task can NOT suspend itself.

 


Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a list of the Programs and Tasks that can be suspended.

 

Code Block - the name of the Program or Task to suspend

 


Status Display:

 

The following fields will be displayed in the status display:

 

.RanThisScan - his bit will be ON if the Program or Task ran on the current scan and will be OFF if the Program or Task did not run on the current scan

 

.Done -this bit will be ON if the Program has run to completion at least once and the stopped. It will be OFF if the Program is currently running or has not yet been run.

 


See Also:

 


Related Topics:

 


Rung Example: