Per Stenebo
2012-02-24 23:11:57
2019-11-10 20:46:18
Wago
WAGO/Kontron PC+PLC+IO: | LD beskrivning | 758 | 870 |
PLC+IO | 750-842 (träns) | 750-841 (panna) |
3S
3S | CoDeSys programming platform | Forum (EN) |
750
HTTP GET/POST
| Libraries | Application note |
Wago Linux Controller
| 750-860 |
Wago io modules
Example of Modbus addressing when mounted on a Wago 750-352 fieldbus coupler. Wago 750 IO-modules.
In static devices modbus addressing are usually simple and often printed in somewhat clear text on the datasheet. In PLCs and fieldbus couplers where different modules can be mixed in an almost infinite number of ways addressing must be dynamically assigned. The manufacturer might provide software that show modbus addressing in your current configuration, otherwise you have to collect information from the fieldbus coupler manual and the manuals of each module type.
The modbus addresses in the tables below are in decimal form and start on 0 (zero), however many modbus tools, like Modpoll refer to the first address as 1 (one).
Modbus addressing in Wago fieldbus couplers depend on a couple of things:
- The module type (input/output, digital/analog/special, number of channels, data width of each channel)
- The function code used, this is given by the module type.
- Module position in the coupler rack. The leftmost of each type has the lowest address.
Module 0
Wago 750-430 8-Channel Digital Input Module DC 24 V
Wago place digital input modules first in the modbus registers regardless of their physical position.
| Connector | LED | Modbus address |
Comment |
|---|---|---|---|
| 1 | A | 0 | |
| 2 | B | 2 | |
| 3 | C | 4 | |
| 4 | D | 6 | |
| 5 | E | 1 | |
| 6 | F | 3 | |
| 7 | G | 5 | |
| 8 | H | 7 |
Module 1
Wago 750-530 8-Channel Digital Output Module DC 24 V
Wago assign addresses to digital outputs with an offset of 512.
| Connector | LED | Modbus address |
Modbus address ¹ |
Comment |
|---|---|---|---|---|
| 1 | A | 512 | 0 | |
| 2 | B | 514 | 2 | |
| 3 | C | 516 | 4 | |
| 4 | D | 518 | 6 | |
| 5 | E | 513 | 1 | |
| 6 | F | 515 | 3 | |
| 7 | G | 517 | 5 | |
| 8 | H | 519 | 7 |
¹ These outputs can also be read and written on modbus address 0-7 when function codes for coils (1, 5 and 15) are used.
Module 2
Wago 750-638 2-Channel Up/Down Counter 24 V DC, 500 Hz
For wiring details, read 750-638 manual, page 7.
One option would be to wire 3 (0 VDC) directly to 4 (-DI1) and wire 2 (24VDC) over the counter contact to 1 (+DI1).
This is the first analog input module. 16 bit counter data width, counting from 0 to 65535 (0000 - FFFF as hexadecimal).
| Channel | Connector | Function code |
Modbus address | Comment | |
|---|---|---|---|---|---|
| Start | Count | ||||
| 1 | 1 | 3, 4, 6, 16 | 0 | 1 | Status/control byte, R/W. |
| 1 | 1 | 3, 4, 6, 16 | 1 | 1 | Counter value, R/W. |
| 2 | 5 | 3, 4, 6, 16 | 2 | 1 | Status/control byte, R/W. |
| 2 | 5 | 3, 4, 6, 16 | 3 | 1 | Counter value, R/W. |
The counter value can be read with function code 3 (read holding registers) and 4 (read input registers)
The counter control byte can be written with function code 6, write single holding register.
Read 750-638 manual, page 12, for details.
Example for (re-)set the value in counter 1
Open counter for writing by setting bit 5 in byte 0 to 1: 00100000.
In headecimal form that would be: 0x0020
With the PollMB tool from MBLogic this can be done like this:
python mbtools/pollmb/pollmb.py -h 192.168.0.50 -p 502 -t 3 -f 6 -a 0 -q 1 -d 0020
Now when the counter are open for writing (and locked for counting) we can set the counter to any value, here we are resetting it to zero with PollMB:
python mbtools/pollmb/pollmb.py -h 192.168.0.50 -p 502 -t 3 -f 6 -a 1 -q 1 -d 0000
The above can also be done in one operation with function code 16:
python mbtools/pollmb/pollmb.py -h 192.168.0.50 -p 502 -t 3 -f 16 -a 0 -q 2 -d 00200000
After resetting the counter value we probably want to open the counter for business again:
python mbtools/pollmb/pollmb.py -h 192.168.0.50 -p 502 -t 3 -f 6 -a 0 -q 1 -d 0000
Module 3
Wago 750-560 2 AO 0-10V DC 10Bit 10mA 24V
| Channel | Connector | Function code |
Modbus address | Comment | |
|---|---|---|---|---|---|
| Start | Count | ||||
| 1 | 1 | 6, 16 | 4 | 1 | Output value, W. |
| 1 | 1 | 3, 4, 6, 16 | 516 | 1 | Output value, R/W. |
| 1 | 1 | Status byte (not found) | |||
| 2 | 5 | 6, 16 | 5 | 1 | Output value, W. |
| 2 | 5 | 3, 4, 6, 16 | 517 | 1 | Output value, R/W. |
| 2 | 5 | Status byte (not found) | |||
Module 4
Wago 750-466, 2-Channel Analog Input Module 0/4-20 mA Single-Ended
| Channel | Connector | Function code |
Modbus address | Comment | |
|---|---|---|---|---|---|
| Start | Count | ||||
| 1 | 1 | 3, 4 | 4 | 1 | Read value, R. |
| 1 | 1 | Status byte (not found) | |||
| 2 | 5 | 3, 4 | 5 | 1 | Read value, R. |
| 2 | 5 | Status byte (not found) | |||
The read value will display 0003 if nothing are connected.
Value ranges from 0 to 32761 (0x0000 to 0x7FF9 as hex)
Module 5
Wago 750-461, 2-channel analog input module PT 100 / RTD for resistor sensors
| Channel | Connector | Function code |
Modbus address | Comment | |
|---|---|---|---|---|---|
| Start | Count | ||||
| 1 | 1 | 3, 4 | 6 | 1 | Read value, R. |
| 1 | 1 | Status byte (not found) | |||
| 2 | 5 | 3, 4 | 7 | 1 | Read value, R. |
| 2 | 5 | Status byte (not found) | |||
The read value will display 8500 (2134 as hex) if nothing are connected.
The read decimal value * 0,1 = °C. Example: 205 = 20,5°C
