Modbus TCP On Build in Ethernet Port in Iq F and Iq R EN 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

This document describes the configuration of Modbus TCP communication on a built-in


Ethernet port with STLite (750-352).

1 Configuration Ethernet connection


In Gx Works 3, open the embedded Ethernet port setting.

1.1 Configuration Ethernet port in iQ-R

In the project window go to the Parameter -> RxxCPU -> Module Parameter tab. Then
in the Basic Settings open the <Detail Setting> tab in the External Device Configuration.

The Ethernet Configuration window opens. You need to add an Active Connection from
Module List Ethernet Device (General). The built-in Ethernet port allows communication with
up to 16 devices.

Then change the specified parameters:


 Communication Method -> Predefined Protocol
 Enter the PLC Port No.

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 1 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

 Enter Device IP Address (192.168.3.60) and Port No. 502 (Standart port for
Modbus TCP)

Then close the Ethernet Configuration window using the “Close with Reflecting the
Setting” button.

1.2 Configuration Ethernet port in iQ-F

In the project window go to the Parameter -> FX5UCPU -> Module Parameter -
>Ethernet tab. Then in the Basic Settings open the <Detail Setting> tab in the External
Device Configuration.

The Ethernet Configuration window opens. You need to add an Active Connection from
Module List Ethernet Device (General). The built-in Ethernet port allows communication with
up to 8 devices.

Then change the specified parameters:


 Communication Method -> Predefined Protocol

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 2 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

 Enter the PLC Port No.


 Enter Device IP Address (192.168.3.60) and Port No. 502 (Standart port for
Modbus TCP)

Then close the Ethernet Configuration window using the “Close with Reflecting the
Setting” button.

2 Predefined Protocol (MODBUS TCP)

2.1 Configuration Predefined Protocol


In GX Works 3 open the Predefined Protocol Support Function.
Tool -> Predefined Protocol Support Function…

In the newly opened window select CPU (Ethernet) for iQ-F and Built-in Ethernet CPU
for iQ-R. Then creat a new project.

Then add a new protocol by clicking the “Add” button. The following window will appear.

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 3 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

Sellect:
 Model -> Modbus/TCP
 Protocol Name -> 03:RD Holding Registers

After the changes confirm it with the OK button.

The next step is to fill in the Packet Setting data. We go to Variable Unset in Request.
The variable assignment window opens.

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 4 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

You must fill in all the red variable fields.

After completing all the fields the window should look like this:

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 5 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

Similarly do this for the other Packet Setting.

2.2 Upload a project Predefined Protocol to PLC.


After completing the parametrization you need to upload the project to the PLC. This
is done using the Predefined Protocol Support Function. Switch the controller to STOP mode.

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 6 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

3 PLC Program

3.1 Parameter initialization Predefined Protocol (Modbus TCP)


The first step is to fill out the data given in the Predefined Protocol (Request).

3.2 Open Connection with Slave


Open first connection. Soc_open contact will start the exchange of data.

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 7 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

3.3 Launch of Predefined Protocol


Assign a read registers protocol to control variables

Triggers the Predefined Protocol on the first connection (s1) and one protocol (s2),
as well as the control variables.

In the example, the registry data is in the D1000 register. The value from the analog input
module is read.

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 8 of 9
Modbus TCP on Build-in Ethernet port in iQ-F and iQ-R

3.4 Close connection


Closing the connection occurs after the SOC_close registry is triggered

Revision history:
Rev. Date: Note:
1.0 2017-05-26

Attachments:
File name: Description:
FX5-MODBUS TCP.gx3 Sample project Gx Works 3 for iQ-F
MODBUS TCP FX5.tpx Sample project Predefined Protocol for iQ-F
iQ-R-MODBUS TCP.gx3 Sample project Gx Works 3 for iQ-R
Modbus TCP iQ-R.tp2 Sample project Predefined Protocol for iQ-R

Mitsubishi Electric Europe B.V. Polish Branch


MTS Department
2017-09-11 Page 9 of 9

You might also like