FB_CrestronWriteByte
This function block enables a byte value (8 bit) to be written to 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 value to be written is stored.
iOffset: Indicates the offset in the buffer Buffer_TX of the Crestron controller from which the data are to be written.
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 process bBusy is set to True and remains True until the writing 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 |