FB_FIASGetClientConnectionState

FB_FIASGetClientConnectionState 1:

This block reads the status of a connection to a hotel management server.

Examples

Download demo project

VAR_INPUT

sNetId           : T_AmsNetId;
sFIASServerName  : STRING(80);
bExecute         : BOOL;
tTimeout         : TIME := t#5s;

sNetId: A string containing the AMS Net ID of the target device to which the command is addressed.

sFIASServerName: A string containing the name of the hotel management server to which the TcFIASServer passes on the FIAS commands.

bExecute: The command is triggered by a rising edge at this input.

tTimeout: States the time before the function is cancelled.

VAR_OUTPUT

bBusy             : BOOL;
bError            : BOOL;
udiErrorId        : UDINT;
eConnectionState  : E_FIASClientConnectionState;

bBusy: This output remains TRUE until the block has executed a command request, but at the longest for the time period set at the tTimeout input. No new commands are accepted at the inputs if bBusy = TRUE.

bError: This output is switched to TRUE as soon as an error occurs during the execution of a command. The command-specific error code is contained in udiErrorId. Is reset to FALSE by the execution of a command at the inputs.

udiErrorId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs.

eConnectionState: This output is set to eConnected when the hotel management server is connected. Is there no connection, the output is set to eDisconnected.

Requirements

Development environment

Target system

Required libraries

TwinCAT 2.11 R3/x64

PC/CX

TcFIAS library from V1.0.0