Adding Modbus TCP Slave causes compile errors

2015-03-26
2015-03-26
  • Matt-Engels - 2015-03-26

    Hello,

    I am running into a bit of frustration with a project involving serial communication between Raspberry Pi B+ and an Arduino. I would like to add the capability to have a separate PC act as Modbus TCP Master to poll a couple of values from the Pi, configured as Modbus TCP Slave.
    I added the Ethernet Adapter, configured it for the Pi's eth0 interface, and then add the Modbus TCP Slave under the Ethernet adapter. However, I get four compiler errors when I try to build the code. (See attached picture)

    Now, I can start a new project, add the Ethernet Adapter and Modbus TCP Slave in the same way and it will compile without any errors and run properly - a Modbus server will connect to it.

    What am I missing?

    Thank you,

    -Matt

    IMG: CoDeSYS Modbus Error.jpg

     
  • eschwellinger

    eschwellinger - 2015-03-26

    Hi Matt,
    You are using 3.5SP6 CODESYS Development System. Your project contain at the moment an older Pi device.(3.5.5.20)
    So you need to do an update in the project to the pi device
    by rightlick to the device tree -> then select update device.
    After that right click to Ethernet Adapter and update modebus slave.
    Check if Compiler Version and visuprofile is in current Version (3.5.6.x)

    Last step is to update the plc runtime on Pi side by the Debian package from the store download.
    How to do that on an existing Pi SD Card Image?
    Copy codesyscontrol_arm_raspberry_V3.5.6.0.deb to the Pi and execute
    sudo dpkg -i codesyscontrol_arm_raspberry_V3.5.6.0.deb

    This should solve the problems.
    BR
    Edwin

    IMG: ProjectSettings.jpg

    IMG: UpdateModbusSlave.jpg

    IMG: UpdateEthernetAdapter.jpg

    IMG: UpdateDevice.jpg

     
  • Matt-Engels - 2015-03-26

    Thank you Edwin, this fixed the problem.

     

Log in to post a comment.