FB_FIASRoomDataWriteRoomStatus

FB_FIASRoomDataWriteRoomStatus 1:

This block sends a room status to hotel management server.

Examples

Download demo project

VAR_INPUT

sNetId           : T_AmsNetId;
sFIASServerName  : STRING;
sRoomNumber      : STRING(8);
iRoomStatus      : INT;
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.

sRoomNumber: A string with max. 8 alphanumeric characters containing the room number.

iRoomStatus: A int containing the room status.

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;

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.

Requirements

Development environment

Target system

Required libraries

TwinCAT 2.11 R3/x64

PC/CX

TcFIAS library from V1.0.0