Page 1 of 1

Communication TCP

Posted: 13 Apr 2020, 14:02
by melissamariab
Hello everyone,

I basically have one RevPi core 3 connected to a Gateway Modbus TCP (working as a master), and another RevPi core 3 connected to another Gateway Modbus TCP (but this time working as a slave).

So, I am trying to write some data on the slave Pictory, for example, writing 16 on "Input_1"

When I access my master Pictory, go to extended data, choose "read input registers", I never get this 16 value. It is like they are not connected, even though I put the slave IP on my master Pictory.

So I was thinking:

1- Maybe the register address is wrong.
The reference for this function code is 3xxx, so I already tried 3000, 30001
I also tried "1"

2- Maybe I have to write a C code and not writing directly to Pictory

3- Maybe it is another thing about the configuration

Does someone have a clue?

Re: Communication TCP

Posted: 14 Apr 2020, 16:06
by dirk
Hi melissamariab, try the both Modbus TCP communication partners with a software, i.e.
QModMaster and Modbus Slave.
If it works as expected then you can connect the two together. Have a look at the "status" registers i.e. Modbus_Master_Status and Master_Status_Reset
Have a look at the tutorial Temperature Measurements with RevPi Core as Modbus TCP Master
and How to Use RevPi Core as Modbus TCP Master.

Re: Communication TCP

Posted: 14 Apr 2020, 16:31
by melissamariab
Hello Dirk, thank you for the reply!

I have already checked both tutorials.

And I will download what you have mentioned. But instead of using a program to communicate with my Master revpi, and using another program to communicate with my Slave revpi, cant they communicate together just using pictory?

I think there is a problem with my TCP communication. Because everytime I go to "extended data", "read input registers", and I go to the prompt command "piTest -d", the Gateway Module TCP that was available before, it is not available anymore.

Re: Communication TCP

Posted: 16 Apr 2020, 09:10
by dirk
Hi melissamariab, I am not sure if I have understood your hardware configuration. So if you have this devices GATEWAY Module for Modbus TCP
they are slave devices. Maybe there is the missunderstanding. The Gateway Modules work different than the Virtual devices which are also available. Have a look at this video tutorials:
Tutorial 20 – Modbus TCP Master, Tutorial 22 – Modbus TCP Slave
The handbook for the Gateway Module is available here.

Re: Communication TCP

Posted: 16 Apr 2020, 16:52
by melissamariab
This is the link of an image with my hardware configuration: https://uploaddeimagens.com.br/imagens/KuM-cTQ

on the right side, I have a Revpi core 3 and a gatewaymodule TCP. I configured it on pictory as Master TCP.

On the left side, I have another Revpi core 3 and another gatewaymodule TCP. I configured it on pictory as Slave TCP.

The idea is using the Master TCP to communicate with the Slave TCP but I do not know if this is possible. I was trying to read the data available in the Slave TCP using "extended data, read input registers" on the master pictory but it does not work. I have watched every single tutorial but there is not something like this.

I have downloaded QmodMaster and it works just fine when I want to write or read the input registers.

Re: Communication TCP

Posted: 17 Apr 2020, 12:11
by Amar
Rev Pi Core 3 can be configured as Modbus TCP Master or Slave from PiCtory
However Gateway Modbus TCP works only as Modbus TCP Slave .It is default and cannot be changed from pictory.

Therefore the possible combination is:
1) When in different network
RevPI Core 1 , Gateway Modbus TCP 1 are in one network and RevPI Core 2 , Gateway Modbus TCP 2 are in another network
RevPI Core 1 - Modbus TCP Master (eg: IP I92.168.0.9)
Gateway Modbus TCP 1 - Modbus TCP Slave (eg: IP I92.168.0.10)

RevPI Core 2 - Modbus TCP Master (eg: IP I92.168.1.15)
Gateway Modbus TCP 2 - Modbus TCP Slave (eg: IP I92.168.1.16)

2) When in same Network
Use this constellation if you want to exchange data between all devices.Here one of your Rev Pi Core shall be TCP master and all other devices shall be slaves.

RevPI Core 1 - Modbus TCP Master (eg: IP I92.168.0.9)
Gateway Modbus TCP 1 - Modbus TCP Slave (eg: IP I92.168.0.10)

RevPI Core 2 - Modbus TCP Slave (eg: IP I92.168.0.15)
Gateway Modbus TCP 2 - Modbus TCP Slave (eg: IP I92.168.0.16)

Re: Communication TCP

Posted: 30 Apr 2020, 18:00
by melissamariab
They are in the same network.

Using your last example to explain better..
My RevPi Core 1 is using the IP address of the RevPi Core 2 on pictory. All of this to get the data from this slave. But this is not working, maybe the IP address has to be from some of the Modbus TCP gateways? Maybe my cable conexion is wrong?