Topic: DMD0060

CLOSE - Close Device


The Close Device (CLOSE) instruction is used to close a previously opened Device or Device Reference. This instruction is used in conjunction with Open Device (OPENDEV) instructions that dynamically use a Device Reference to one or more hard devices. It is also used on a hard device, like a TCP device, where closing the Device performs an operation, like terminating a TCP connection.

 

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Device - designates which of the configured Devices, or which Device Reference to close.

 

No devices available - indicates there is no device that is appropriate for this instruction. Select one of the following to create the required device:
 

 


On Success: - designates one of the following two options if the Close Device (CLOSE) operation is successful:

 

  • SET BIT - The specific BIT location will be SET OFF when the Close Device instruction is first enabled, and then SET ON if the operation is successful. This value can be any writable bit location.
     

  • JMP to Stage - JMP to the specified Stage. The target Stage must be in the same Program as the Close Device instruction, you cannot specify a Stage in a different Program. This selection will function the same as a standalone Jump to Stage instruction. Click here for more information on the Jump To Stage instruction.

 

On Error: - designates one of the following two options if the Close Device (CLOSE) operation is unsuccessful:
 

  • SET BIT - The specific BIT location will be SET OFF when the Close Device instruction is first enabled, and then SET ON if the operation is unsuccessful. This value can be any writable bit location.
     

  • JMP to Stage - JMP to the specified Stage. The target Stage must be in the same Program as the Close Device instruction, you cannot specify a Stage in a different Program. This selection will function the same as a standalone Jump to Stage instruction. Click here for more information on the Jump To Stage instruction.

 


Status Display:

The red triangle in the upper left corner indicates this is a Fully Asynchronous instruction.

 

The gray triangle at the right end of this input leg indicates the input is edge-triggered,


See Also:

 


Related Topics:

 


Rung Example: