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

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

This document describes the configuration of Modbus TCP communication on a bulit-in Ethernet port with STLite (750-352). 
Wersja w j. polskim dostępna w załączniku

Configuration Ethernet connection

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

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.
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.

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
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.

Predefined Protocol (MODBUS TCP)

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 create a new project.

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

 
Select:
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. 
 

You must fill in all the red variable fields. 


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

 
Similarly do this for the other Packet Setting. 


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.
 

PLC Program

Parameter initialization Predefined Protocol (Modbus TCP)

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

Open Connection with Slave

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

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 in D1001.
 

Close connection

Closing the connection occurs after the SOC_close registry is triggered .


Attachments
:

File name:

Description:

FX5-MODBUS TCP.gx3

MODBUS TCP FX5.tpx

iQ-R-MODBUS TCP.gx3

Sample project Gx Works 3 for iQ-F

Sample project Predefined Protocol for iQ-F

Sample project Gx Works 3 for iQ-R

Modbus TCP iQ-R.tp2

Sample project Predefined Protocol for iQ-R


    • Related Articles

    • How to control FR-E800-E by iQ-R over CC-Link IE TSN

      This article how to set up CC-Link IE TSN connection between iQ-R PLC and FR-E800 inverter. It also presents ready to use function blocks to realize basic control, read inverter monitors as well as read and write E800 parameters through the network.  ...
    • CC-Link IEF Basic iQ-R and iQ-F with robot FR series (CR800 controller)

      This is a shortened version of Ethernet Function manual and it covers only IEF Basic communication setup between iQ-R and iQ-F PLC and one MELFA robot as a slave. iQ-F settings describe in attachment. Robot parameter settings In RT Toolbox 3 set up ...
    • Summary of the programs included in iQ Works suite

      This article summarizes all the software included in the Mitsubishi iQ Works software suite. An iQ Works license code is required for all programs to work. Link to the software presented in the ...
    • ME96 and MAPS connected by Modbus TCP_IP

      This document shows how to connect electronic multi-measuring instrument ME96-MB to MAPS SCADA via Modbus TCP/IP Configuring Local Network Parameters Set static address IP on local network     MAPS Config Editor  Install new driver First install new ...
    • How to control FR-E800-E by iQ-R over CC-Link IE Field Basic

      This article how to set up CC-Link IE Field Basic connection between iQ-R PLC and FR-E800 inverter. It also presents ready to use function blocks to realize basic control, read inverter monitors as well as read and write FR-800 parameters through the ...