tobby
I am proceeding an evaluation of a OpenPLC Modbus TCP and RTU project, but there are some questions:
1. Can Modbus RTU between two arduino be done using OpenPLC? 
2. There are one Raspberry Pi and two arduino(arduinoA, arduinoB). Is there possible for raspberr pi to communicate with arduinoA using Modbus TCP and arduinoB using Modbus RTU simultaneously?
Thanks for answering!
Reply 0 0
thiagoralves
1. No. Only Modbus slave is supported on arduino.
2. Yes. You can have the pi as master and both arduinos as slaves. You can configure each slave to work under Modbus tcp or Modbus rtu on the OpenPLC webserver running on the pi
Reply 0 0
tobby
1. No. Only Modbus slave is supported on arduino.
2. Yes. You can have the pi as master and both arduinos as slaves. You can configure each slave to work under Modbus tcp or Modbus rtu on the OpenPLC webserver running on the pi
Thanks for the answering!
Reply 0 0
tobby
Hi, I have additional question about question2:
Assume ArduinoA using Modbus RTU to connect with RaspberryPi, while ArduinoB using Modbus TCP. If I want to trigger DigitalOutput of ArduinoB with input of ArduinoA, how to define DI and DO of two devices in the same program?
Reply 0 0
thiagoralves
Arduino A and Arduino B will run as slaves, which means that they won't run any program, just the blank one that doesn't do anything (see https://autonomylogic.com/docs/2-6-slave-devices/ 😉
 
Once both arduinos are added to the master Raspberry Pi, you will be able to control their GPIO pins as if they were local to the Raspberry Pi. Slave devices are mapped on address 100 onward. So let's say that digital output of Arduino B is mapped at %QX100.0 and digital input of Arduino A is mapped at %IX100.0, you can write a program for the Raspberry Pi that controls %QX100.0 (Arduino B output) based on %IX100.0 (Arduino A input). Check this video to learn more:
Reply 1 0
tobby
Arduino A and Arduino B will run as slaves, which means that they won't run any program, just the blank one that doesn't do anything (see https://autonomylogic.com/docs/2-6-slave-devices/ 😉
 
Once both arduinos are added to the master Raspberry Pi, you will be able to control their GPIO pins as if they were local to the Raspberry Pi. Slave devices are mapped on address 100 onward. So let's say that digital output of Arduino B is mapped at %QX100.0 and digital input of Arduino A is mapped at %IX100.0, you can write a program for the Raspberry Pi that controls %QX100.0 (Arduino B output) based on %IX100.0 (Arduino A input). Check this video to learn more:
 
Arduino A and Arduino B will run as slaves, which means that they won't run any program, just the blank one that doesn't do anything (see https://autonomylogic.com/docs/2-6-slave-devices/ 😉
 
Once both arduinos are added to the master Raspberry Pi, you will be able to control their GPIO pins as if they were local to the Raspberry Pi. Slave devices are mapped on address 100 onward. So let's say that digital output of Arduino B is mapped at %QX100.0 and digital input of Arduino A is mapped at %IX100.0, you can write a program for the Raspberry Pi that controls %QX100.0 (Arduino B output) based on %IX100.0 (Arduino A input). Check this video to learn more:
Got it! I will try this. Thanks!
Reply 0 0
Reply