-

Y_IM_GenericDeviceRTUDriver

Image
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

Notes:

  • Function block exchanges data with Y_IM_ModbusMasterRTU, therefore, it inherits most of its capabilities
  • To check the supported functions, check the description of the Y_IM_ModbusMasterRTU
  • The Enable signal causes subsequent devices to be queried for communication requests.
  • The execution of only one instance of this FB per slave address is allowed. If not followed, an errorID13803 will be trigged on the second FB instance.
  • Error Description:

    See the Function Block ErrorID List list.

     


    This help information is valid for iCube Engineer Online Help 2025.6

    Copyright © 2025 YASKAWA EUROPE GmbH and © 2025 YASKAWA America, Inc.