Wago 750-880 Modbus Coils - How to adress correct

I´m using Modbus Wago 750-880 with 750-530 8xDO`s
slave + poller + data + items is installed via file .things + .items als below

.things- - file
Bridge modbus:tcp:slave1 [ host=“192.168.10.XXX”, port=502, id=1 ] {
Bridge poller slave1-coils [ start=0, length=50, refresh=500, type=“coil” ]

Thing data slave1-do0 [ readStart="0", readValueType="bit", writeStart="0", writeValueType="bit", writeType="coil" ]
Thing data slave1-do1 [ readStart="1", readValueType="bit", writeStart="1", writeValueType="bit", writeType="coil" ]
etc.

.items - file
Switch slave1do0 “Switch-S1-DO0-1A [%d]” (gLabTest) { channel=“modbus:tcp:slave1:slave1-coils:slave1-do0:switch” }
Switch slave1do1 “Switch-S1-DO1-1E [%d]” (gLabTest) { channel=“modbus:tcp:slave1:slave1-coils:slave1-do1:switch” }
etc.

something is going wrong - only at the first click on the “on button”
the LED at the 750-530 switches on
switches in the BasicUI and App toggle from on to off immediatly
only short color-change on the switch icon from red to green

The adresses in the Wago PLC - I´m using with another Programm:

Do0 0.0 - 512.0
Do1 0.1 - 512.1
Do2 0.2 - 512.2
etc.

Its not possible to work with these adresses in the data thing -> errors

Think I have to work on the modbus Transformations - but I dont know how to do
or is there another bug in my configuration ?

Need Help please
Thx a lot

1 Like

Show us your working; that’s to say, the Modbus binding does support Wago’s odd requirement for different read and write addresses.
See for example

See the note in the binding documentation about autoupdate.
That would stop the short false indication that it worked.

the data thing requires numbers without points so that the data thing in the paperui shows an error with write/writeadress 0.0 - 512.0 - its only reacting one time on 0 - 512
I testet this serveral times
wich further infomation do you need ?

will test the outoupdate tonight
thx

testet autoupdate 3 min ago -> same behavior as before
testet with 3 adresses on 2 div. slaves - that works
but on both slaves
3 leds A,B,C on 750-530 are on - on first switch klick

  • no posibility to switch them off
    and switch in paperUI toggles immediately from on to off

what to do ??

Configure it right :smiley:

No it doesn’t. The Modbus binding supports word.bit addressing, like 123.7 for bit 7 of register 123. There are examples of this in the binding documentation.
But this is only sensible when dealing with words, 16-bit registers. Type ‘holding’ or ‘input’.

‘coil’ and ‘discrete’ are single-bit modbus types, so trying to address those with word.bit form would be an error.

Now, I guess this register 500.0 and so on that you are trying to set up is really a holding register (16-bit) , with single bits being used to signal inputs or outputs or something.
You can easily set up to read poll from that:
You would setup a poller to read the holding register.
And data things to select the bitwise addresses like 500.1

BUT
I will warn you now that writing bitwise registers is difficult. That’s a limitation of Modbus (not openHAB - Modbus itself) that you cannot easily write individual bits in a register.
There are ways to do this if you have to.

But as I understand it, you can get at the same functions on a Wago by using alternative coil and discrete addresses, true single bit registers that we can read and write with ease.

The information that you need is what addresses of what type to read, and what addresses of what type to write. With Wago, these may not be the same.
Then we can help :smiley:

1 Like

thx - very interesting answer - think its a issue of correct adressing

on my old System - “Xhome” running the Wago 750 - works fine for years
Wago adesses are:

Do0 Write-Register: 0.0 - Status-Register: 512.0 Modbus Type: binary
Do1 Write-Register: 0.1 - Status-Register: 512.1 Modbus Type: binary
Do2 Write-Register: 0.2 - Status-Register: 512.2 Modbus Type: binary

maybe this info helps

I don’t want to guess what that means.
Have you tried setting this 750-880 up the same as your 750-881 in the other thread? That had coils reading from 0 and writing from 512 (read/write from openHAB view)

This is a Wago Digital output Card 750-530 - used to Switch Light on/off
Do0 Write-Register: 0.0 - Status-Register: 512.0 Modbus Type: binary → switch1 on/off
Do1 Write-Register: 0.1 - Status-Register: 512.1 Modbus Type: binary → switch2 on/off
Do2 Write-Register: 0.2 - Status-Register: 512.2 Modbus Type: binary → switch3 on/off

depending on the Wago Manual - the Digital outputs start at adress 512

the 750-881 has the same problem - its not runnig correct

seems to be an issue with set and reset the Do`s - with one switch .item

Tested actually this:
.things
Bridge modbus:tcp:slave0 [ host=“192.168.10.207”, port=502, id=0 ] {

Bridge poller slave0-coils [ start=0, length=500, refresh=500, type="coil" ] {
    // Note the zero based indexing: first coil is index 0.
   Thing data slave0-do0-off [ writeTransform="0", writeStart="512", writeValueType="bit", writeType="coil" ]
   Thing data slave0-do0-on [ writeTransform="1", writeStart="512", writeValueType="bit", writeType="coil" ]

.item
Switch slave0do0On “Switch-on-S0-DO0-1A [%d]” (gLabTest) { channel=“modbus:tcp:slave0:slave0-coils:slave0-do0-on:Switch”, autoupdate=“true”}
Switch slave0do0off “Switch-off-S0-DO0-1A [%d]” (gLabTest) { channel=“modbus:tcp:slave0:slave0-coils:slave0-do0-off:Switch”, autoupdate=“true”}

with the 2 switches now its possibe to turn the Do - on and off
switch on → only on
switch off → only off

but i wanted to do this in 1 switch with feedback from the Do - if its on or off

Depending on this -
poller only is used to read data from the Wago - is this correct ??
for write commads poller is not needed ?
think i have to add a read thing to get the data from die Wago

Bridge poller slave0-coils [ start=512, length=1, refresh=500, type="coil" ] 

is this correct ?
Thing data slave0-do0-on [ writeTransform=“1”, writeStart=“512”, writeValueType=“bit”, writeType=“coil” ]

 Thing data slave0-do0-read [ readStart="512", readValueType="bit" ]
-> is this correct ?
How to put this togeter in 1 switch ?

That’s rubbish. You’ll be here a long time if you just guess stuff.

Yes, exactly right.

Don’t. Put them together in data thing.

Bridge poller slave0-coils [ ... details for read polling from 512  ] {
   Thing data slave0-do0 [ [ readStart="512",  ..... writeStart="0" ... ]
}

EDIT - found an old post using Wago with Modbus-1 binding, suggests you should read from coil 512 and write to coil 0 , then 513 - 1 etc
Inputs and Outputs via Modbus with Wago 750-352 / Openhab 2 - #3 by mhsob.

thx a lot for your patience - fixed ist now - system is running correct
was very confused because of data/Adresses in the old system

The Wago docs are not at all clear.
When you have tested and are happy, please post a sample config for others later :smiley:

the config for the Wago 750-880 - Digital Outputs starting on Adress 512

.things
Bridge modbus:tcp:slave1 [ host=“192.168.10.xxx”, port=502, id=1 ] {

 Bridge poller slave1-coils [ start=512, length=3, refresh=500, type="coil" ] {

    Thing data slave1-do0 [ readStart="512", readValueType="bit", writeStart="512", writeValueType="bit", writeType="coil" ]
    Thing data slave1-do1 [ readStart="513", readValueType="bit", writeStart="513", writeValueType="bit", writeType="coil" ]
    Thing data slave1-do2 [ readStart="514", readValueType="bit", writeStart="514", writeValueType="bit", writeType="coil" ]

.items
Switch slave1do0 “Switch-S1-DO0-1A [%d]” (gLabTest) { channel=“modbus:tcp:slave1:slave1-coils:slave1-do0:Switch”, autoupdate=“true”}
Switch slave1do1 “Switch-S1-DO1-1E [%d]” (gLabTest) { channel=“modbus:tcp:slave1:slave1-coils:slave1-do1:Switch”, autoupdate=“true”}
Switch slave1do2 “Switch-S1-DO2-1x [%d]” (gLabTest) { channel=“modbus:tcp:slave1:slave1-coils:slave1-do2:Switch”, autoupdate=“true”}

1 Like

Okay, great stuff. Read and write both 512.

I would set autoupdate="false" for any Item frequently read-polled.

thx done