FB_CrestronReadReal
This function block enables a Real (32 bit) to be read from the Crestron controller.
The value is distributed over 4 bytes in the Crestron controller. This means that four placeholders have to be used in the Buffer_Tx array of the Beckhoff Communication or Beckhoff Communication 400 module in order to suitably map a variable of type Real. |
VAR_INPUT
sTargetIpAddr : STRING(15);
dwDat : DWORD;
iOffset : INT;
bExecute : BOOL;
tTimeout : TIME := T#5s;
sTargetIpAddr: IP address of the Crestron controller.
dwData: Address pointer to the Real (32-bit) in which the read value is stored.
iOffset: Indicates the position in the Buffer_Tx from which reading out of 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 read procedure, the bBusy output is set to TRUE and remains TRUE until reading 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 |