We enter the username and password and start the runtime afterward. Here you can see the currently installed version of the runtime package on the Raspberry Pi is 4.1. A window will open for the configuration of the Raspberry Pi.
#Raspberry pi modbus rtu master update
For that, we click Tools > Update Raspberry Pi. Now let us start the CODESYS runtime for the Raspberry Pi. Finally, we connect the Modbus read channel with the variable that holds the measured temperature. The correct register address can also be taken from the parameter list in akYtec Tool Pro. Now we are going to create a second Modbus channel to read the value from the first analog input of the module MV210-101. We attach the output variable from our program to the newly created Modbus channel.
#Raspberry pi modbus rtu master pro
The parameter list in akYtec Tool Pro includes all register addresses with additional information of the respective device in a table. We add a Modbus channel to the MU210-501 to write the output variable to the Modbus register of the first analog output.
The next step is to write a small program for assigning the measured temperature value to the analog output. Be sure to always insert the correct IP address of the respective device. Then we add a Modbus TCP Master, the Raspberry Pi, and two Modbus Slaves, the MX210 modules, to the Modbus network. Here, the IP address of the PC, as well as the default gateway, have to be provided. Afterwards, the username and password for the Raspberry Pi have to be entered.Īfter establishing a reliable connection to the Raspberry Pi, we add a new ethernet interface to the device tree. Please provide the correct IP address in the respective text field. (2) The second gateway is the Raspberry Pi. Please make sure that your PC is in the same ethernet network as the Raspberry Pi and the Modbus TCP I/O modules. (1) First, we input the correct IP address of our PC. In the device tree, we click Device to open the communication settings. We select the runtime featuring multi-core capabilities, making possible industrial use, and structured text (ST) as the programming language. The next step is to create a new CODESYS project and to name it.