Execute
This method can be used to establish a connection or to disconnect a connection. No permanent call is required, only changes are transferred from bConnect to the driver.
If a connection exists, FALSE is used to disconnect the connection; if a connection does not exist, TRUE is used to establish it.
Syntax
METHOD Execute : BOOL
VAR_INPUT
bConnect : BOOL;
END_VAR
Return value
Name | Type | Description |
---|---|---|
Execute | BOOL | The method returns the return value TRUE if the call was successful. A method call is also considered successfully completed in the event of an error. |
Inputs
Name | Type | Description |
---|---|---|
bConnect | BOOL | If a connection exists, FALSE is used to disconnect the connection; if a connection does not exist, TRUE is used to establish it. |
Possible errors are output at the outputs bError and hrErrorCode of the function block instance.