FB_CrestronGetClientConnectionState

FB_CrestronGetClientConnectionState 1:

This function block queries the connection status of a Crestron controller.

VAR_INPUT

sTargetIpAddr  : STRING(15);
bExecute       : BOOL;
tTimeout       : TIME := T#5s;

sTargetIpAddr: IP address of the Crestron controller.

bExecute: A positive edge starts the block

tTimeout: Specifies the interval for awaiting a response.

VAR_OUTPUT

bConnectionState  : BOOL;
bBusy             : BOOL;
bError            : BOOL;
udiErrorId        : UDINT;

bConnectionState: The output is TRUE if a Crestron controller with the IP address entered at the input is connected to the Crestron Server.

bBusy: During the query procedure, the bBusy output is set to TRUE and remains TRUE until query has been completed. During this time no further commands can be activated via this block.

bError: The output is TRUE as soon as an error occurs during the execution of the command.

udiErrorId: Contains the error code that may occur during execution of the block. The value is 0 if no error has occurred.

Requirements

Development environment

Target system

Required libraries

TwinCAT 2.11 R3/x64

PC/CX

TcCrestron library from V1.0.0