Y_IM_GenericDeviceRTUDriver
This function block allow the communication to a generic Modbus RTU device while using
Y_IM_MainRTUDriver (necessary when
ModbusRTU
Drive control with PLC Open Part1 are used on the same
ModbusRTU
network as a generic device). If
Y_IM_MainRTUDriver is not required this FB can be directly replaced with
Y_IM_ModbusMasterRTU .
Parameters:
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
|
|
ModbusData | Yt_WordArray32 |
Array of 32 words for data received or send by Modbus.
|
|
| VAR_INPUT |
|
|||
|
|
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 |
|
|
SlaveAddress | USINT | Address of the slave. Use 0 for broadcast - for write function codes. Valid values: 0 .. 247. | USINT#0 |
|
|
FunctionCode | BYTE | Supported function codes: 1, 2, 3, 4, 5, 6, 15, 16, 103 | BYTE#16#00 |
|
|
SubFunction | WORD | Reserved | WORD#16#00 |
|
|
SlaveOffset | UINT | Offset for command on Slave side. Datatype depends on function code. |
UINT#0 |
|
|
SendLength | UINT | Length for command. Datatype depends on function code. Length is not used for function codes: 0x05, 0x06. |
UINT#0 |
| VAR_OUTPUT | ||||
|
|
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. |
FALSE |
|
|
Length | UINT | Length of data received from ModbusData. |
UINT#0 |
|
|
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. |
FALSE
|
|
|
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. |
FALSE
|
|
|
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 |
UINT#0 |