Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
255 views

WAGO User's Guide

Uploaded by

sharda1100
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
255 views

WAGO User's Guide

Uploaded by

sharda1100
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

List of contents for register 2

1 WAGO-I/O SYSTEM ................................................................. 1


1.1 Components .................................................................................................. 1
1.2 Installation.................................................................................................... 2
1.3 Methods of decentralisation........................................................................ 6

2 MODBUS Coupler/Controller................................................... 9
2.1 Hardware...................................................................................................... 9
2.2 Power supply ................................................................................................ 10
2.2.1 Electronic supply voltage............................................................................... 11
2.2.2 Supply voltage of the field side...................................................................... 12
2.3 Station address ............................................................................................. 13
2.4 Mode switch.................................................................................................. 14
2.5 Fieldbus connection ..................................................................................... 15
2.5.1 RS 485............................................................................................................ 15
2.5.2 RS 232............................................................................................................ 18

3 Technical data ............................................................................. 19


3.1 Dimensions.................................................................................................... 19
3.2 Coupler ......................................................................................................... 20
3.3 Controller ..................................................................................................... 21

4 MODBUS ..................................................................................... 23

5 Configuration .............................................................................. 25
5.1 Coupler ......................................................................................................... 25
5.1.1 Settings........................................................................................................... 25
5.1.1.1 Standard settings ............................................................................................ 26
5.1.1.2 Baud rate setting ............................................................................................ 26
5.1.1.3 Error detection, length of the character string................................................ 27
5.1.1.4 End of Frame Time ........................................................................................ 28
5.1.1.5 ASCII-/RTU mode......................................................................................... 28
5.1.1.6 Error Check.................................................................................................... 29
5.1.1.7 Extended Functions........................................................................................ 29
5.1.1.8 Watchdog ....................................................................................................... 30
5.1.1.9 Update Firmware ........................................................................................... 30
5.1.2 Data exchange between MODBUS master and I/O modules ........................ 31
5.1.3 Addressing the I/O modules........................................................................... 32
5.1.4 Application examples .................................................................................... 33

MODBUS / Introduction vii


15.12.99
5.2 Controller ..................................................................................................... 35
5.2.1 Settings .......................................................................................................... 35
5.2.1.1 Standard settings............................................................................................ 36
5.2.1.2 Baud rate setting ............................................................................................ 36
5.2.1.3 Error detection, length of character string ..................................................... 37
5.2.1.4 End of Frame Time........................................................................................ 38
5.2.1.5 ASCII-/RTU mode......................................................................................... 38
5.2.1.6 Error Check.................................................................................................... 39
5.2.1.7 Extended Functions ....................................................................................... 39
5.2.1.8 Watchdog....................................................................................................... 40
5.2.2 Data exchange between MODBUS master and controller ............................ 41
5.2.2.1 Data exchange between MODBUS master and I/O modules ........................ 42
5.2.2.2 Data exchange between MODBUS master and PLC functionality ............... 44
5.2.2.3 Data exchange between I/O modules and PLC functionality ........................ 45
5.2.2.4 Address review .............................................................................................. 46
5.2.3 Absolute addresses for inputs, outputs and flags........................................... 47
5.2.4 Addressing the I/O modules .......................................................................... 49
5.2.5 Application example...................................................................................... 50
5.2.6 Controller operating system........................................................................... 52
5.3 Common coupler/controller functions....................................................... 53
5.3.1 Implemented MODBUS functions ................................................................ 53
5.3.1.1 Use of the MODBUS functions..................................................................... 54
5.3.1.2 Read Coil Status ............................................................................................ 55
5.3.1.3 Read Input Status........................................................................................... 57
5.3.1.4 Read Holding Register................................................................................... 59
5.3.1.5 Read Input Register ....................................................................................... 60
5.3.1.6 Force Single Coil ........................................................................................... 61
5.3.1.7 Preset Single Register.................................................................................... 62
5.3.1.8 Fetch Comm Event Counter .......................................................................... 63
5.3.1.9 Force Multiple Coils...................................................................................... 64
5.3.1.10 Preset Multiple Registers............................................................................... 65
5.3.2 Watchdog - Fieldbus failure .......................................................................... 66
5.3.3 Configuration function .................................................................................. 70
5.3.4 Firmware information.................................................................................... 71
5.3.5 General registers ............................................................................................ 72

6 Start up and Diagnosis ............................................................... 73


6.1 Run up and error indications ..................................................................... 73
6.2 MODBUS LED ............................................................................................ 75
6.3 Starting up the controller with WAGO-I/O-PRO .................................... 76

viii MODBUS / Introduction


15.12.99
7 General Conditions.................................................................... 79
7.1 Transport and storage conditions .............................................................79
7.2 Climatic conditions .....................................................................................79
7.3 Mechanical conditions ................................................................................80
7.4 Class and degree of protection...................................................................81
7.5 Specifications and test results ....................................................................81
7.6 Electromagnetic compatibility...................................................................82

MODBUS / Introduction ix
15.12.99
x MODBUS / Introduction
15.12.99
1 WAGO-I/O-SYSTEM

1.1 Components
The WAGO-I/O SYSTEMÿcomprises of various components which allow the creation
of modular and user specific fieldbus nodes for various fieldbusses.

Fig. 1.1: Structure of a fieldbus node with the WAGO-I/O SYSTEM

General:
In all cases a fieldbus node comprises of a fieldbus coupler (1) or a programmable
fieldbus controller (1) as head station, a number of I/O modules (2) and an end module
(3), which forms the end of the system.

In the following description the term Coupler is used for the fieldbus coupler and the
term Controller for the programmable fieldbus controller.

1 – Coupler/Controller:
With its I/O functions the coupler/controller forms the logic operation between the
fieldbus used and the field area. All control tasks necessary for the perfect operation of
the I/O are performed by the coupler/controller. The connection to different fieldbus
systems is made using the corresponding coupler/controller e.g. for PROFIBUS,
INTERBUS, CAN, MODBUS etc. A retrofitting to a different fieldbus system by
changing the coupler is possible.

As opposed to the coupler the controller is fitted with additional PLC functions. This
permits signal pre-processing, which can considerably reduce the data quantity in the
network. In the case of a fieldbus failure the controller can process the control program
independently. Alternatively the controller can guide the node into a defined condition.
Plant modules become independent testable units due to the controller. In the delivered
condition, in other words without the user program, the controller behaves as a coupler.

MODBUS / Introduction 1
15.12.99
The user can program the controller in accordance with international standards for
controller programming, IEC 1131-3 or the corresponding European standard
EN 61131-3, in all five languages, IL, LD, FBD, ST and SFC.

The WAGO-I/O-PRO1 programming system is used for the following functions:


• Programmer setting
• Controller setting
• Loading the program in the controller
• Simulation
• Test and start-up
• Visualisation during operation
• Software documentation
The programming system runs on an IBM compatible PC (for the system requirement
please refer to the WAGO-I/O-PRO user manual).

2 – I/O modules
The input and output of the process data is made at the I/O modules. I/O modules are
available for various tasks in accordance with varying requirements. Available are
digital and analog input and output modules, I/O modules for angle and path
measurement as well as communication modules.
The individual I/O modules are described in detail in the following registers.

3 - End module
The node end module is indispensable. It is always fitted as the last module, to
guarantee the internal node communication. The end module has no I/O function.

_________________________________
1
WAGO-I/O-PRO User manual, English, Order No. 759-120/000-002

2 MODBUS / Introduction
15.12.99
1.2 Installation
All system components can be snapped directly on a carrier rail in accordance with the
European standard EN 50022 (TS 35). Installation is simple and space saving. All
modules have the same shape to minimise the project commitment.
It is not necessary to observe the order of analog and digital modules when engaging on
the rail. The reliable positioning and connection of the coupler/controllers and the
individual I/O modules is made using a tongue and groove system. Due to the
automatic locking the individual components are securely seated on the rail after
installing.

The coupler/controller must be fixed on the


carrier rail with the lateral orange coloured
locking disk.
The coupler/controller is removed by releasing
the locking disk and pulling the release lug
which is also orange coloured.

To fix the coupler/controller apply pressure on


the upper groove of the locking disk using a
screwdriver.
To remove the coupler/controllers release the
locking disk by pressing on the bottom groove.

Fig. 1.2: Coupler/controller, locking disk

It is also possible to release an individual I/O


module from the unit by pulling an unlocking
lug.

Fig. 1.3: Releasing a I/O module

Please note that in this manner the power supply to the field level and the data transfer
is interrupted. Ensure that an interruption of the PE will not result in a condition which
could endanger a person or equipment!

MODBUS / Introduction 3
15.12.99
Conductors with a cross section of from 0.08 to
2.5 mm² can be connected using a CAGE
CLAMP® to achieve a vibration resistant, fast
and maintenance free connection. To actuate the
CAGE CLAMP® enter a screw driver or an
actuation tool in the opening below the
connection. Following this enter the conductor in
the corresponding opening. the conductor is
Fig. 1.4: Inserting conductor end clamped securely with the removal of the
actuation tool.

The clamping force is automatically adapted to the cross section. The full surface of the
cage clamp pressure is applied against the conductor without damaging it. Conductor
deformation is compensated for and self-loosening is avoided. The transition point
between the conductor and the CAGE CLAMP® is protected against corrosive
influences. The connection can be made quickly and is also maintenance free, saving
the costs for a periodic checking of terminal connections.

The power supply modules of the


WAGO-I/O-SYSTEM are, in part, equipped
with a fuse holder. To isolate the following
modules from the power supply the fuse holder
can be removed. For this insert a screwdriver
into one of the slits available on each side and
lift the holder.

Fig. 1.5: Removing the fuse holder

The fuses can be removed from or inserted into


the holder with the fuse holder cover hinged
down. Following this close the cover and push
the fuse holder back into the original position.

Fig. 1.6: Opening the fuse holder

Fig. 1.7: Change fuse

4 MODBUS / Introduction
15.12.99
Do not connect the I/O module to gold spring
contacts in order to avoid soiling and scratches!

Fig. 1.8: Gold contacts

MODBUS / Introduction 5
15.12.99
1.3 Methods of decentralisation
By using the coupler or the controller it is possible to realise various methods for the
decentralisation of control tasks.

Fig. 1.9: Decentralisation methods

Central control using a coupler or a controller (1)


The process methods common to date: All input sensor signals are joined in the coupler
(Slave) and led to the higher ranking controls (Master) via a bus system. The data
generated for signal output in the higher ranking controls reaches the actuators via bus
and nodes. The reaction time of the controls is dependent upon the fieldbus.
This principle can be performed in the same manner using the controller.

Signal pre-processing using controller (2)


Certain control tasks, e.g. impulse generation, delays and counts (e.g. quantity), are
taken care of on site. The logic operations required are processed in the controller. The
bus system only transmits the results of the logic operations as process data to the higher
ranking controls. For signal pre-processing the amount of fieldbus data required is less
than that required for a central connection.

6 MODBUS / Introduction
15.12.99
Decentral control with controller (3)
The on site controller controls an assigned function area, e.g. a machine unit or
components of a transport system. The unit test can be made independently, i.e. without
higher ranking controls.
The higher ranking controls transmit data to the controller via the bus system, e.g. the
operating mode, set point values or the current production program (recipe). The
controller transmits local operating data to the higher ranking controls, such as operating
and control messages, actual values, counter readings etc. The complete linking for
actuator triggering is made in the controller, in other words directly on site. This permits
a fieldbus independent reaction of the controls.
In the case of a fieldbus failure the control program can be independently further
processed and the node put into a defined status.

MODBUS / Introduction 7
15.12.99
8 MODBUS / Introduction
15.12.99
2 MODBUS Coupler/Controller

2.1 Hardware

Fig. 2.1: MODBUS coupler/controller

The illustration above applies both to the MODBUS coupler as well as for the
MODBUS controller.

Each coupler/controller comprises of two enclosure sections:

left: enclosure for the electronics for bus connection and processing

right: a fixed installed power supply module as connection and distribution for the
power supply to the electronics in the coupler/controller enclosure, the
assembled I/O modules and the power supply in the field area.

MODBUS / Coupler/controller 9
15.12.99
2.2 Power supply

Fig. 2.2: Power supply

The power supply on the field side is electrically isolated from the electronic supply. In
this manner sensors and actuators can be supplied and fused by a separate voltage
source.

If a non-regulated power supply is used for the 24 V voltage supply of the


coupler/controller electronics, it must be ensured that they are supported by a capacitor
(200 µF per 1 A load current). To this effect a back-up capacitor module1 was developed
for the WAGO-I/O SYSTEM. This module serves for smoothing an unstable 24 V DC
voltage supply, in as much as the specified voltage deviation required cannot be
maintained. Cause for these fluctuations could be a voltage interruption on the primary
side, a secondary side overload or the switching of “non quenched” inductivity and
capacities.

ATTENTION!
Under no circumstances connect a voltage supply other than 24 V DC on the + and –
power supply modules of the coupler/controller. A power supply voltage of max.
230 V AC can only be supplied via the power supply modules 750-609, 750-611 and
750-612!

ATTENTION!
Disconnect the PE lead wires prior to undertaking an insulation test, otherwise this will
result in incorrect results or destruction of the I/O module.

1
Back-up capacitor module, Order No. 288-824
10 MODBUS / Coupler/controller
15.12.99
2.2.1 Electronic supply voltage

Fig. 2.3: Electronic supply voltage

The electronic supply voltage (24 V DC) is adapted using a voltage regulator and led to
the coupler/controller electronics as well as to the internal bus. The electrical isolation
of the external fieldbus system is made via a DC/DC converter and via an optocoupler
in the fieldbus interface.

The internal bus includes the internal communication between the coupler/controller
and the I/O modules as well as the power supply for the I/O modules. The maximum
power supply is 1.65 A. If the sum of the internal power consumption of all I/O modules
exceeds this value it is necessary to fit additional internal system supply modules2.

The control electronics in the I/O modules are supplied by snap-fit mounting the
I/O modules using the internal bus contacts. A reliable contact is assured by gold plated,
self cleaning slide contacts. The removal of a I/O module will cause an interruption of
the connection to the following I/O modules. The coupler/controller localises the
interruption point and sends a corresponding fault message via the red LED ‘I/O ERR’.

ATTENTION!
Removing or inserting the I/O modules with the voltage applied can lead to undefined
conditions. For this reason only undertake work on the I/O modules when isolated from
the power supply!

2
Internal system supply modules, order No. 750-613

MODBUS / Coupler/controller 11
15.12.99
2.2.2 Supply voltage of the field side

Fig. 2.4: Power contact for the power supply to the field side

The power is supplied to the field side automatically by snap-fitting the individual
I/O modules via self-cleaning power contacts (Fig. 2.4). These contacts are arranged on
the right hand side of the coupler/controller and the I/O modules, protected against
accidental contact, as spring contacts. On the left hand side of the I/O modules are
corresponding male contacts as counter pieces. Ensure that the current of the power
contacts does not permanently exceed 10 A.

The PE contact is a preceding ground (earth) contact corresponding to the standards


which can be used as a protective earth. The contact has a leakage capacity of 125 A.

ÿþýüûúùýø Please note that some I/O modules do not have any, or only individual power contacts
(dependent of the I/O function). This configuration is intended to interrupt the power
supply. If a field supply is required for the following I/O modules, it is necessary to use
a power supply module. Take note of the individual terminal/module data sheets! The
design of some modules does not physically allow assembly them in rows as the grooves
for the male contacts are closed at the top.

By fitting an additional power supply module the field supply is always interrupted by
the power contacts. From this point a new power supply is made, which can also include
a potential change (see Fig. 2.2). This possibility guarantees a high degree of system
flexibility.

12 MODBUS / Coupler/controller
15.12.99
2.3 Station address
The station address is set using both coding switches. The settable address is within the
01 and 99 range. The value 00 is reserved for the programming and configuration mode.

The lower coding switch serves for setting the address tens digit, the upper coding
switch for setting the units digit. The address is only read in and saved when switching
on. Changes made during operation have no effect.

The following example shows the setting of address 62:

Fig. 2.5: Coding switch

MODBUS / Coupler/controller 13
15.12.99
2.4 Mode switch

Fig. 2.6: Mode switch

The mode switch is only available in the controller and permits a manual Run/Stop-
status change.
Mode switch setting Function
From Stop to Run: Activate program processing
From Run to Stop: Stop program processing
(Bootstrap:) To bootstrap the firmware, not required by user
Hardware reset: Mode switch e.g. push down with screwdriver
All outputs are reset, variables are set to 0 or FALSE or to their initial value.
Flags remain in the same status.
Reset can be made with both Stop as well as Run.
Table 2.1: Mode switch, controller Stop = Program processing stopped
Run = Program processing running

ATTENTION!
If when changing over the mode switch from ‘Run’ to ‘Stop’ outputs are still
activated, these will remain in this status! Switching off on the software side, e.g.
by initiators is then ineffective because the program will no longer be processed!

(A mode change over is made internally at the end of a program cycle‘.)

14 MODBUS / Coupler/controller
15.12.99
2.5 Fieldbus connection

2.5.1 RS 485

Coupler : 750-312 and 750-315


Controller: 750-812 and 750-815

One transmission medium for the MODBUS is RS485, whereby, 2 or 4 wire can be
used. The following figure shows an example for a 2 wire version:

Fig. 2.7: 2 wire connection

As opposed to the above the 4 wire connection offers the advantage that it can use
simpler repeaters and converter. The following illustration is a corresponding example:

Fig. 2.8: 4 wire connection

MODBUS / Coupler/controller 15
15.12.99
Connect the D-SUB connection plug as follows:

9 pol. D-SUB Signal Direction Description


1 - not used
2 RxD In Signal received (4 wire)
3 TxD (RxD) Out Signal transmitted (received) (2 wire)
4 DE Out Repeater control signal
5 GND PWR Signal and supply earth (ground)
6 Vcc PWR Supply voltage, +5V (only for external connections)
7 RxD inverted In Receive signal with inverted level (4 wire)
8 TxD (RxD) inverted Out Send signal with inverted level (receive) (2 wire)
9 - not used
Table 2.2: Pin assignment for 4 wire connections

The connection point is mechanically lowered so that fitting into a 80 mm deep switch
cabinet is possible following the plug-in connection.
The pin assignment is 2 wire operation conforms with the Profibus assignment. Thus the
Profibus wiring components can be used.

One application possibility is the connection of a Yokogawa Interface. This PCB


supports the MODBUS protocol. The standard setting is the RTU mode (see chapter
MODBUS) and 4 wire connections. The pin assignment is as follows:

9 pol. D-SUB Signal 25 pol. SUB D Signal Colour


1 - - - -
2 RxD 14 SD A brown
3 TxD (RxD) 16 RD A red
4 DE - - -
5 GND 25 SG yellow/black
6 Vcc - - -
7 RxD (inv) 18 SD B black (brown pair)
8 TxD(RxD) (inv) 19 RD B black (red pair)
9 - - - -
Table 2.3: Yokogawa interface pin assignment

Switches for RS 485


The setting for 2 or 4 wire connections and switching in or out of the corresponding
matching resistors is made by switches, covered by the enclosure. To access the
switches remove the enclosure from the coupler/controller. A protruding locking device
can be found on the bottom of the unit on the two short sides. Push the two short sides
apart to permit the enclosure to be pushed past the unit metal plate. Simultaneously
press from above on the right hand section of the coupler/controller, which is the supply
side.

16 MODBUS / Coupler/controller
15.12.99
The enclosure prevents unintentional changes of the settings during later operation. If,
however, access to the settings is required in the case of a fault, ensure that the previous
settings are marked on a label.

After changing the settings push the enclosure back onto the coupler/controller. Note
that it may be necessary to lightly push the wide side of the coupler/controllers to the
side when the metal plate does not easily slide into the enclosure. In addition it may be
necessary to push the rotary switches into the cut-outs provided.

The switch on the interface printed circuit board for setting 2 and 4 wire connections or
for the matching resistors can be found in the following illustration:

Fig. 2.9: Interface printed circuit board

For 2 wire connections RxD and TxD are short circuited. By the termination, a series
circuit comprising of 3 resistors is connected to the bus conductor terminations.

Fig. 2.10: Internal matching resistors and interface switches

The standard setting for the supplied coupler/controller is a 2 wire connection and a
switched off matching resistor.

Four wire connections can be terminated as well as the receiver line.

MODBUS / Coupler/controller 17
15.12.99
2.5.2 RS 232

Coupler : 750-314 and 750-316


Controller: 750-814 and 750-816

The MODBUS can also be operated directly on an RS 232 interface. The D-SUB
connection plug is connected in this case as follows:

9-pol. D-SUB Signal Direction Description


1 - not used
2 TxD Out Signal received
3 RxD In Signal transmitted
4 - not used
5 GND PWR Signal and supply earth (ground)
6 - not used
7 - not used
8 - not used
9 - not used
Table 2.4: RS 232 plug assignment

The pin assignment permits the use of commercially available 9 pole 1:1 sockets/ plug
lines for direct connection to a PC.

18 MODBUS / Coupler/controller
15.12.99
3 Technical Data

3.1 Dimensions

Fig. 3.1: Dimensions of coupler/controller

MODBUS / Technical data 19


15.12.99
3.2 Coupler
SYSTEM DATA:
750-312 750-315 750-314 750-316

Max. number of nodes 99 with repeater 1


Max. number of I/O points about 6,000 (depends on master) 256
Transmission medium Shielded Cu cable 2 (4) x 0.25 mm²
Max. length of bus line 1,200 m (depends on baud rate/on the about 5 m
Baud rate 150-19,200 bauds 1.2-115.2 kbauds 150-19,200 bauds 1.2-115.2 kbauds
Type of transmission RS 485 RS 232
Table 3.1: System data, coupler

TECHNICAL DATA:
750-312, 750-314, 750-315, 750-316

Max. number of I/O modules 64


Digital points per node 256 (inputs and outputs)
Analogue points per node 128 (inputs and outputs)
Configuration possibility DIP switch and decimal coder
via PC or PLC device
Bus coupler connection 1 x D-Sub 9
Voltage supply 24 V DC (-15%/+20%)
Internal current consumption 350 mA
Current supply 85 mA typ.
580 mA max.
Power jumper contacts Blade / spring contact,
slide contacts, self-cleaning
Voltage power jumper contacts 24 V DC
Current power jumper contacts 10 A DC
Max. current supply at intern. 1,65 A
Data contacts Slide contacts, 2,5ÿ hart gold-plated
self-cleaning
Housing material Polycarbonate, polyamide 6.6
Marking Standard marker cards WAGO BR247/278
Marking cards 8 x 47 mm
Wire connection CAGE CLAMP, 0.08 mm² - 2.5 mm²
Vibrations-/Schockfestigkeit IEC 68-2-6 / IEC 68-2-27
Fitting position any
System of protection IP 20
Insulation 500 V system/supply
Operating temperature 0 °C ... +55 °C
Dimensions in mm 51 x 65* x 100 (*from upper edge of DIN 35 rail)
Table 3.2: Technical data, coupler

20 MODBUS / Technische Daten


15.12.99
3.3 Controller
SYSTEM DATA:
750-812 750-815 750-814 750-816

Max. number of nodes 99 with repeater 1


Max. number of I/O points about 6,000 (depends on master) 256
Transmission medium Shielded Cu cable 2 (4) x 0.25 mm²
Max. length of bus line 1,200 m (depends on baud rate/on the about 5 m
Baud rate 150-19,200 bauds 1.2-115.2 kbauds 150-19,200 bauds 1.2-115.2 kbauds
Type of transmission RS 485 RS 232
IEC 1131-3 programming WAGO-I/O-PRO IL, LL, FDB, ST, FC
Table 3.3: System data, controller

TECHNICAL DATA:
750-812, 750-814, 750-815, 750-816

Max. number of I/O modules 64


Digital points per node 256 (inputs and outputs)
Analogue points per node 128 (inputs and outputs)
Configuration possibility With function modules and switches
Program memory 32 kbytes
Data memory 32 kbytes
Residual memory 8 kbytes (retain)
I/O fieldbus area 256 words in input area and 256 words in output area
I/O modules area 256 words for inputs and 256 words for outputs
Cycle time < 3 ms for 1,000 statements / 256 I/O
Bus coupler connection 1 x D-Sub 9
Voltage supply 24 V DC (-15%/+20%)
Internal current consumption 350 mA
Current supply 85 mA typ.
580 mA max.
Power jumper contacts Blade / spring contact,
slide contacts, self-cleaning
Voltage power jumper contacts 24 V DC
Current power jumper contacts 10 A DC
Max. current supply at intern. 1.65 A
Data contacts Slide contacts, 2.5ÿ hart gold-plated
self-cleaning
Housing material Polycarbonate, polyamide 6.6
Marking Standard marker cards WAGO BR247/278
Marking cards 8 x 47 mm
Wire connection CAGE CLAMP, 0.08 mm² - 2.5 mm²
Resistance to shocks/vibrations IEC 68-2-6 / IEC 68-2-27
Fitting position any
System of protection IP 20
Insulation 500 V system/supply
Operating temperature 0 °C ... +55 °C
Dimensions in mm 51 x 65* x 100 (*from upper edge of DIN 35 rail)
Table 3.4: Technical data, controller

MODBUS / Technical data 21


15.12.99
22 MODBUS / Technische Daten
15.12.99
4 MODBUS

MODBUS is a master/slave system. The master is a superimposed control unit, e.g. a


PC or a PLC device. The MODBUS coupler/controller of the WAGO-I/O-SYSTEMS
are slave devices.

Bus conflicts do not occur because only one node is sending. The master makes a query
for communication. This query can be sent to a specific node or to all nodes as a
broadcast message. The nodes receive the query and return a response to the master,
depending on the kind of query.

Fig. 4.1: Example of a MODBUS topology

This bus topology is only valid for the variants with the RS 485 interface. With RS 232
it is only possible to have a peer-to-peer connection.

You will find further information on MODBUS in:

Online information on MODBUS: http://www.modicon.com/techpubs/toc7.html

MODBUS tools for PC: http://www.win-tech.com

MODBUS / Description MODBUS 23


15.12.99
24 MODBUS / Description MODBUS
15.12.99
5 Configuration

5.1 Coupler
750-312,
750-314,
750-315,
750-316

5.1.1 Settings
The factory set coupler configuration can be changed using the DIP switches FR and P.
The setting is made prior to start-up. Changes to switch settings during running
operation does not affect the configuration. This is only read in when switching on the
coupler power supply.

The ‘MODBUS coupler/controller’ chapter describes how to remove the enclosure from
the coupler to permit settings to be made.

Fig. 5.1: DIP switch arrangement on CPU printed circuit board, coupler

The following is a description of the coupler settings. Here the term ‘Frame’ is
frequently used. A ‘Frame’ is a data transmission block.

MODBUS / Configuration 25
15.12.99
5.1.1.1 Standard settings
The coupler is supplied with the following standard settings:
Designation Setting FR FR FR FR FR FR P1 P2 P3 P4 P5 P6 P7 P8 Chapt.
1 2 3 4 5 6
Baud rate 9600 Bd off on on 5.1.1.2
Byte Frame No Parity, 8 Bit off off off 5.1.1.3
1 Stop Bit
End of Frame 3 x Frame Time off off off 5.1.1.4
Time
Mode RTU mode on 5.1.1.5
Error Check to be processed on 5.1.1.6
Extended without off 5.1.1.7
Functions
Watchdog switched on off 5.1.1.8
Update normal off 5.1.1.9
Firmware operation
Table 5.1: Standard settings, coupler

5.1.1.2 Baud rate setting


The baud rate is set using DIP switches FR 1 to FR 3.
Baud rate Baud rate FR1 FR2 FR3

750-312/314 750-315/316

150 Bd 38400 Bd off off off

300 Bd 57600 Bd on off off

600 Bd 115200 Bd off on off

1200 Bd 1200 Bd on on off

2400 Bd 2400 Bd off off on

4800 Bd 4800 Bd on off on

9600 Bd 9600 Bd off on on

19200 Bd 19200 Bd on on on

Table 5.2: Baud rates, coupler

The standard setting is 9600 Baud.

26 MODBUS / Configuration
15.12.99
5.1.1.3 Error detection, length of the character string
A parity bit can additionally be transmitted with each byte. Data transfer faults are
detected with the help of the parity bit. A differentiation is made between parity checks
for even parity, odd parity and no parity.
For this the number of set bits (=1) are counted in the transmitted data bytes. For
example, with the transmission of the character string 1100 0101 the number of set bits
is even, namely 4. If the setting of an even parity bit is selected, then in this case it is set
to 0, so that the number of set bits still remains even. Analog to this, the odd parity bit 1
would be selected so that the number of set bits will be odd.
This type of error detection is assured with one error, with several errors under certain
circumstances this may no longer be assured. If the coupler recognises a parity error, the
frame is ignored and a new frame can only be received following a renewed ‘Start of
Frame’.
If the slave receives faulty frames, this will not be replied to. The master detects this
error in that after the preset time (Time-out) no corresponding frame was received.
In the MODBUS coupler 750-312 a parity bit can be attached to each byte. The data
length can be selected for 7 or 8 bit. In addition it is possible to add 1 to 3 stop bits.

Byte Frame Data length Stop Bits FR4 FR5 FR6

No Parity 8 1 off off off

Even Parity 8 1 on off off

Odd Parity 8 1 off on off

No Parity 8 2 on on off

No Parity 7 2 off off on

Even Parity 7 1 on off on

Odd Parity 7 1 off on on

No Parity 7 3 on on on

Table 5.3: Byte Frame, coupler

The standard setting is no parity, 8 bit data length and 1 stop bit.
During transmission in RTU mode the DIP switch FR6 is ignored, as the format is set to
8 bit in this mode.

MODBUS / Configuration 27
15.12.99
5.1.1.4 End of Frame Time
The end of frame time is the pause time following a frame, which is required to switch
over the repeater in slave. This time must permit gaps during a frame which will not
result in a faulty recognition of the end of frame time. The setting of the
end of frame time is made with DIP switches P1 to P3.

End of Frame Time P1 P2 P3

3 x Frame Time off off off

100 ms on off off

200 ms off on off

500 ms on on off

1s off off on

1 ms on off on

10 ms off on on

50 ms on on on

Table 5.4: End of Frame Time, coupler

The standard setting is 3 x frame time. The settings 1 ms, 10 ms and 50 ms are only
implemented as from firmware version 2.5 of the MODBUS coupler.

5.1.1.5 ASCII/RTU mode


MODBUS permits two different transmission modes:
ASCII mode: Each byte (8 Bit) is sent as a 2 ASCII characters.
Advantages: Displayable characters are transmitted. The gaps between characters
need not be observed, provided they do not exceed 1 second.
RTU mode: Each byte (8 Bit) comprises of two 4 bit hexadecimal characters.
Advantages: As only 1 character has to be transmitted for each byte a higher data
throughput is achieved in comparison to the ASCII mode.

The setting is made using DIP switch P4.

Mode P4

ASCII off

RTU on

Table 5.5: ASCII-/RTU mode, coupler

The standard setting is RTU mode.

28 MODBUS / Configuration
15.12.99
5.1.1.6 Error Check
A check sum (CRC) is calculated from the frame to be transmitted in the sender (higher
ranking controls). This check sum is transmitted in the frame to the receiver (coupler).
Once the error check is activated, this check sum is compared with the check sum
calculated in the coupler on the basis of the same instruction. An error is signalled by a
red LED ‘CRC’.

ATTENTION:
Do not set this option during operation!

The error check is set with the DIP switch P5.


Error Check P5

ignored off

being processed on

Table 5.6: Error Check, coupler

The standard setting is the switched on error check.

5.1.1.7 Extended Functions


The register for further internal diagnostic possibilities (extended functions) in the
address space of the coupler are not yet available. For this reason do not change the DIP
switch P6 standard setting (off).

Extended Functions P6

without off

available on

Table 5.7: Extended Functions, coupler

In the standard setting, other diagnostic possibilities are switched off.

MODBUS / Configuration 29
15.12.99
5.1.1.8 Watchdog
The watchdog serves for monitoring the data transfer between the higher ranking
controls and the coupler. If no communication has occurred after a default time, the
node is set into a secured status, i.e. the digital outputs of the node are set to 0 and the
analog outputs are set to the minimum value (e.g. with 4...20 mA to 4 mA).
The watchdog is switched on with DIP switch P7.
Watchdog P7

switched on off

switched off on

Table 5.8: Watchdog, coupler

The standard setting is with the watchdog switched on.


Selection of the watchdog is described in more detail in chapter 5.3.2.

5.1.1.9 Update Firmware


The DIP switch P8 releases the loading of a new firmware. This function has not yet
been implemented, for this reason do not change the standard setting (off) of the switch.
ATTENTION:
Only switch over the DIP switch P8 to update the firmware. Switching over during
operation may lead to a malfunction!
Update Firmware P8

normal operation off

Update Firmware on

Table 5.9: Update firmware, coupler

The standard setting is normal operation.

30 MODBUS / Configuration
15.12.99
5.1.2 Data exchange between MODBUS master and I/O modules
The data exchange between the MODBUS master sand coupler is made by bit or byte
reading and writing.
In the coupler are 4 different types of process data:
• Input words
• Output words
• Input bits
• Output bits
The addresses of the data words in the process illustration of the inputs and outputs are
shown in the next illustration:

Fig. 5.2: Data exchange between MODBUS master and I/O modules

MODBUS / Configuration 31
15.12.99
Access word for word to the digital input and output modules is made in accordance
with the following table:

Digital inputs/ 8. 7. 6. 5. 4. 3. 2. 1. 16. 15. 14. 13. 12. 11. 10. 9.


outputs

Process data word Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Byte High-Byte Low-Byte

D1 D0

Table 5.10: Allocation of digital inputs/outputs for process data word, coupler

5.1.3 Addressing the I/O modules


• The arrangement of the I/O modules in a node is optional.
• The I/O module addressing is based on the attendant coupler.
• Addressing is organised word for word and starts with the word address ‘0’ both for
the inputs as well as the outputs.
• The I/O module addressing corresponds to the sequence of their arrangement behind
the coupler. Addressing starts with the bus coupler, which can assign one or more
words per channel. This is followed by the I/O module addresses which can assign
one or two bits per channel. For the number of input and output bits or bytes please
refer to the corresponding I/O module data sheets.
• Addressing of I/O modules which are assigned to one or two bits per channel is also
made word for word. In other words in each case 16 inputs or outputs are allocated
one word. If less channels are present the remaining bits of the word remain free or
are reserved for extensions.
• If a node is extended by additional I/O modules for which one or more words are
assigned per channel, the I/O module addresses are displaced by one or two bits per
channel.

Data width ÿ 1 Word / channel Data width = 1 Bit / channel


Analog input modules Digital input modules
Analog output modules Digital output modules
Input modules for thermal elements Digital output modules with diagnosis (2 Bit / channel)
Input modules for resistance sensors Power supply modules with fuse holder / diagnosis
Pulse width output modules Solid State power relay
Interface module Relay output modules
Up/down counter
I/O modules for angle and path measurement
Table 5.11: I/O module data width

32 MODBUS / Configuration
15.12.99
5.1.4 Application examples
The following figure is an example for a process input image. The configuration
comprises of 10 digital and 8 analog inputs. The process image thus has a data length of
8 words for the analog and 1 word for the digital inputs, i.e. 9 words.

Fig. 5.3: Example for process input image, coupler

MODBUS / Configuration 33
15.12.99
The following configuration comprises of 2 digital and 4 analog outputs. This is an
example for a process output image. It comprises of 4 words for the analog and one
word for the digital outputs.

Fig. 5.4: Example for process output image, coupler

34 MODBUS / Configuration
15.12.99
5.2 Controller
750-812,
750-814,
750-815,
750-816

5.2.1 Settings
As opposed to the MODBUS coupler the factory configuration of the controller change
is not made by DIP switch, but is changed using a PC. The communication between the
controller and PC is described in the ‘Start-up and diagnosis’ chapter.

The controller is set on the software side using the ‘Fieldbus configuration’ function
block of the WAGO-I/O-PRO library. If this module is taken up in the control program,
the setting is made automatically even after changing the controller. The settings are
taken over into the controller parameter block. If the desired values are not already set, a
firmware reset is automatically made in bus operation and the controller restarts with the
selected settings.

If the controller is to be set independent of a machine or plant, a program which only


comprises of the configuration module can be downloaded and started from the
programming system.

Fig. 5.5: Function block for controller setting

The coupler settings are described as follows. Here the term ‘Frame’ is frequently used.
‘Frame’ is a data transfer record.

MODBUS / Configuration 35
15.12.99
5.2.1.1 Standard settings
The controller is delivered with the following standard values:
Input function block Setting Value Chapter
FieldbusConfiguration

BAUDRATE 9600 Bd 6 5.2.1.2

BYTEFRAME No Parity, 8 Bit 0 5.2.1.3


1 Stop Bit
DATALENGTH 8 Bit FALSE 5.2.1.3

ENDOFFRAMETIME 3 x Frame Time 0 5.2.1.4

ASCIIRTUMODE RTU mode TRUE 5.2.1.5

ERRORCHECKING being processed TRUE 5.2.1.6

EXTENDEDFUNCTIONS without FALSE 5.2.1.7

NOWATCHDOG Watchdog switched on FALSE 5.2.1.8

Table 5.12: Standard settings, controller

5.2.1.2 Baud rate setting


The following baud rates can be set:
Baud rate Baud rate BAUDRATE

750-812/814 750-815/816 Value

150 Bd 38400 Bd 0

300 Bd 57600 Bd 1

600 Bd 115200 Bd 2

1200 Bd 1200 Bd 3

2400 Bd 2400 Bd 4

4800 Bd 4800 Bd 5

9600 Bd 9600 Bd 6

19200 Bd 19200 Bd 7

Table 5.13: Baud rates, controller

The standard default setting is 9600 Baud.

36 MODBUS / Configuration
15.12.99
5.2.1.3 Error detection, length of the character string
A parity bit can additionally be transmitted with each byte. Data transfer faults can be
recognised with the help of the parity bit. A differentiation is made between parity
checks for even parity, odd parity and no parity.
For this the number of set bits (=1) are counted in the transmitted data bytes. For
example, during the transmission of the character string 1100 0101 the number of set
bits is even, namely 4. If the setting of an even parity bit is selected, then in this case it
is set to 0, so that the number of set bits still remains even. Analog to this, the odd parity
bit 1 would be selected so that the number of set bits will be odd.
This type of error detection is assured for one error, for several errors under certain
circumstances this error detection may no longer be assured. If the coupler recognises a
parity error, the frame is ignored and a new frame can only be received following a
renewed ‘Start of Frame’.
If the slave receives faulty frames, these will not be replied to. The master detects this
error in that after the preset time (Time-out) no corresponding frame is received.
In the MODBUS coupler 750-812 a parity bit can be attached to each byte. The data
length selected can be 7 or 8 bit. In addition it is possible to add 1 to 3 stop bits.

Byte Frame Data length Stop Bits DATALENGTH BYTEFRAME

Value Value
No Parity 8 1 FALSE 0

Even Parity 8 1 FALSE 1

Odd Parity 8 1 FALSE 2

No Parity 8 2 FALSE 3

No Parity 7 2 TRUE 0

Even Parity 7 1 TRUE 1

Odd Parity 7 1 TRUE 2

No Parity 7 3 TRUE 3

Table 5.14: Byte Frame, Controller

The standard setting is no parity, 8 bit data length and 1 stop bit. This setting is ignored
when transferring data in RTU mode, as the format of this mode is set to 8 bit.

MODBUS / Configuration 37
15.12.99
5.2.1.4 End of Frame Time
The end of frame time is the pause time following a frame which is required to switch
over the repeater in slave. This time must permit gaps during a frame without resulting
in a faulty detection of the end of frame time.
The setting of the end of frame time is made with the input ENDOFFRAMETIME.
End of Frame Time ENDOFFRAMETIME
Value
3 x Frame Time 0

100 ms 1

200 ms 2

500 ms 3

1s 4

1 ms 5

10 ms 6

50 ms 7

Table 5.15: End of Frame Time, Controller

The standard setting is 3 x frame time.

5.2.1.5 ASCII/RTU mode


MODBUS permits two different transmission modes:
ASCII mode: Each byte (8 Bit) is sent as 2 ASCII characters.
Advantage: Displayable characters are transmitted. The gaps between characters
need not be observed, provided they do not exceed 1 second.
RTU mode: Each byte (8 Bit) comprises of two 4 bit hexadecimal characters.
Advantage: As only 1 character has to be transmitted for each byte a higher data
throughput is achieved in comparison to the ASCII mode.

The setting is made using input ASCIIRTUMODE.

Mode ASCIIRTUMODE

Value
ASCII FALSE

RTU TRUE

Table 5.16: ASCII-/RTU mode, controller

The standard setting is RTU mode.

38 MODBUS / Configuration
15.12.99
5.2.1.6 Error Check
A check sum (CRC) is calculated from the frame to be transmitted in the sender (higher
ranking controls). This check sum is transmitted in the frame to the receiver (controller).
Once the error check is activated, this check sum is compared with the check sum
calculated in the coupler on the basis of the same instruction. An error is signalled by a
red LED ‘CRC’.

The setting is made via the input ERRORCHECKING.


Error Check ERRORCHECKING

Value
ignored FALSE

being processed TRUE

Table 5.17: Error Check, controller

Error Check activated is the standard setting.

5.2.1.7 Extended Functions


The registers for further internal diagnostic possibilities (extended functions) in the
address space of the coupler are not yet available. For this reason set the attendant input
EXTENDEDFUNCTIONS to FALSE.

Extended EXTENDEDFUNCTIONS
Functions
Value
without FALSE

available TRUE

Table 5.18: Extended functions, controller

In the standard setting, other diagnosis possibilities are switched off.

MODBUS / Configuration 39
15.12.99
5.2.1.8 Watchdog
The watchdog serves for monitoring the data transfer between the higher ranking
controls and the controller. If no communication occurs after a preset time, the
controller can be run into a secured status.
The watchdog is switched on via the NOWATCHDOG input.
Watchdog NOWATCHDOG

Value
switched on FALSE

switched off TRUE

Table 5.19: Watchdog, controller

Watchdog activated is the standard setting.


The watchdog selection is described is detail in chapter 5.3.2.

40 MODBUS / Configuration
15.12.99
5.2.2 Data exchange between MODBUS master and controller
The controller mainly comprises of PLC functionality as well the interface to the
I/O modules and to the MODBUS. Data is exchanged between the PLC functionality,
I/O modules and the MODBUS master. This system operates with two different address
formats.

Fig. 5.6: Data exchange between MODBUS master and controller

1 Data exchange between MODBUS master and I/O modules


(hexadecimal or decimal display of the addresses, x)

2 Data exchange between the MODBUS master (hexadecimal or decimal display of


the address, x) and PLC functionality (absolute addresses, %)

3 Data exchange between I/O modules and PLC functionality


(absolute addresses, %)

MODBUS / Configuration 41
15.12.99
5.2.2.1 Data exchange between MODBUS master and I/O modules
The data exchange between the MODBUS master and the I/O modules is made by
reading and writing in bits or bytes.
The controller handles four different types of process data:
• Input words
• Output words
• Input bits
• Output bits
The following figure shows the data word addresses in the process illustration of the
inputs and outputs:

Fig. 5.7: Data exchange between the MODBUS master and I/O modules

42 MODBUS / Configuration
15.12.99
The word for word access to the digital input and output modules is made in accordance
with the following table:

Digital inputs/ 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1.


outputs

Process data word Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Byte High-Byte Low-Byte

D1 D0

Table 5.20: Allocation of digital inputs/outputs to process data word, controller

Common access of MODBUS master and PLC functionality to outputs


ÿþýüûúùýø
The process illustration of outputs is described both by the MODBUS master as well as
by the PLC functionality, so that the I/O module outputs can be set or reset from both
sides. In the case of simultaneity no priority exists. Design the user programs of the
MODBUS master and the PLC functionality such that conflicting instructions for
simultaneous setting or resetting of outputs is excluded. Applicable in all cases is that
the individual instruction of the process illustration processed last will be written over.

MODBUS / Configuration 43
15.12.99
5.2.2.2 Data exchange between MODBUS master and PLC functionality

The fieldbus data in the MODBUS master and in the PLC functionality have different
address formats. The addresses of the MODBUS master are displayed hexadecimal or
decimal. The PLC functionality uses absolute addresses.

Fig. 5.8: Data exchange between MODBUS master and PLC functionality

44 MODBUS / Configuration
15.12.99
5.2.2.3 Data exchange between I/O modules and PLC functionality

Fig. 5.9: Data exchange between I/O modules and PLC functionality

MODBUS / Configuration 45
15.12.99
5.2.2.4 Address review

Fig. 5.10: Address review, controller

46 MODBUS / Configuration
15.12.99
5.2.3 Absolute addresses for inputs, outputs and flags
The direct display of individual memory cells (absolute addresses) in accordance with
IEC 1131-3 is made using special character strings in accordance with the following
table:

Position Character Designation Comments

1 % Starts absolute address

2 I Input

Q Output

M Flag

3 X* Single bit Data width

B Byte (8 Bits)

W Word (16 Bits)

D Double word (32 Bits)

4 Address

* The character ‘X’ for bits can be deleted


Table 5.21: Absolute addresses

Enter the absolute address character strings without blanks!

Address range for I/O module data:


Data width Address

Bit 0.0 ... 0.15 1.0 ... 1.15 ..... 254.0 ... 254.15 255.0 ... 255.15

Byte 0 1 2 3 ..... ..... 508 509 510 511

Word 0 1 ..... 254 255

DWord 0 ..... 127

Table 5.22: Address range for the I/O module data

Fieldbus data address range:


Data width Address

Bit 256.0 ... 256.15 257.0 ... 257.15 ..... 510.0 ... 510.15 511.0 ... 511.15

Byte 512 513 514 515 ..... ..... 1020 1021 1022 1023

Word 256 257 ..... 510 511

DWord 128 ..... 255

Table 5.23: Address range for fieldbus data

MODBUS / Configuration 47
15.12.99
Address range for flags (retain):
Data width Address

Bit 0.0 ... 0.15 1.0 ... 1.15 ..... 4094.0 ... 4094.15 4095.0 ... 4095.15

Byte 0 1 2 3 ..... ..... 8188 8189 8190 8191

Word 0 1 ..... 4094 4095

DWord 0 ..... 2047

Table 5.24: Address range for flags

Address calculation (depending upon the word address):


Bit address: Word address .0 to .15
Byte address: 1. Byte: 2 x Word address
2. Byte: 2 x Word address + 1
DWord address:
Lower section: Word address (even numbers) / 2
Upper section: Word address (uneven numbers) / 2, rounded off

Example for input absolute addresses:


%IX14. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 %I15.* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

%IB28 %IB29 %IB30 %IB31

%IW14 %IW15

%IDW7

* The character ‘X’ for single bits can be deleted

Table 5.25: Example for input absolute addresses

Example for output absolute addresses:


%QX5. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 %Q6.* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

%QB10 %QB11 %QB12 %QB13

%QW5 %QW6

%QDW2 (upper section) QDW3 (lower section)

* The character ‘X’ for single bits can be deleted

Table 5.26: Example for output absolute addresses

Example for flag absolute addresses:


%MX11. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 %M12.* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

%MB22 %MB23 %MB24 %MB25

%MW11 %MW12

%MDW5 (upper section) %MDW6 (lower section)

* The character ‘X’ for single bits can be deleted

Table 5.27: Example for flag absolute addresses

48 MODBUS / Configuration
15.12.99
5.2.4 Addressing the I/O modules
• The arrangement of the I/O modules in a node is optional.
• Addressing of the I/O modules relates to the attendant controller.
• Addressing is organised word for word and starts both for inputs as well as outputs
with word address ‘0’.
• The I/O module addressing corresponds to the arrangement order behind the
controller. Addressing starts with the I/O module, which occupy one or more words
per channel. The I/O module addresses which occupy one or two bits per channel
then follow. For the number of input and output bits or bytes please refer to the
corresponding I/O module data sheets.
• Addressing of the I/O modules which occupy one or two bits per channel is also
made word for word. 16 inputs or outputs each are arranged in one word. If less
channels are available the remaining bits of the word remain free or are reserved for
extensions.
• If a node is extended by additional I/O modules for which one or more words are
assigned per channel, the I/O module addresses are displayed accordingly by one or
two bits per channel.

Data width ÿ 1 word / channel Data width = 1 Bit / channel


Analog input modules Digital input modules
Analog output modules Digital output modules
Input modules for thermal elements Digital output modules with diagnosis (2 Bit / channel)
Input modules for resistance sensors Power supply module with fuse holder / diagnosis
Pulse width output modules Solid State power relay
Interface modules Relay output modules
Up/down counter
I/O modules for angle and path measurement
Table 5.28: Data width of I/O modules

MODBUS / Configuration 49
15.12.99
5.2.5 Application example
The following figure is an example of a process input image. The configuration
comprises of 10 digital and 8 analog inputs. The process image thus has a data length of
8 words for the analog and 1 word for the digital inputs, i.e. 9 words in total.

Fig. 5.11: Example for process input image, controller

50 MODBUS / Configuration
15.12.99
The following example for the process output image comprises of 2 digital and 4 analog
outputs. It comprises of 4 words for the analog and one word for the digital outputs.

Fig. 5.12: Example for process output image, controller

MODBUS / Configuration 51
15.12.99
5.2.6 Controller operating system

Fig. 5.13: Operating system, controller

52 MODBUS / Configuration
15.12.99
5.3 Common coupler/controller functions

5.3.1 Implemented MODBUS functions


The following table shows the functions which support both the MODBUS coupler as
well as the MODBUS controller:

Function Function Description


code

0x01 Read Coil Status Read input bits and output bits as an octet string.
Functions are
identical
0x02 Read Input Status Read input bit as an octet string.

0x03 Read Holding Registers Read number of input words.


Functions are
identical
0x04 Read Input Registers Read number of input words.

0x05 Force Single Coil Write output bit.

0x06 Preset Single Register Writes a value in an output word.

0x0B Fetch Comm Event Ctr Read status word and event counter.

0x0F Force Multiple Coils Writes a number of output bits.

0x10 Preset Multiple Regs Writes a number of output words.

Table 5.29: Implemented functions

MODBUS / Configuration 53
15.12.99
5.3.1.1 Use of the MODBUS functions
The graphical review shows the MODBUS functions which have access to process
illustration data.

Fig. 5.14: Review of MODBUS functions, e.g. with coupler

It is to be recommended to access the analog signals with register functions ➀ and


binary signals with coil functions ➁. If access is also required to reading and writing
binary signals with register functions ➂, the addresses are displayed as soon as a further
analog modules are fitted.

54 MODBUS / Configuration
15.12.99
5.3.1.2 Read Coil Status (function code 0x01):

This function reads the status of the input and output bits (coils) in slave, whereby
broadcast is not supported. With coupler/controller the number of I/O points is limited
to 256.

Inquiry:
The Inquiry determines the starting address and the number of bits to be read.
ÿþýüûúùýø
The first point is addressed with 0. With Modicon the addressing starts with 1 (0x01).

The following table shows an example for an inquiry, with which the bits 0 to 7 of the
slaves 11 are to be read:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x01 0x01 ”01” 0x30, 0x31
Starting address high 0x00 0x00 ”00” 0x30, 0x30
Starting address low 0x00 0x00 ”00” 0x30, 0x30
Number of points high 0x00 0x00 ”00” 0x30, 0x30
Number of points low 0x08 0x08 ”08” 0x30, 0x38
Error Check (LRC / CRC) - 0x3D ”EC” 0x45, 0x43
0x66
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.30: Inquiry example, Read Coil Status

Reply:
The current values of the interrogated bits are packed in the data field. A 1 corresponds
to the ON status and a 0 to the OFF status. The lowest value bit of the first data byte
contains the first bit of the inquiry. The others follow in an ascending order. If the
number of inputs are not a multiple of 8, the remaining bits of the last data byte are
filled with zeroes. If the number of bits interrogated exceed the number of inputs or
outputs present in the node, the remaining input bits are set to zero and the outputs
contain the last valid value.

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3A
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x01 0x01 ”01” 0x30, 0x31
Byte Count 0x01 0x01 ”01” 0x30, 0x31
Data (point 8...0) 0x12 0x12 ”12” 0x31, 0x32
Error Check (LRC / CRC) - 0xD2 ”E1” 0x45, 0x31
0x5D
End of frame - t1-t2-t3 - 0xD, 0xA
Table 5.31: Reply example, Read Coil Status

MODBUS / Configuration 55
15.12.99
The status of the inputs 7 to 0 is shown as byte value 0x12 or binary 0001 0010. Input 7
is the bit having the highest valency of this byte and input 0 the lowest value.
The assignment is thus made from 7 to 0 with OFF-OFF-OFF-ON-OFF-Off-ON-OFF.

Bit: 0 0 0 1 0 0 1 0
Coil: 7 6 5 4 3 2 1 0

56 MODBUS / Configuration
15.12.99
5.3.1.3 Read Input Status (function code 0x02):

This function reads the input bits in the slave, whereby broadcast is not supported. With
the coupler/controller the number of points is limited to 256.

Inquiry:
The inquiry determines the starting address and the number of bits to be read.
ÿþýüûúùýø The first point is addressed with 0. With Modicon addressing starts with 1 (0x01).

The following table shows an example of an inquiry with which the bits 0 to 7 of the
slaves 11 are to be read:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x02 0x02 ”02” 0x30, 0x32
Starting address high 0x00 0x00 ”00” 0x30, 0x30
Starting address low 0x00 0x00 ”00” 0x30, 0x30
Number of points high 0x00 0x00 ”00” 0x30, 0x30
Number of points low 0x08 0x08 ”08” 0x30, 0x38
Error Check (LRC / CRC) - 0x79 ”EC” 0x45, 0x42
0x66
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.32: Example inquiry, Read Input Status

Reply:
The current value of the inquired bit is packed into the data field. A 1 corresponds to
the ON status and a 0 the OFF status. The lowest value bit of the first data byte contains
the first bit of the inquiry. The other follow in an ascending order. If the number of
inputs are not a multiple of 8, the remaining bits of the last data byte are filled with
zeroes. If the number of bits interrogated exceed the number of inputs present in the
node, the remaining input bits are set to zero.

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3A
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x02 0x02 ”02” 0x30, 0x32
Byte Count 0x01 0x01 ”01” 0x30, 0x31
Data (point 8...0) 0x12 0x12 ”12” 0x31, 0x32
Error Check (LRC / CRC) - 0x22 ”E0” 0x45, 0x30
0x5D
End of frame - t1-t2-t3 - 0xD, 0xA
Table 5.33: Example reply, Read Input Status

MODBUS / Configuration 57
15.12.99
The status of the inputs 7 to 0 is shown as a byte value 0x12 or binary 0001 0010. Input
7 is the bit having the highest valency of this byte and input 0 the lowest value.
The assignment is thus made from 7 to 0 with OFF-OFF-OFF-ON-OFF-Off-ON-OFF.

Bit: 0 0 0 1 0 0 1 0
Coil: 7 6 5 4 3 2 1 0

58 MODBUS / Configuration
15.12.99
5.3.1.4 Read Holding Register (function code 0x03)

The binary contents of holding registers are read out in the slave using this function.
Broadcast is not supported. The maximum number is limited to 128 registers in one
frame.

Inquiry:
The inquiry determines the start word address (start register) and the number the register
to be read.

ÿþýüûúùýø The addressing starts with 0. The Modicon address starts with 1 (0x01).

Example for an inquiry of the registers 0 and 1 of slave 11:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x03 0x03 ”03” 0x30, 0x33
Starting address high 0x00 0x00 ”00” 0x30, 0x30
Starting address low 0x00 0x00 ”00” 0x30, 0x30
Number of points high 0x00 0x00 ”00” 0x30, 0x30
Number of points low 0x02 0x02 ”02” 0x30, 0x32
Error Check (LRC / CRC) - 0xC4 ”F0” 0x46, 0x30
0xA1
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.34: Example inquiry, Read Holding Register

Reply:
The reply register data is packed as 2 bytes per register. The first byte contains the
higher value bits, the second the lower values. A reply to the above inquiry appears as
follows:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3A
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x03 0x03 ”03” 0x30, 0x33
Byte Count 0x04 0x04 ”04” 0x30, 0x34
Data Hi (Register 0) 0x3F 0x3F ”3F” 0x33, 0x46
Data Lo (Register 0) 0xFB 0xFB ”FB” 0x46, 0x42
Data Hi (Register 1) 0x00 0x00 ”00” 0x30, 0x30
Data Lo (Register 1) 0x00 0x00 ”00” 0x30, 0x30
Error Check (LRC / CRC) - 0x2D ”B4” 0x42, 0x34
0x61
End of frame - t1-t2-t3 - 0xD, 0xA
Table 5.35: Example reply, Read Holding Register

The contents of register 0 is displayed hexadecimal by two byte values: 0x3F and 0xFB
or 16379 decimal. The contents of register 1 are 0x00 and 0x00 or 0 decimal.

MODBUS / Configuration 59
15.12.99
5.3.1.5 Read Input Register (Function code 0x04)

This function serves to read a number of input words (also ”input register”). Broadcast
is not supported and the maximum number is limited to 128 registers in one frame.

Inquiry:
The inquiry determines the address of the start word (start register) and the number of
the register to be read.
ÿþýüûúùýø Addressing starts with 0. The Modicon address starts with 1 (0x01).

Example for an inquiry of the registers 0 and 1 ofslave 11:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x04 0x03 ”03” 0x30, 0x33
Starting address high 0x00 0x00 ”00” 0x30, 0x30
Starting address low 0x00 0x00 ”00” 0x30, 0x30
Number of points high 0x00 0x00 ”00” 0x30, 0x30
Number of points low 0x02 0x02 ”02” 0x30, 0x32
Error Check (LRC / CRC) - 0xC4 ”F0” 0x46, 0x30
0xA1
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.36: Example enquiry, Read Input Register

Replay:
The register data of the answer is packed as 2 bytes per register. The first byte has the
higher value bits, the second the lower values. A reply to the above inquiry appears as
follows:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3A
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x04 0x03 ”03” 0x30, 0x33
Byte Count 0x04 0x04 ”04” 0x30, 0x34
Data Hi (Register 0) 0x3F 0x3F ”3F” 0x33, 0x46
Data Lo (Register 0) 0xFB 0xFB ”FB” 0x46, 0x42
Data Hi (Register 1) 0x00 0x00 ”00” 0x30, 0x30
Data Lo (Register 1) 0x00 0x00 ”00” 0x30, 0x30
Error Check (LRC / CRC) - 0x2D ”B4” 0x42, 0x34
0x61
End of frame - t1-t2-t3 - 0xD, 0xA
Table 5.37: Example reply, Read Input Register

The contents of register 0 are shown hexadecimal by two byte values: 0x3F and 0xFB or
16379 decimal. The contents of register 1 are 0x00 and 0x00 or 0 decimal.

60 MODBUS / Configuration
15.12.99
5.3.1.6 Force Single Coil (Function code 0x05):

With the aid of this function a single output bit is written. This function can also be sent
as a broadcast, in which case the same bit is set in all slaves. With coupler/controller the
number of I/O points is limited to 256.

Inquiry:
The required ON or OFF status is specified in the data field of the inquiry. A value of
0xFF00 sets the output bit to 1, a value of 0x00 on 0. Other values are not specified and
have no effect on the output condition. In this example the bit 0 is set to 1 in slave 11:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x05 0x05 ”05” 0x30, 0x35
Coil address high 0x00 0x00 ”00” 0x30, 0x30
Coil address low 0x00 0x00 ”00” 0x30, 0x30
Force data high 0xFF 0xFF ”FF” 0x46, 0x46
Force data low 0x00 0x00 ”00” 0x30, 0x30
Error Check (LRC / CRC) - 0x8C ”F1” 0x46, 0x31
0x90
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.38: Example inquiry, Force Single Coil

Reply:
The reply is an echo of the inquiry and will be or is returned when the bit is set.

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x05 0x05 ”05” 0x30, 0x35
Coil address high 0x00 0x00 ”00” 0x30, 0x30
Coil address low 0x00 0x00 ”00” 0x30, 0x30
Force data high 0xFF 0xFF ”FF” 0x46, 0x46
Force data low 0x00 0x00 ”00” 0x30, 0x30
Error Check (LRC / CRC) - 0x8C ”F1” 0x46, 0x31
0x90
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.39: Example reply, Force Single Coil

MODBUS / Configuration 61
15.12.99
5.3.1.7 Preset Single Register (Function code 0x06):

This function writes a value in one single output word (also ”Output register”). This
function can also be sent as a broadcast, in which case the same output word is set in all
slaves.

Inquiry:
ÿþýüûúùýø Addressing starts with 0. The Modicon address starts with 1 (0x01).
The inquiry determines the address of the first output word to be set.
The value to be set is determined in the inquiry data field.

In the example the register 0 is set in slave 11.

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x06 0x06 ”06” 0x30, 0x36
Register address high 0x00 0x00 ”00” 0x30, 0x30
Register address low 0x00 0x00 ”00” 0x30, 0x30
Preset data high 0x12 0x12 ”12” 0x31, 0x32
Preset data low 0x34 0x34 ”34” 0x33, 0x34
Error Check (LRC / CRC) - 0x8C ”A9” 0x41, 0x39
0x17
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.40: Example inquiry, Preset Single Register

Reply:
The reply is an echo of the inquiry and is sent after setting the register.

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x06 0x06 ”06” 0x30, 0x36
Register address high 0x00 0x00 ”00” 0x30, 0x30
Register address low 0x00 0x00 ”00” 0x30, 0x30
Preset data high 0x12 0x12 ”12” 0x31, 0x32
Preset data low 0x34 0x34 ”34” 0x33, 0x34
Error Check (LRC / CRC) - 0x8C ”A9” 0x41, 0x39
0x17
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.41: Example reply, Preset Single Register

62 MODBUS / Configuration
15.12.99
5.3.1.8 Fetch Comm Event Counter (Function code 0x0B):

This function returns a status word and an event counter from the communication event
counter of the slave. With this counter the master can determine whether the slave has
treated the slave without a fault.
Following each successful news processing the counter counts up. This counting
process is not performed in the case of exception replies, poll commands or counter
inquiries.
The event counter can be reset using the diagnosis function (Code 0x08), the restart sub-
function communications option (Code 0x01) or clear counters and the diagnosis
register (Code 0x0A).

Inquiry:
In the example the communication counter of the slave 11 is read:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x0B 0x0B ”0B” 0x30, 0x42
Error Check (LRC / CRC) - 0x47 ”EA” 0x45, 0x41
0x47
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.42: Example inquiry, Fetch Comm Event Counter

Reply:
The reply contains a 2 byte status word and a 2 byte event counter. The status word only
contains zeroes.

The following table shows an example of a reply:

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x0B 0x0B ”0B” 0x30, 0x42
Status high 0x00 0x00 ”00” 0x30, 0x30
Status low 0x00 0x00 ”00” 0x31, 0x33
Event count high 0x00 0x00 ”00” 0x30, 0x30
Event count low 0x03 0x03 ”03” 0x30, 0x33
Error Check (LRC / CRC) - 0xE4 ”E7” 0x45, 0x37
0xA0
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.43: Example reply, Fetch Comm Event Counter

The event counter shows that 3 (0x03) events were counted.

MODBUS / Configuration 63
15.12.99
5.3.1.9 Force Multiple Coils (Function code 0x0F):
Using this function a number of output bits are set to 1 or 0. With a broadcast
transmission the same bits are set in all activated on slaves. The maximum number is
256 bits.
Inquiry:
ÿþýüûúùýø The first point is addressed with 0. The Modicon address starts with 1 (0x01).
The inquiry news specifies the bits to be set. The requested 1 or 0 states are determined
by the contents of the inquiry data field.
In this example 16 bits are set, starting with the address 0 in slave 11. The inquiry
contains 2 bytes with the value 0xA5F0 in other words 1010 0101 1111 0000 binary.
Bit: 1 0 1 0 0 1 0 1 1 1 1 1 0 0 0 0
Coil: 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8

The first byte transmits the 0xA5 to the addresses 7 to 0, whereby 0 is the lowest value
bit. The next byte transmits 0xF0 to the addresses 15 to 8, whereby the lowest value bit
is 8.
Field name Example RTU ASCII
Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x0F 0x0F ”0F” 0x30, 0x46
Coil address high 0x00 0x00 ”00” 0x30, 0x30
Coil address low 0x00 0x00 ”00” 0x30, 0x30
Quantity of coils high 0x00 0x00 ”00” 0x30, 0x30
Quantity of coils low 0x10 0x10 ”10” 0x31, 0x30
Byte Counter 0x02 0x02 ”02” 0x30, 0x32
Force data high (coils 7 ... 0) 0xA5 0xA5 ”A5” 0x41, 0x35
Force data low (coils 15 ... 8) 0xF0 0xF0 ”F0” 0x46, 0x30
Error Check (LRC / CRC) - 0xE7 ”3F” 0x33, 0x46
0x94
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.44: Example inquiry, Force Multiple Coils

Reply:
The reply is the address of the slave, the function code, the starting address and the
number of set bits.
Fieldname Example RTU ASCII
Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x0F 0x0F ”0F” 0x30, 0x46
Coil address high 0x00 0x00 ”00” 0x30, 0x30
Coil address low 0x00 0x00 ”00” 0x30, 0x30
Quantity of coils high 0x00 0x00 ”00” 0x30, 0x30
Quantity of coils low 0x10 0x10 ”10” 0x31, 0x30
Error Check (LRC / CRC) - 0x54 ”D6” 0x44, 0x36
0xAD
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.45: Example reply, Force Multiple Coils

64 MODBUS / Configuration
15.12.99
5.3.1.10 Preset Multiple Registers (Function code 0x10):

This function writes values in a number of output words (also ”Output register”). With a
broadcast transmission the values are written in all slaves. The maximum register
number per frame is 128.

Inquiry:
ÿþýüûúùýø The first point is addressed with 0. The Modicon address starts with 1 (0x01).
The inquiry message determines the registers to be set. The data is sent as 2 bytes per
register.

The example shows how data is set in the two registers 0 and 1 in slave 11:
Field name Example RTU ASCII
Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x10 0x10 ”10” 0x31, 0x30
Starting address high 0x00 0x00 ”00” 0x30, 0x30
Starting address low 0x00 0x00 ”00” 0x30, 0x30
Number of register high 0x00 0x00 ”00” 0x30, 0x30
Number of register low 0x02 0x02 ”02” 0x30, 0x32
Byte Counter 0x04 0x04 ”04” 0x30, 0x34
Data high (register 0) 0x12 0x12 ”12” 0x31, 0x32
Data low (register 0) 0x34 0x34 ”34” 0x33, 0x34
Data high (register 1) 0x56 0x56 ”56” 0x35, 0x36
Data low (register 1) 0x78 0x78 ”78” 0x37, 0x38
Error Check (LRC / CRC) - 0xA9 ”CB” 0x43, 0x42
0x43
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.46: Example inquiry, Preset Multiple Registers

Reply:
The reply returns the slave address, the function code, the start address and the number
of the set register.

Field name Example RTU ASCII


Start of frame - t1-t2-t3 ”:” 0x3a
Slave address 0x0B 0x0B ”0B” 0x30, 0x42
Function code 0x10 0x10 ”10” 0x31, 0x30
Starting address high 0x00 0x00 ”00” 0x30, 0x30
Starting address low 0x00 0x00 ”00” 0x30, 0x30
Number of register high 0x00 0x00 ”00” 0x30, 0x30
Number of register low 0x02 0x02 ”02” 0x30, 0x32
Error Check (LRC / CRC) - 0x41 ”E3” 0x45, 0x33
0x62
End of frame t1-t2-t3 - 0xD, 0xA
Table 5.47: Example reply, Preset Multiple Registers

MODBUS / Configuration 65
15.12.99
5.3.2 Watchdog - Fieldbus failure
The watchdog serves for monitoring the data transfer between the higher ranking
ÿþýüûúùýø
controls and coupler/controller. For this the higher ranking controls cyclically actuate a
time function (Time-out) in the coupler/controller. In the case of fault free
communication this time cannot reach its end value, because prior to this it is restarted
again and again. If this time has elapsed a fieldbus failure has occurred.

The watchdog must be switched on so that it can be activated (see ‘coupler/settings’ or


‘Controller/settings’).

In the coupler/controller special registers are present for the selection and status inquiry
of the watchdog by the higher ranking controls (Register addresses 0x1000 to 0x1008).

After switching on the supply voltage the watchdog is not yet activated. First lay down
the time-out value (Register 0x1000). The watchdog can be activated by writing a
function code in the mask register (0x1001), which is unequal 0. A second activation
possibility is to write a value in the toggle register (0x1003) deviating from 0.

Reading the minimum trigger time (Register 0x1004) reveals whether the watchdog
fault reaction was activated. If this time value is 0, a fieldbus failure is assumed. The
watchdog can be restarted in accordance with the previously mentioned two possibilities
or using the register 0x1007.

If the watchdog is started once it can only be stopped by the user for safety reasons via a
certain path (register 0x1005 or 0x1008).

66 MODBUS / Configuration
15.12.99
Watchdog register:
The table below shows the registers for the Watchdog/Supervisor function.
Register Designation Access Length Default Description
address (word)

0 x 1000 Watchdog/ read/ 1 pu/co This register saves the value for time exceeded
Supervisor write 0x0000 (Time-out). To be able to start the watchdog default
time value must have a value which is not equal to zero.
WD_TIME The time is set as a multiple of 100 ms, 0x0009
means a time out time of 0.9 s. This value cannot be
changed when the watchdog is running.

0 x 1001 Watchdog/ read/ 1 pu/co Using this mask the function codes can be set to
Supervisor write 0x0000 trigger the watchdog function. The function code can
Coding mask, be selected via a ‘1’ to
(Function code-1)
Function code 1...16, (=2 + ....)
WDFCM_1_16
Bit 1001.0 corresponds to function code1,
Bit 1001.1 corresponds to function code2...

The watchdog function is started if a value is not


equal to zero. If only codes from non-supported
functions are entered in the mask the watchdog will
not start. An existing fault is reset and writing into the
process illustration is possible. Also here changes
cannot be made while the watchdog is running.

0 x 1002 Watchdog function read/ 1 pu/co Same function as above, however, with the function
Coding mask, write 0x0000 codes 17 to 32. These codes are not supported, for
Function code this reason the default value of this register should
17...32, not be changed. It is not possible do modify this value
WD_FCM_17_32 while the watchdog is running.

0 x 1003 Watchdog trigger, read/ 1 pu/co This register is used for an alternative trigger method.
WD_TRIGGER write 0x0000 The watchdog is triggered by writing different values
in this register. Values following each other must
differ in size. Writing of a value not equal to zero
starts the watchdog. In case of a watchdog fault this
register is reset to zero.

0 x 1004 Minimal actual trigger read/ 1 pu/co Using this value the current watchdog status can be
time, write 0xFFFF read. If the watchdog is triggered the saved value is
WD_AC_TRG_TIME compared with the current value. If the current value
is smaller than the saved value this is replaced by the
current value. The unit is 100 ms/digit. The saved
value is changed by writing new values, which does
not affect the watchdog. 0x000 is not permissible.

0 x 1005 Stop watchdog, read/ 1 pu/co The watchdog is stopped if here the value 0xAAAA is
WD_AC_STOP_MASK write 0x0000 written first, followed by 0x5555. The watchdog fault
reaction is blocked. A watchdog fault is reset and
writing on the process data is possible again.

0 x 1006 When watchdog is read 1 pu Current watchdog status.


running, 0x0000 at 0x0: Watchdog not active,
WD_RUNNING at 0x1: Watchdog active.

0 x 1007 Restart watchdog, read/ 1 pu Writing 0x1 into the register starts the watchdog
WD_RESTART write 0x001 again.

0 x 1008 Simplified watchdog Read/ 1 pu The watchdog is stopped by writing the value
stop write 0x0000 0x0AA55 or 0X55AA (as from V2.5), if it was already
WD_AC_STOP_SIMPLE active. The watchdog fault reaction is deactivated. An
existing watchdog fault is reset and it is possible to
write in the watchdog register again.

Table 5.48: Watchdog-Register pu: Default value when switching voltage on


co: constant value ROM located

MODBUS / Configuration 67
15.12.99
In all registers the length is 1, i.e. with each access only one word can be written or read.

Examples:

Setting the watchdog for a time overrun of more than 1 s:


1. Write 0x000A (=1000 ms / 100 ms) in the register for time overrun (0x1000).
2. Write 0x0010 (=2(5-1)) in the coding mask (register 0x1001) to start the watchdog.
3. Use the function ‘Force Single Coil’ to trigger the watchdog.
4. Read the register of the minimum current trigger time and compare this with zero to
check whether a time overrun has occurred.
Repeat step 3 and Step 4.

Setting a watchdog a time overrun of more than 10 min:


1. Write 0x1770 (=10*60*1000 ms / 100 ms) in the register for time overrun (0x1000).
2. Write 0x0001 in the watchdog trigger register (0x1003) to start the watchdog.
3. Write 0x0001, 0x0000, 0x0001... or a counter value in the watchdog trigger register
(0x1003) to trigger the watchdog.
4. Read the register of the minimum current trigger time and compare it with zero to
check if a time overrun has occurred.
Repeat step 3 and Step 4.

68 MODBUS / Configuration
15.12.99
Fieldbus failure on the coupler:
The evaluation of the watchdog register is made by the coupler firmware. The internal
bus is interrupted. The digital outputs are set to 0 and the analog outputs are set to the
minimum value (e.g. with 4...20 mA to 4 mA).

Fieldbus failure on controller:


The evaluation of the watchdog register is made using the function block
‘FBUS_ERROR_INFORMATION’ in the control program. The internal bus remains in
function and the process illustrations are retained. The control program can be further
processed independently.

Fig. 5.15:Function block for determining a fieldbus failure

‘FBUS_ERROR’ (BOOL) = FALSE = no fault


= TRUE = fieldbus failure

‘ERROR’ (WORD) = 0 = no fault


= 1 = fieldbus failure

The nodes can set to a safe status in the case of a fieldbus failure using these outputs and
a corresponding control program.

MODBUS / Configuration 69
15.12.99
5.3.3 Configuration function
The following registers can be read, in order to determine the configuration of the
connected modules:

Register Designation Access Length Default Description


address (word)
0 x 1022 CnfLen. AnalogOut read 4++ pu Number of I/O bits with the process
data words of the outputs

0 x 1023 CnfLen.AnalogInp read 3++ pu Number of I/O bits with the process
data words of the inputs

0 x 1024 CnfLen.DigitalOut read 2++ pu Number of I/O bits with the process
data bits of the outputs

0 x 1025 CnfLen.DigitalInp read 1 pu Number of I/O bits with the process


data bits of the inputs

0 x 1026 slaveAdr read 1 pu Current node address. The address


is read when switching on the voltage
supply.

Settings read 1 pu The current settings are saved here.


0 x 1027
These are interrogated when
switching on the voltage supply.
D0-D2: Baud rate
D3-D4: Byte Frame
D5: Data Length 8/7 Bit
D6: Not in use
D7: Not in use
D8-D10: End of Frame Time
D11: RTU/ASCII mode
D12: Error Check
switched off/switched on
D13: Extended Functions
switched off/switched on
D14: Watchdog
switched off/switched on
D15: Not in use

Table 5.49: Configuration function pu: Default value when switching voltage on

70 MODBUS / Configuration
15.12.99
5.3.4 Firmware information

These registers are used to read out information about the coupler or controller
firmware.

Register Designation Access Length Default Description


address (word)

0x2010 Revison, read 1 pu/co - Firmware version (256* major + minor)


INFO_REVISION e.g.: V2.5 = 0x0205

0x2011 Series code, read 1 pu/co - WAGO series number:


INFO_SERIES 750 for WAGO-I/O System

0x2012 Item number, read 1 pu/co - WAGO order number:


INFO_ITEM 312, 314, 315, 316 for coupler,
812, 814, 815, 816 for controller

0x2013 Major sub item code, read 1 pu/co - Extended WAGO order number.
INFO_MAJOR Is used for special firmware versions or
settings:
0xFFFF for coupler/controller.

0x2014 Minor sub item code, read 1 pu/co - Extended WAGO order number.
INFO_MINOR Is used for special firmware versions or
settings:
0xFFFF for coupler/controller.

0x2020 Description, read 128 pu/co - Brief description for this


INFO_DESCRIPTION coupler/controller, max. 255 characters. If
not available the value 0xFF appears.

0x2021 Description, read 16 pu/co - Details of the manufacture time of the


INFO_TIME firmware version, max. 31 characters. If
not available the value 0xFF appears.

0x2022 Description, read 16 pu/co - Details of manufacture date of the


INFO_DATE firmware version, max. 31 characters. If
not available the value 0xFF appears.

0x2023 Description, read 32 pu/co - Details of the company and user of the
INFO_LOADER_INFO firmware programming unit, max. 63
characters. If not available the value
0xFF appears.

Table 5.50: Firmware information pu: Default value when switching voltage on, co: Constant

MODBUS / Configuration 71
15.12.99
5.3.5 General registers

The constants saved here can be used to test the communication with the master.

Register Designation Access Length Default Description


address (word)

0x2000 Zero, GP_ZERO read 1 pu/co Constant with zero.


0x0000

0x2001 Units, GP_ONES read 1 pu/co Constant with units. Is -1 if declared as ”signed
0xFFFF int” or MAXVALUE if ”unsigned int”.

0x2002 1,2,3,4, GP_1234 read 1 pu/co Constant value to test whether high and low
0x1234 bytes are changed over (Intel/Motorola format).
Should appear in the master as 0 x 1234. If
0 x 3412 appears the high and low byte must be
changed over.

0x2003 Mask1, GP_AAAA read 1 pu/co Constant to see if all bits are present. Is used
0xAAAA together with register 0 x 2004.

0x2004 Mask2, GP_5555 read 1 pu/co Constant to see if all bits are present. Is used
0x5555 together with register 0 x 2003.

0x2005 Largest positive read 1 pu/co Constant, to check the arithmetic.


number, 0x7FFF
GP_MAX_POS

0x2006 Largest negative read 1 pu/co Constant, to check the arithmetic.


number, 0x8000
GP_MAX_NEG

0x2007 Largest semi-positive read 1 pu/co Constant, to check the arithmetic.


number, 0x3FFF
GP_HALF_POS

0x2008 Largest semi- read 1 pu/co Constant, to check the arithmetic.


negative number, 0x4000
GP_HALF_NEG

Table 5.51: General registers pu: Default value when switching on voltage ; co: constant

72 MODBUS / Configuration
15.12.99
6 Start-Up and Diagnosis

6.1 Run-up and error indications


After the supply voltage connection the coupler/controller checks all the functions of its
components and the communication interface. The configuration of the I/O modules is
then determined. The 'I/O ERR' LED is blinking during the run-up time. The
coupler/controller enters then the "fieldbus start" status after the successful run-up. The
green "I/O RUN" LED indicates this status. If an error occurs, the red "I/O ERR" goes
on blinking in a low frequency. The various types of error are indicated via up to 3
different flash sequences.
Display functions of the 'I/O ERR' LED:
1. Coupler/controller’s start-up phase after the
supply voltage connection
2. Introduction of the error indication
3. Error code
(number of flash cycles 2nd flash sequence)
4. Error argument
(Number of flash cycles 3rd flash sequence)

Fig. 6.1: LED fieldbus start and error indication

1st flash sequence 1st pause 2nd flash sequence 2nd pause 3rd flash sequence

2nd flash sequence 3rd flash sequence Meaning

Error code Error argument

1 0 EEPROM check sum error

1 Internal storage overflow for the inline code

2 Unknown data type

2 0 Programmed process image assignement is not plausible

N (N>0) Error in table comparison I/O module N (programmed


configuration), passive modules as well as potential supply modules
are not taken into account

3 0 I/O module(s) has (have) identified the internal bus command as


wrong

4 0 Data error at internal bus or internal bus break at coupler / controller

N (N>0) Internal bus interrupted after N module

5 N Internal bus error in the communication with N module


Table 6.1: Error diagnosis, nodes

MODBUS / Start-up and diagnosis 73


15.12.99
Fig. 6.2: Run-up coupler/controller

74 MODBUS / Start-up and diagnosis


15.12.99
6.2 MODBUS LED

Fig. 6.3: MODBUS LED

The four following LEDs indicate the status of the coupler/controller.

Status LED State Description

Node is ready for communication ON shining The node is working normally. The LED is out for a short time
when the receiver receives an incomplete frame or a frame for
another node.

Node transmits data TXD blinking The node transmits a frame.

Node receives data RXD shining The node receives a frame with own slave-address or
broadcast.

Node detects an frame with error CRC blinking The received error code differs from the calculated code. The
code information in the received frames when Error Check is
activated.

Only controller:

Flash CRC shining The user programme is transferred from RAM to Flash

Table 6.2: : Status and error indication

You have access to the diagnosis functions via the following register too:

Register Name Access Length Default Description


address

0x1020 LedErrCode read 2++ pu See LED description error code


0x0000

0x1021 LedErrArg read 1 pu See LED description error code


0x000

Table 6.3: Register for diagnosis functions pu: standard value in case of voltage connection

MODBUS / Start-up and diagnosis 75


15.12.99
6.3 Starting up the controller with WAGO-I/O-PRO
The starting-up takes place via a PC. The WAGO communication cable1 is used to
establish the connection between PC (interface: COMx) and controller. The
communication parameter for data exchange between controller and PC have to
correspond. The following parameter are set in the controller:

• Baud rate: 19200 bauds


• Stop bits: 1
• Parity: even

These parameter are set in WAGO-I/O-PRO in the window ‘communication parameter’.

Fig. 6.4: PC and controller, operating mode switch

The WAGO-I/O-PRO specific test and starting-up functions are explained in the
corresponding manual2. All the following functions marked with ‘Online’ will be
carried out via PC with WAGO-I/O-PRO.

ÿþýüûúùýø Before you log in, the station address switch must be set to ‘00’! The modified
address will be taken over for the controller when you reconnect the supply
voltage.

Before loading the programme, the operating mode switch should be set to Stop or the
cycle should be stopped with ‘Online’ ‘Stop’.

1
Communication cable, Order No. 750-920 (part of the programming tools IEC 1131-3)
2
WAGO-I/O-PRO manual, English, Order No. 750-120/000-002

76 MODBUS / Start-up and diagnosis


15.12.99
The programme processing can be started in each position of the operating mode switch
with ‘Online’ ‘Start’ and be stopped with ‘Online’ ‘Stop’.

ATTENTION!
In case of ‘Online’ ‘Stop’ or when you set the operating mode switch from run to stop,
the outputs (e. g. for motor contactors or valves) which are still set remain set!
Switching-off commands coming from the software, e. g. via sensors, are then
ineffective because the program is not executed any more !

(The change in operating mode is taking place internally at the end of the program cycle).

MODBUS / Start-up and diagnosis 77


15.12.99
78 MODBUS / Start-up and diagnosis
15.12.99
7 General Conditions
To ensure the good operation of the WAGO-I/O-SYSTEM the following general
conditions have to be fulfilled.

7.1 Transport and storage conditions


The following declarations concern I/O modules which are transported and stored in the
original package.

Conditions Allowed values

Free fall ≤ 1m

Temperature -40°C to +70°C

Relative humidity 5 % to 95 % (without condensation)


Table 7.1: Transport and storage conditions

7.2 Climatic conditions


The modules of the WAGO-I/O-SYSTEMÿ must not be used without taking suitable
actions:
- under heavy conditions,
e.g. very dusty rooms, corroding atmosphere or gases
- in places with a high concentration of ionisation.

Working temperature: 0°C to + 55°C


Relative humidity
in operation: 5 % to 95 % (without condensation)
Mounting: Horizontal if possible
(for a better ventilation)
Resistance to
harmful substances: Tested in accordance with IEC 68-2-42
IEC 68-2-43

MODBUS / General conditions 79


15.12.99
7.3 Mechanical conditions
(given as sinusoidal oscillations)

Frequency range (Hz) continuous sometimes

10 ≤ f < 57 0.0375 mm amplitude 0,075 mm amplitude

57 ≤ f < 150 0,5 g 1g


constant acceleration constant acceleration
Table 7.2: Frequency range

For stronger impulses and oscillations, the acceleration and the amplitude should be
reduced by suitable actions.

The following table shows the kind of test for the mechanical conditions.

Tested for Test sequence Remarks

Oscillations Test for oscillations Type of oscillation:


acc. to IEC 68, part 2-6 Sweep with a rate of change of
1 octave/minute
10 Hz ≤ f < 57 Hz, constant
amplitude 0.075mm
57 Hz ≤ f < 150 Hz, constant
acceleration 1 g
Period of oscillation: 10 Sweep per axe
in each of the vertical 3 axes

Impulses Test for impulses acc. Type of impulse: half sinusoidal


to IEC 68, part 2-27 Intensity of impulse: 15 g peak value,
11 ms maintenance time

Route of impulse: 2 impulses in each of the


vertical 3 axes
Table 7.3: Tests

80 MODBUS / General conditions


15.12.99
7.4 Class and degree of protection
Class of protection
Class of protection acc. to IEC 536 (VDE 0106, part 1):
The ground (earth) connection to the DIN carrier is necessary !

Degree of protection
Degree of protection
acc. to IEC 529: IP 20
(protection against direct contact with standard probes)
Protec. against foreign bodies: Diameter > 12 mm
Protection against water: No particular protection

We offer enclosures made of aluminium die-cast, polyester or stainless steel with the
IP 65 degree of protection to protect against water infiltration (see
WAGO-I/O-SYSTEM catalogue).

7.5 Specifications and test results


Approvals: UI listed E175199
E198726
CSA LR 18677-57
(750-xxx/ 1xx-xxx)

Ex approvals: Atex prEN50021


EEX nV II T4
Ul listed Class I Div2 ABCD T4A

Conformity marking: CE

MODBUS / General conditions 81


15.12.99
7.6 Electromagnetic compatibility
The following requirements for electromagnetic compatibility are fulfilled by all
modules of the WAGO-I/O-SYSTEMÿ(except for 750-630 and 750-631).

Immunity to interference EN 50082-2 (95)

EN 61000-4-2 4 kV/8 kV (2/4) B

EN 61000-4-3 10 V/m 80 % AM (3) A

EN 61000-4-4 2 kV (3/4) B

EN 61000-4-6 10 V/m 80 % AM (3) A

Immunity to interference EN 50081-2 (94)

EN 55011 30 dBµV/m (30 m) A

37 dBµV/m

Table 7.4: Electromagnetic compatibility

82 MODBUS / General conditions


15.12.99

You might also like