Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Raspberry Pi 3 Modbus TCP Master and Arduino Mega Modbus TCP Slave

alecudr
2016-04-28
2021-03-06
  • alecudr - 2016-04-28

    I am attaching the project done with M-DUINO and Raspberry Pi 3.
    In this project Raspberry with Touch Screen 7 ", is ModBus TCP master function,
    and M-Duino (Arduino Mega) has ModBus TCP Slave function.

    http://www.industrialshields.com/en/sho ... g-digital/

    The CodeSys project are including :

    1. Alarm Manger
    2. Language manager
    3. Data Base (like retain variable) is a file on Raspberry SD card
      {if Raspberry suddenly turns off, the configuration data is retrieved from SD.}
    4. Visualization
    5. Ladder function example
    6. ModBus TCP Master

    IMG: MANUAL_FUNCTIONS.png

    IMG: Alarm_list.png

    IMG: Arduino_Mega_ModBusTCP_Slave.png

    IMG: ModBus_Config.png

    IMG: LADDER_PROGRAM.png

    IMG: MAIN_SCREEN.png

    IndustrialShield_MB_1.rar [21.73 KiB]

    WebvisuUnwrapper_4.rar [305.59 KiB]

     
  • KasperP - 2018-11-02

    alecudr hat geschrieben:
    I am attaching the project done with M-DUINO and Raspberry Pi 3.
    In this project Raspberry with Touch Screen 7 ", is ModBus TCP master function,
    and M-Duino (Arduino Mega) has ModBus TCP Slave function.
    http://www.industrialshields.com/en/sho ... g-digital/
    The CodeSys project are including :
    1. Alarm Manger
    2. Language manager
    3. Data Base (like retain variable) is a file on Raspberry SD card
    {if Raspberry suddenly turns off, the configuration data is retrieved from SD.}
    4. Visualization
    5. Ladder function example
    6. ModBus TCP Master

    Great work. Ineterresting example

     
  • pawel - 2021-03-06

    Hello,
    I want to do similar thing as you, to make the Arduino Mega to become I/O for Raspberry Pi. But I have a problem with connecting Arduino to Raspberry (i can ping arduino from Raspberry). Should i configure something from RPi side yet? For Arduino I have based on your program (but i had to use Ethernet2 library) and configuration for Codesys seems the same as yours (except chanels for modbus slave). In online i can see this:

     

    Last edit: pawel 2021-03-06

Log in to post a comment.