Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2016-06-04 20:29:37

hendrik
Member
Registered: 2015-11-01
Posts: 49

Modbus TCP PLC2011B1 integration with REX

Hi,

I have a PLC2011B1 alarm module and would like to send data from B1 module to Unipi. How do I configure the Rex software to achieve this?

Offline

#2 2016-06-05 14:04:07

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Modbus TCP PLC2011B1 integration with REX

Hey hendrik,

in order to receive data in REX Control System from PLC2011B1 alarm module, you need to configure your REX target device as Modbus TCP Slave. Please, refer to the Modbus TCP data Exchange example - Slave to see the real implementation.

In configuration dialog of Modbus TCP Slave you need to specify writeRegisters according to the selected items (and their lenghts) in PLC2011B1 Modbus configuration. You don't need any readRegister since the PLC2011B1 ignores any commands sent it’s direction.

Please contact me again if you need any more information.

Regards, Tomas

Offline

#3 2016-06-06 00:57:43

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Modbus TCP PLC2011B1 integration with REX

Hi Tomas,

I have done as you suggested; it seems that I cannot establish connection between master & slave. I am also connected to an Adam data acquisition module which I already use to sent/ receive data. I am using my unipi as modbus master and Adam + PLC2011B1 as slaves.

Please advise.

Thanks.

Offline

#4 2016-06-06 07:13:05

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Modbus TCP PLC2011B1 integration with REX

Hey hendrik,

in the case of connecting to PLC2011B1 the UniPi with REX needs to be configured as a Modbus slave. The PLC2011B1 just "blindly" sends data without any requests - therefore it behaves as a Modbus master. Modbus Mapping table should be configured in REX Modbus slave according to the selected items in PLC2011B1 Modbus configuration.

You can implement both Modbus master and Modbus slave on the same REX target device, however you need to have two different physical Modbus devices (e.g. UniPi Modbus + USB Modbus adapter).

Hope that it's a bit clearer now. Please let me know if you have any questions.

Cheers, Tomas

Offline

#5 2016-06-07 12:33:34

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Modbus TCP PLC2011B1 integration with REX

Thanks for all the info, I can now see the Modbus on Rex sys log. I still receive an error, see attached log. I am not able to do anything with the incoming data at the moment.
I want to achieve the following;
1) read coil from PLC011B1 (coil: on/off) and use it to perform other functions using Unipi/ rex software. system-log_20160606-2346.jpg

Offline

#6 2016-06-08 07:36:48

stetina
REX developer
From: Pilsen, Czech Republic
Registered: 2015-10-29
Posts: 9

Re: Modbus TCP PLC2011B1 integration with REX

Hi hendrik,
logfile attached in your previous post indicate that data are read by PLC011B1 from REX (ModbusTCP slave), but no value is set so PLC get value 0. You must set coil value by GOTO block or OCTOUT block. REX not map UniPi coil on MODBUS coil directly.
Concerning socket close error message: I am not sure why it is happend, but It seems PLC011B1 close socket after each request.

Regards, Milan

Offline

Board footer

Powered by FluxBB