FB_CrestronPushUIntArray

FB_CrestronPushUIntArray 1:

This function block writes a UInt array of the PLC to a Crestron controller.

The push commands do not receive any confirmation from the Crestron controller. As a result, the speed of execution is faster than with the write commands.

Communication takes place via an instance of FB_CrestronCommunication. When declaring FB_CrestronPushUIntArray, the desired instance of FB_CrestronCommunication is specified.

Example:

VAR
    fbCrestronPushUIntArray : FB_CrestronPushUIntArray(Communication.fbCrestronCommunication);
END_VAR

VAR_INPUT

bStart        : BOOL;
pData         : POINTER TO UINT;
nElements     : INT;
nWriteOffset  : INT;

bStart: The push command is sent on a positive edge.

pData: Pointer to a UInt array containing the values to be written. The programmer himself is responsible for dimensioning the UInt array so that it contains the entire data.

nElements: Specifies the number of elements that are to be written to the SIMPL+ macro TwinCAT 3 Communication of the Crestron controller. The pointer pData thus points to a UInt array that has at least as many elements as are specified by nElements (1-50).

nWriteOffsets: Specifies the position from which the data are to be written to the SIMPL+ macro TwinCAT 3 Communication of the Crestron controller (1-500).

VAR_OUTPUT

bBusy        : BOOL;
bError       : BOOL;
nErrorId     : UDINT;

bBusy: During the writing procedure the output bBusy is set to TRUE and remains TRUE until writing is completed. During this time no further commands can be activated via this function block.

bError: The output is TRUE as soon as an error occurs during the execution of the command.

nErrorId: Contains the error code that may occur during execution of the function block. The value is 0 if no error has occurred.