FB_CrestronReadInt
This function block enables an integer value (16 bit) to be read from the Crestron controller.
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 a PLC variable of data type INT (16 bit), in which the read value is stored.
iOffset: Indicates the offset in the buffer Buffer_RX of the Crestron controller from which the data are to be read.
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 process bBusy is set to True and remains True until the read process is complete. During this time no further read commands can be activated via this block.
bError: A positive flank indicates that an error has occurred.
udiErrorId: Contains the error code that may occur during block execution. If no error has occurred, the value is 0.
Requirements
Development environment | Target system | Required libraries |
---|---|---|
TwinCAT 2.11 R3/x64 | PC/CX | TcCrestron library from V1.0.0 |