|
VAR_IN_OUT
|
| V
|
InputData
|
Yt_ByteArray60
|
Array of 60 bytes with actual values of the CP040 module. To have a consistent data access, please define the type of the connected variable as "IN Port".
|
| V
|
OutputData
|
Yt_ByteArray60
|
Array of 60 bytes with set values for the CP040 module. To have a consistent data access, please define the type of the connected variable as "OUT Port".
|
| V
|
ModbusData
|
Yt_WordArray512
|
Array of 512 words for data received or send by modbus.
|
|
VAR_INPUT
|
| B
|
Execute
|
BOOL
|
Upon the rising edge of the Execute input, all other inputs are read and the function block becomes operational. If an input needs to be modified, the value will have to be changed and the Execute input will have to be re-triggered.
|
FALSE
|
| V
|
SlaveAddress
|
USINT
|
Address of the slave. Use 0 for broadcast - for write function codes. Valid values: 0 .. 247.
|
USINT#0
|
| V
|
FunctionCode
|
BYTE
|
Supported function codes: 1, 2, 3, 4, 5, 6, 15, 16, 103
|
BYTE#16#00
|
| V
|
SubFunction
|
WORD
|
Supported function codes for FunctionCode = 103 values = 16#010D, 16#010E
|
WORD#16#00
|
| V
|
Length
|
UINT
|
Length for command. Datatype depends on function code. Length is not used for function codes: 0x05, 0x06.
|
UINT#0
|
| V
|
SlaveOffset
|
UINT
|
Offset for command on Slave side. Datatype depends on function code.
|
UINT#0
|
| V
|
MasterOffset
|
UINT
|
Offset for command on Master side for access on ModbusData. Datatype depends on function code.
|
UINT#0
|
| E
|
Reset
|
BOOL
|
With Reset = TRUE the communication to the CP040 is reset and an active send command is aborted.
|
FALSE
|
|
VAR_OUTPUT
|
| B
|
Done
|
BOOL
|
The Done output is set to TRUE when the commanded action has completed successfully. If another function block takes control before the action is completed, the Done output will never become TRUE. This output is reset when Execute becomes FALSE.
|
| B
|
Busy
|
BOOL
|
For function blocks with Execute input, the Busy output is set to TRUE upon the rising edge of the Execute, and set to FALSE when Done, CommandAborted or Error outputs becomes TRUE. In the case of a function block with an Enable input, Busy indicates that the function block is operating, but may not be ready to provide valid outputs.
|
| E
|
DoneReset
|
BOOL
|
Reset was done.
|
| B
|
Error
|
BOOL
|
The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE.
|
| B
|
ErrorID
|
UINT
|
The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE.
|