FB_CrestronWriteReal

FB_CrestronWriteReal 1:

This function block enables a real (32 bit) to be written to the Crestron controller.

FB_CrestronWriteReal 2:

The value is distributed over 4 bytes in the Crestron controller. Four placeholders are required in the Buffer_Rx of the Beckhoff Communication or Beckhoff Communication 400 module. The iOffset input describes the position in the Buffer_Rx array at which the writing of the 4 bytes begins.

VAR_INPUT

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

sTargetIpAddr: IP address of the Crestron controller.

dwData: Address pointer to the Real (32-bit) from which the value to be written is read.

iOffset: Indicates the position in the Buffer_Rx from which writing to the Crestron controller should take place.

bExecute: A positive edge starts the block.

tTimeout: Specifies the interval for awaiting a response.

VAR_OUTPUT

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

bBusy: During the write procedure, the bBusy output is set to TRUE and remains TRUE until writing 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