-

How to configure and run a Yaskawa Drive using ModbusRTU on the ic92xx controller with PLC Open FBs


This application note show how to set up a modbus RTU communication between the IC92xx and a Yaskawa Drive with I Cube Engineer >=V2023.6

1. Supported Components

Component Name Version
iC9200 series ≥ 2023.6
SLIO module CP040 (040-1CA00) ≥1.00
iCube Engineer ≥ 2023.6
GA700 & GA800 1034
GA500 1017
note : COSmos Drive serie (V1000, A1000, U1000...) is not supported with Yaskawa library.

2. Libraries

3. Solution details
3.1 Wiring Details

iC9226M CPU needs CP040 module (ref: 040-1CA00) to establish RS485 communication to Drives.
The CP040 can be connected on a fieldbus coupler or directly on the slicebus of the controller.
In case of the slicebus usage, make sure to use a Power module (ref: 007-1AB00) to supply the CP040.

Connect CP040 to Drives as following:
cp040.png

3c5ca321-51e7-4dde-9f81-fade35b27aee.png

3.2 Communication Settings
3.2.1 Drive Communication Settings:

Set the following parameters:

Cycle power of Drive or set H5-20 = 1 to activate modifications of H5-Parameters.

Parameter Value Description
B1-01 2 (= source Modbus RTU) Frequency Reference Selection
B1-02 2 (= source Modbus RTU) Run Command Selection
H5-01 User’s value Drive Modbus RTU address
H5-02 Same value defined in ICE “baud rates” Communication Speed selection (baud rates)
H5-03 Same value defined in ICE “Parity” Communication Parity Selection
H5-04 User’s Value Communication Error Stop Method
H5-06 Same value defined in ICE “Delay Time” Drive Transmit wait Time
H5-11 1 (= no enter command required) Information: The Driver set H5-11 = 1. Do not change.

Recommended settings:

3.2.2 iCube Engineer Communication Settings

Note:  Master Delay in ICE is recommended to set to 0 ms

This FAQ Modbus RTU Communication Details for Drives and generic Modbus Devices  describes the Bus cycle time, Task cycle time and SliceBus Settings in detail.

3.2.3 Modbus RTU concept to handle Yaskawa Drive and Generic Device

Here below is a general concept of modbus RTU network with Yaskawa library. The Yaskawa inverters are handled with Y_PLCopenPart1_Toolbox FB(see list of the supported FBs for MBRTU section below) and the Generic device on the same network are handled with Y_IM_GenericDeviceRTUDriver.

The limit available on the network are 10 generic devices and 10 inverters.
Note: Due to the serial communication, the more Devices on the network, the slower the respond time of each Device becomes.
Further details of the communication management to Yaskawa Drives and Generic Devices are described here: Modbus RTU Communication Details for Drives and generic Modbus Devices

Image

3.2.4 Definition of Modbus Communication Registers

This chapter describes how to link the Y_IM_ModbusMasterRTUto the CP module using IN and OUT Ports.

Step 1: Define Variable ModbusOutputData and ModbusInputData (Type: YtByteArray60) in POU: Main as Port Variables:
Image
Step 2: Link in PLCnext / GSD Port List:
Image

3.2.5 Definition of Axis Structures and User Units / Limits

Define and Initialize at startup the Axis Structure:

Global Variable Definition: Init:
Image
or in POU: INIT:
Image

Note : Modbus Drive connections are not defined in Motion Axis definition:
Image

The Structure g_PM_VFD_AxisData from datatype Yt_PM_VFD_AxisStructure is defined automatically when creating an instance of e.g. MC_Power (from Y_PLCopenPart1_Toolbox) using Inv01 as Axis_Ref.

Image

AXIS_REF and Axis Data structure are linked by:

Image
[1] is the first MBRTU Drive axis on this network.

plcOpen FBs use velocity user units in s-1 and acceleration user units in s-2.

The scaling to the mechanical construction has to be defined in POU INIT:
PM_VFD_AxisData.AxisArray[1].AxisInfo.DriveConversion.posScale
The definition of posScale is used to convert the Velocity User Units [s-1] to Drive Frequency Reference [Hz].The scaling uses: motor nominal speed [rpm]  at nominal motor frequency [Hz] )E1-04).

Image

Use default setting of o1-03 = 0
(Comment: The scaling from Hz to 0.01Hz is done internally)

Image

Example:
Calculation Output frequency [Hz] = Velocity reference [s-1] * 60.0  * MaxOutput Frequency /PM_VFD_AxisData.AxisArray[1]. AxisInfo.DriveConversion.posScale
e.g. Velocity reference = 22.6667[s-1] * 60.0 * 50.0  / 1360.0 = 50.0Hz

The posScale is used also for the actual Velocity.

Modify this calculation to respect also the mechanical construction (belt,...) and gear.

MC_MoveVelocityand MC_StopFB use acceleration user unit in [s-2]. The ramps for acceleration (C1-01) and deceleration (C1-02) are in [s].
The values have to be within the allowed range for C1-01 and C1-02 := 0.0s .... 6000.0s

Acceleration = MaxOutputFrequency (E1-04) / Acceleration Time (C1-01) ->
min acceleration [C1-01 = 6000.0s] = PM_VFD_AxisData.AxisArray[1]. AxisInfo.DriveConversion.posScale / 6.0 / 60000 [0.1s.]
max acceleration [C1-01 = 0.1s] = PM_VFD_AxisData.AxisArray[1]. AxisInfo.DriveConversion.posScale / 6.0 / 1 [0.1s.] 

Image
With .Softlimit.Velocity.Enabled := FALSE the limits of (E1-04 / E1-09) are valid. In the above example the softlimits are same as the Drive limits.
With .Softlimit.Accleration.Enabled := FALSE (same for Deceleration) the Drive limits (.posScale and C1-01/C1-02 range) are used. In the above example the acceleration and deceleration must be within 1s and 30s.

Note: Take care when using a different Maximum Output Frequency (E1-04). e.g. E1-04 = 87Hz

Example:
Calculation Acceleration Time (C1-01 in s) = PM_VFD_AxisData.AxisArray[1]. AxisInfo.DriveConversion.posScale / (60.0 * Acceleration Reference [s-2]).
Acceleration Time (C1-01 in s) for Acceleration 5.0s-2 = 1360 [min-1] / (60.0 [s/min] * 5.0[s-2]) = 4.53s

3.2.6 Main RTU Driver and Motion Axis Driver

The Modbus RTU CP040 module establish communication with Y_IM_MainRTUDriver to :
Example:

Image

3.2.6 Supported PLCopen FBs with ModbusRTU Fieldbus

3.2.7 Application example with MC_Power, MC_MoveVelocity, MC_Stop

Set MC_Power.Enable:= TRUE and MC_MoveVelocity.Execute:= TRUE, set a velocity, acceleration and deceleration reference to run the Drive in Velocity Mode.
To stop the Drive set MC_Stop:= TRUE and MC_MoveVelocity.Execute:= FALSE.
Image



 


This help information is valid for iCube Engineer Online Help 2025.6

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