FB_CrestronWriteIntArray

FB_CrestronWriteIntArray 1:

This function block allows an integer array with a maximum length of 40 fields to be written to the Crestron controller.

VAR_INPUT

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

sTargetIpAddr: IP address of the Crestron controller.

dwData: Address pointer to the integer array.

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

iLen: States the length of the array to be written. The length is restricted to 40.

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