ModBus Wago Output Control

Hi All,

Im trying to implement OpenHab into my new home,

I was able to connect to my Wago PLC 750-880 but im able just to read outputs states but not control them.

My config:

modbus:poll=5000
modbus:tcp.slave1.connection=x.x.x.x:502:rtu
modbus:tcp.slave1.id=1
modbus:tcp.slave1.type=coil
modbus:tcp.slave1.start=512
modbus:tcp.slave1.length=72
modbus:slave1.valuetype=bit

And Items:

Switch Light_GF_Kitchen_MySwitch0 “My Modbus Switch0” (GF_Kitchen, Lights) {modbus=“slave1:0”}
Switch Light_GF_Kitchen_MySwitch1 “My Modbus Switch1” (GF_Kitchen, Lights) {modbus=“slave1:1”}

Please let me know what Im doing wrong ?

With a quick look at the documentation I think you are starting too high in the registers. The COIL reads Function 1 and Writes Function 5
try starting at 0.

I always recommend using Wireshark to view the modbus/tcp packets as they go back and forth.

Thanks for You answer,

But changing to 0 didnt help, still status work but I cant turn it on.

Can You please explain what You mean with Function 1 and 5 ?

With modbus it sends function codes to tell the device what it is trying to do FC1 is to read a coil and FC5 is to write a coil.

From Modbus Binding
Modbus read functions

type=coil uses function 1,
type=discrete uses function is 2,
type=holding uses function is 3,
type=input uses function ist 4
Modbus write functions

type=coil uses function 5,
type=holding uses function is 6, see also http://www.simplymodbus.ca

From WAGO-I/O-SYSTEM 750
750-880 ETHERNET Controller Manual Page 264

Bit Access Writing (with FC5 and FC15)
Table 138: Bit Access Writing (with FC5 and FC15)
MODBUS address Memory range Description
[dec] [hex]
0...511 0x0000...0x01FF Physical output area (1) First 512 digital outputs
512...1023 0x0200...0x03FF Physical output area (1) First 512 digital outputs

Seams that my IT knowledge is to small,

From my config im using coil but how i suppose to write value for address 0 (Im getting under this address status of my first output in Wago)

What I write to my Advantech ADAM device as I watch the traffic using wireshark I see Write Single Coil, Funct: 5 Addr: 17

Do you have another program that you know works to control the WAGO device with modbus that you can watch the traffic of?

No, I dont. I’m not an 100% IT. So tracking lan traffic is a thing I never done.

I was hoping that there is some one on forum which was able to achieve both way communication with Wago

have you tried using the WAGO Binding

Yes I did,

It dosnt work cant even get status of outputs.

hello.

i am using wago 750-8207 and i want to ask about modbus address for IX0.0 and QX0,0.
i used 512 for output but its not working…

Please Help.
Thanks

i used 512 against QX0.0 but not working.
Actually i am working on scada , i have a plc 750-8207 , and i want to energize my physical output via modbus adress .
i used 512 for output QX0.0 but its not working…