GOC43 - Communication - Modbus Slave (Server)

GOC43 - Communication - Modbus Slave (Server)

Info
This article will guide you how to prepare GOC43 Modbus Server communication with FX5U (Modbus client) step by step.

Alert
Copyright © Mitsubishi Electric Europe B.V.

IMPORTANT !

These Function Blocks / programs are demo versions that are only  intended to demonstrate program functions and provide general orientation for  your software choices. They are not suitable for use in real applications! "

"Improper use of demo versions in applications can lead to serious malfunctions  and damage! Programs for real applications must always be configured for the  individual application by trained staff and tested thoroughly before being  used.

Mitsubishi Electric cannot assume any liability if these examples are used in real applications."


      

1. Setup GOC 43 Modbus TCP Slave

1.1 Create new project

      Select template project icon and give a name to your project.
      

      Select the GOC43 target version , and prefered programming languages. (This example we won't write any line of code)
      

1.2 Add Modbus Slave device to Communication

      Select Ethernet from the Devices tab of the left project tree with right mouse click. Chose Add device..
      
      
      From fieldbuses tree find modbus slave and add device to the Ethernet configuration.
      
      

1.3  Slave device parameters

      1.3.1 General settings 

            Leave everything default, only modifyUnit ID: 1
            
           

    1.3.2 Modbus TCP Slave I/O Mapping

            

1. 4 Login and download project

      1.4.1 Establish connection with GOC43

      Select device, then scan your network searching for PLC.
      

      1.4.2 Setup your PLC parameters

      

      1.4.3 Login and download project

      

      1.6.4 Start PLC

      Click on the "play" icon
      
      During download you will see the GOC system menu. After that screen will be white, because we did not add any visualization element to the project.
      

2. Setup FX5U Modbus TCP Slave

      2.1 Create a new project

            

      2.2 Setup Ethernet

            2.2.1 Set IP address of the PLC and subnetmask

                  

            2.2.2 Select Simple CPU communication and set parameter to Use.

                  Then doublle click on detail settings.

                  
             

            2.2.3 Setup read and write parameters

                  Read
                  
                  Write
                  
                  Holding and input registers
                  

     2.3 Compile and download

                  
                  Select parameter + program
                  
                  Accept all pop up window, and follow reset instruction. (Reset method: Run-stop-reset switch hold down till error LED lit on the PLC  2-3 times then switch to RUN state)

3. Test

      3.1 Use IEC Objects for communication monitoring

            If everything fine, FX5U has to be connected to GOC43
            

      3.1 Write Values to FX5 PLC

            Prepare some value directly to cyclic exchange registers
            
            Check them in GX Works 3 buffer memory windows.
            

    3.2 Read Values from FX5U