problems with modbus binding and Wago plc 750-881

640 views
Skip to first unread message

Christian

unread,
Aug 16, 2013, 7:30:05 PM8/16/13
to ope...@googlegroups.com
Hello,

I have an issue, that openHAB is not able to connect with the ModbusTcpBinding to my Wago 750-881 plc.
I have a marker defined at 12290 and I can read it with the modbus monitoring tool QModMaster as well as with a HTTP request:
http://192.168.2.10/READPI?ADR=MX0.2&FORMAT=%d

I have defined the plc in openhab.cfg with

modbus:poll=300
modbus:tcp.slave1.host=192.168.2.10
modbus:tcp.slave1.type=coil
modbus:tcp.slave1.port=502
modbus:tcp.slave1.id=1
modbus:tcp.slave1.start=12290
modbus:tcp.slave1.length=1

and I defined an item with

Contact1 "C1" (TEST) { modbus="slave1:0" }

Unfortunatly it doesn't show any changes. After starting the runtime with

./start_debug.sh

I got the debug message:

 DEBUG o.o.b.m.i.ModbusTcpSlave[:94] - ModbusSlave: Error connecting to master: Verbindungsaufbau abgelehnt

Does anyone have an idea why this is not working or what I am doing wrong?

Many thanks in advance,
 
Christian

Falk Sauer

unread,
Aug 17, 2013, 2:40:08 AM8/17/13
to Unname

Try start 0 length 8 Or in your case start 2 length 1.
Regards
   Falk

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/groups/opt_out.

chri...@gmail.com

unread,
Aug 17, 2013, 4:27:12 AM8/17/13
to ope...@googlegroups.com


Am Samstag, 17. August 2013 08:40:08 UTC+2 schrieb Falk Sauer:

Try start 0 length 8 Or in your case start 2 length 1.


I tried, but unfortunately I get the same error message: 

 DEBUG o.o.b.m.i.ModbusTcpSlave[:94] - ModbusSlave: Error connecting to master: Verbindungsaufbau abgelehnt

Changing start and length sounds to me just where I look for values in the PLC. The error message sounds more that I can't establish a connection to the PLC before I can read something.
Have I wrongly configured something or do you have other ideas?

Many thanks,

Christian
Message has been deleted

chri...@gmail.com

unread,
Aug 17, 2013, 7:49:56 AM8/17/13
to ope...@googlegroups.com, chri...@gmail.com
Hello again,

I was able to solve it by my own. I found in the source code, that the structure for the binding has been changed and it is not documented on the web pages.

With following settings it works for me (instead of "host"+"Port" there is now a "connection" setting:

modbus:poll=300
modbus:tcp.slave1.connection=192.168.2.10:502
modbus:tcp.slave1.type=coil
modbus:tcp.slave1.id=1
modbus:tcp.slave1.start=12288
modbus:tcp.slave1.length=2


Best regards and thanks for all your work!

Christian

gisk...@gmail.com

unread,
Oct 26, 2013, 5:42:33 AM10/26/13
to ope...@googlegroups.com, chri...@gmail.com
HI sorry for my English.
 
For Coil all are ok.
 
But i'm not able with my Wago 750-881 plc to read and write holding.
 
Can you help me?
 
I tink the correct configuration is:
 
modbus:poll=300
modbus:tcp.slave1.connection=192.168.1.100:502
modbus:tcp.slave1.type=holding
modbus:tcp.slave1.id=1
modbus:tcp.slave1.start=12288
modbus:tcp.slave1.length=??????(what is the exact value?)
Reply all
Reply to author
Forward
0 new messages