Hello,
I've setup a Rev Pi Core V1.2 with a Virtual Modbus TCP Slave connected using the PiBridge to a Profibus gateway.
I'm using pymodbus on my machine (An Ubuntu 16.04) to communicate with the virtual Modbus slave, and I'm able to successfully update its input and output registers.
I want to test the gateway to make sure the values I set using modbus can be passed to a profibus master on the other side, and I'm looking at the input and output values on the profibus gateway, but see no change occuring
as I'm changing the values in the Modbus TCP Slave.
1. should the values change?
2. Do I need a profibus master and have the profibus gateway be online in order to see a change of values on the gateway?
Thanks,
Jonatan.
Profibus Integration Testing
Re: Profibus Integration Testing
Dear Jonathan, the hart of the RevPi data is the process image. Here you have separate devices that do not communicate with each other automatically. You have to write a small program that reads the data from the Modbus slave device input and writes it to the Profibus output. Here is a small python application that shows how easy you may implement this:
To answer your questions 1) no, the values do not change automatically 2) yes, you need a master
Code: Select all
import revpimodio2
from time import sleep
rpi = revpimodio2.RevPiModIO(autorefresh=True)
while True:
rpi.io.Output_1.value = rpi.io.Digital_Input.value
rpi.io.Digital_Output.value = rpi.io.Input_1.value
sleep(0.02)
Re: Profibus Integration Testing
Thank you.
I was under the impression that using the RevPi Core and the Profibus gateway makes it possible for me to "communicate directly" as if they are a single unit.
What I'm actually looking to do is have Profibus communication from our Ubuntu PC to a PLC. It sounds like having another sync program running on the RevPi will adhere performance.
Is there a different way / setup for me to write values directly from my PC to a Kunbus device and communicate with a PLC in Profibus?
Thanks,
Jonatan.
I was under the impression that using the RevPi Core and the Profibus gateway makes it possible for me to "communicate directly" as if they are a single unit.
What I'm actually looking to do is have Profibus communication from our Ubuntu PC to a PLC. It sounds like having another sync program running on the RevPi will adhere performance.
Is there a different way / setup for me to write values directly from my PC to a Kunbus device and communicate with a PLC in Profibus?
Thanks,
Jonatan.
Re: Profibus Integration Testing
Hi if you are interested in a direct communication via plug and play then maybe just use the KUNBUS Gateway with Modbus TCP and Profibus.
Re: Profibus Integration Testing
Thanks dirk,
Where can I find documentation regarding how to set that up?
I happened to also buy the modbus gateway just in case, and have the InBridge connector.
I connect them the same way I connect the RevPi with the Profibus gateway? How do I connect to setup the relevant communication between the two gateway pieces?
Where can I find documentation regarding how to set that up?
I happened to also buy the modbus gateway just in case, and have the InBridge connector.
I connect them the same way I connect the RevPi with the Profibus gateway? How do I connect to setup the relevant communication between the two gateway pieces?
Re: Profibus Integration Testing
Hi jonatan, you can use exactly two (2) gateway components alone to exchange data. A PiBridge connector connects the modules. The number of exchangeable I/O data depends on the combination of the modules used.
E.g. Profibus (244 bytes) Modbus (512 bytes) = 244 bytes. Just have a look at the respective user manual of the Gateway components here https://www.kunbus.com/modular-gateways.html
E.g. Profibus (244 bytes) Modbus (512 bytes) = 244 bytes. Just have a look at the respective user manual of the Gateway components here https://www.kunbus.com/modular-gateways.html