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-10-16 13:13:11

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

Modbus Master/ Slave TCP comminication

Hi,

I am having trouble sending data from slave to master (Master= REX/Unipi) but I have no issue sending data from Master to slave. The slave device has no "built in" Modbus TCP communications, but is flexible which means  I can sent messages using ASCII, HEX or decimal over Modbus (UDP or TCP). I am using holding registers (holding registers = 40001, etc) to write to the slave device and it works fine.

The problem is that I cannot seem to establish a connection when sending data from slave to the master. See attached.

I am not sure what the problem could be?

terminal.pngSlave.pngMaster.png

Offline

#2 2016-10-17 05:48:49

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Modbus Master/ Slave TCP comminication

Hi Hendrik,
in REX the registers are numbered from zero, i.e. 40001 is equal to register 0, type Register 16-bit, 30001 equals to register 0, type InReg 16-bit.

Hope this helps, have a nice day!

Jaroslav

Offline

#3 2016-10-17 11:46:56

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

Re: Modbus Master/ Slave TCP comminication

apologies, I forgot to mention that I have used the correct register (inReg) but still have no connection (MODBUS MASTER TCP main: item "" timeout)

Thanks,

Offline

#4 2016-10-17 14:06:49

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Modbus Master/ Slave TCP comminication

Hi Hendrik,
can you please upload the source .mdl and .rio files?

Jaroslav

Offline

#5 2016-10-18 10:51:10

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

Re: Modbus Master/ Slave TCP comminication

Hi,

I did a basic setup to test, see attached.
test_master_task.mdltest_master_exec.mdltest_master_cfg.rio

Thanks,

Offline

#6 2016-10-19 13:04:10

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

Re: Modbus Master/ Slave TCP comminication

Hi Jaroslav,

I was wondering if you had time to look at the files I sent?

Thanks,

Offline

#7 2016-10-19 14:43:04

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Modbus Master/ Slave TCP comminication

Hi Hendrik,
in REX (and also in Modbus specification), all the areas are numbered separately. Therefore "register 30001" in 3rd party software or device is equal to "InReg, address 0" in REX. Similarly, "register 40001" equals to "Register (16bit), address 0".

Hope this helps.

Jaroslav

Offline

Board footer

Powered by FluxBB