chDestroy (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 (3.10 for the 'flush' parameter) / 1.00.00


The "chDestory()" function will destroy a CHANNEL variable.

After the call to chDestroy(), the channel variable cannot be used in further operations.

 

 

Input:

ch : CHANNEL
The channel to destroy.
 
flush : BOOL (default: false)

When set to TRUE any content in the channel will automatically be disposed.                

 

Returns: INT

-2

Channel is busy.

-1

Channel is not initialized.

0

Channel is destroyed.

 

Declaration:

FUNCTION chDestroy : INT;
VAR_INPUT
  ch : CHANNEL;
  flush : BOOL;
END_VAR;