FB_FIASRoomDataRead

FB_FIASRoomDataRead 1:

This block reads all reservation numbers that exist for a room.

Examples

Download demo project

VAR_INPUT

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

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;
bRoomDataExist  : BOOL;

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.

bRoomDataExist: Output is switched to TRUE, if the TwinCAT FIAS Server has received room data to the specified room number of the hotel management server.

VAR_IN_OUT

stRoomData  : ST_FIASRoomData;

stRoomData: Containing the requested room data to the room number.

Requirements

Development environment

Target system

Required libraries

TwinCAT 2.11 R3/x64

PC/CX

TcFIAS library from V1.0.0