0% found this document useful (0 votes)
57 views42 pages

MAG8000 Modbus RTU Module Guide

The document provides a preliminary manual for the Siemens MAG8000 Modbus RTU Module, detailing installation, technical specifications, and communication parameters for the module. It serves as a guide for users familiar with Modbus RTU, outlining the module's capabilities, wiring instructions, and supported commands. Key features include communication settings, addressing models, and exception handling for effective integration with Siemens signal converters.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views42 pages

MAG8000 Modbus RTU Module Guide

The document provides a preliminary manual for the Siemens MAG8000 Modbus RTU Module, detailing installation, technical specifications, and communication parameters for the module. It serves as a guide for users familiar with Modbus RTU, outlining the module's capabilities, wiring instructions, and supported commands. Key features include communication settings, addressing models, and exception handling for effective integration with Siemens signal converters.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Modbus RTU RS485/RS232 Add-On Module for Sitrans FM MAG8000

MODBUS RTU Module MAG8000_rev02.doc 1


Rev 1.00 pre02
INTRODUCTION .................................................................................................................................3
Definitions and Abbreviations ................................................................................................................. 3
References ............................................................................................................................................. 3
TECHNICAL DATA .............................................................................................................................4
GENERAL MODBUS RTU ..................................................................................................................4
INSTALLATION ..................................................................................................................................5
Add-On-Module ...................................................................................................................................... 5
Electrical Connections ............................................................................................................................ 5
RS232 connections................................................................................................................................. 6
RS485 connections................................................................................................................................. 7
Bus termination....................................................................................................................................... 7
COMMISSIONING ...............................................................................................................................8
Simatic Setup ......................................................................................................................................... 8
FlowTool Setup....................................................................................................................................... 9
Communication Parameter explanation .................................................................................................. 9
Effect of changing Modbus communication settings ............................................................................... 9
MODBUS ADDRESSING MODEL......................................................................................................10
COMMANDS ....................................................................................................................................10
Read coils............................................................................................................................................. 10
Read multiple registers ......................................................................................................................... 11
Write single coil..................................................................................................................................... 13
Write multiple registers ......................................................................................................................... 15
MODBUS RTU Report Slave ID command ........................................................................................... 17
DATA TYPE MAPPING ......................................................................................................................18
EXCEPTION HANDLING ....................................................................................................................19
WRITE PROTECTION OF PARAMETERS ..............................................................................................20
How to enter Software Password.......................................................................................................... 20
MODBUS HOLDING REGISTERS ....................................................................................................21
APPENDIX D CRC CALCULATION ..............................................................................................41
Siemens Flow Division MAG8000 Modbus RTU Module

Introduction

PRELIMINARY ONLY
This manual is intended to provide instructions for the installation and use of the Modbus RTU Add-On
Modules, product code number FDK: 087L4212 and 087L4213, that can be used in the Siemens Sitrans
FM MAG80000.

The Modbus RTU module is effectively a gateway through which a Modbus RTU master device can have
controlled access to a number of Siemens signal converter parameters.

This manual is not intended to be a complete tutorial on the Modbus RTU protocol, and it is assumed the
end user already has a general working knowledge of Modbus RTU communications, especially in
respect of master station configuration and operation. However an overview is included in the following
section to explain some of the fundamental aspects of the protocol.

Definitions and Abbreviations


CRC Cyclic Redundancy Check.
Used for error-checking in MODBUS RTU. See appendix.
ModBus master A ModBus device, which is able to access data in one or more connected ModBus
slaves.
ModBus slave A ModBus device, which is able to respond to requests from a single ModBus
master.
MODBUS® address Throughout this document the following notation is used to address MODBUS®
RTU registers and coils:

1:123 Coil number 123 (addressed in messages by 122)


4:1234 Holding register 1234 (addressed in messages by 1233)
4:54321 Holding register 54321 (addressed in messages by 54320)

34567 The address of a coil/holding register as specified in a message


RS485 Refers communication standard defined by EIA/TIA-485. (Physical layer)
RS232 Refers t communication standard defined by EIA/TIA-232.(Physical layer)
RTU Remote Terminal Unit = Standard MODBUS transmission mode

References
Reference 1 MODBUS® over Serial Line
Specification & Implementation guide v. 1.0
[Link] 12/02/02

Reference 2 MODBUS® Application Protocol Specification


v. 1.1
[Link] 12/06/02

MODBUS RTU Module MAG8000_rev02.doc 3


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

Technical Data

PRELIMINARY ONLY
Siemens Modbus RTU specification:
Device type: Slave
Baud rates: 1200, 2400, 4800, 9600, 19200, 38400 bits/sec
Number of stations: Recommended: max. 31 per segment without repeaters
Device address range: 1-247
Protocol: RTU (OtherMODBUS protocols like ASCII, Plus or TCP/IP are
not supported.)
Electrical interface: RS485, 2 wire
RS232, 2 wire
Connecter type Screw terminals
Supported function codes: 1 Read coils
3 Read holding registers
5 Write single coil
16 Write multiple registers
17 Report slave Id
Broadcast: Yes
Maximum cable length 1200 meters (@ 38400 bits/sec)
Standard: MODBUS over serial line v1.0*
Certified: No
Device Profile: None
*reference 1

General Modbus RTU


The module complies with the MODBUS Serial Line Protocol [Ref 1]. Among other things this implies a
Master-Slave protocol at level 2 of the OSI model. One node (the master) issues explicit commands to
one of the “slave”-nodes and processes responses. Slave nodes will not transmit data without a request
from the master node, and do not communicate with other slaves.
Modbus is a mono Master system, which means that only one Master can be connected at the time.

Two modes of communication are possible, Unicast and Broadcast. Unicast mode is where the Master
sends a request to one Slave device, and waits a specified time for a response. In Broadcast mode the
master sends out a request to address “0”, which means that the information is for all Slave devices on the
network. In Broadcast mode there are no response from the Slave devices.
UNICAST MODE BROADCAST MODE

resp requ
e st
ons
e
Master req Master
ues
t

Slave Slave Slave Slave Slave Slave


The Modbus frame is shown below, and is valid for both requests and responses.
Modbus frame

SLAVE ADDRESS FUNCTION CODE DATA CRC

1 Byte 1 Byte 0-252 Bytes 2 Bytes

Further details of the MODBUS protocol can be found in Ref. 1 and 2.

MODBUS RTU Module MAG8000_rev02.doc 4


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Installation

Add-On-Module
The installation procedure for an add-on module to a MAG8000 transmitter is as follows:

The modules must be mounted on the backside of the MAG8000 electronics as shown in Figure 1.
Use the two 3mm screws and washers to fix the module to the MAG8000 electronic.

Figure 1 Mounting the module

The connections to the module are described below

Electrical Connections
A MODBUS over Serial Line Cable must be shielded. At one end of each cable its shield must be
connected to protective ground. If a connector is used at this end, the shell of the connector is connected
to the shield of the cable.
An RS485-MODBUS must use a balanced pair (for D0-D1) and a third wire (for the Common).
For the balanced pairs used in an RS485-system, a Characteristic Impedance with a value between 100
and 120 Ohms must be used.
The shield must always be connected to the MAG8000 encapsulation using the cable clamp as shown in
Figure 2.

Figure 2 Cable shield connection

MODBUS RTU Module MAG8000_rev02.doc 5


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

RS232 connections

PRELIMINARY ONLY
RX
TX
+ Common
-

MODBUS RTU Module MAG8000_rev02.doc 6


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
RS485 connections

RS485 segment

MAG8000
Data + 91
Data - 92
Common 93

PE
Connect shield to
encapsulation The shield must be
connected to
protective ground

Bus termination
All RS485 based networks must be terminated correct to function properly. A termination must be placed
at each end of the segment.
The Modbus RTU module can add a 120 ohm termination by placing the jumper beside the terminals in
position “ON”
The termination is switched “ON” from factory.

MODBUS RTU Module MAG8000_rev02.doc 7


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Commissioning
Before communicating with the Master, communication parameters like baudrate, Device Address, Parity
must be selected. Device address, baudrate and parity/stopbit can be read on the display in the meter
menu, index 5 and 6. Please look in to the MAG8000 manual to locate the Modbus RTU menu.
To change the parameters Simatic PDM or FlowTool (via Infrared) can be used.

Simatic Setup

Commncation settings can be changed in menu “Device->Communication Settings”

MODBUS RTU Module MAG8000_rev02.doc 8


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
FlowTool Setup

Figure 3 FlowTool

Communication Parameter explanation


Item Value Comments
Device Communication Address 1-247 Device address [Factory setting: 1]
Baud rate 1200, 2400, Communication speed
4800, 9600, [Factory setting: 19200]
19200, 38400
Parity Even, 1 stopbit Communication parameters
Odd, 1 stopbit [Factory setting: Even, 1 stopbit ]
None, 2 stopbit
None, 1 stopbit
Interframe Space 35-255 chars The minimum interframe space between two MODBUS RTU
messages in sequence (specified as 3.5 characters) is
configurable. Range: 3.5 – 25 character times. Specified in
bytes times ten.
[Factory setting: 35 ]
Response Delay 0-255 msec. The minimum time from when a slave receives a request and
until it returns a response. This makes it possible to send data
to slow masters without overwhelming its receiver.
[Factory setting: 5 ]
The settings are all stored in the non-volatile memory of the transmitter, and therefore remembered after a
power down.

Effect of changing Modbus communication settings


Changing baudrate or framing has effect on the communication as follows:
• When changed from the Modbus master, the new settings only have effect after a reset (PowerUp)
of the MAG8000– or after writing to the “ResetCommunication” coil.
NOTE:
It is recommended NOT to use the default address in a multi-slave network.
It is of great importance to ensure at the time of the procedure of device addressing, that there is not two
devices with the same address. In such a case, an abnormal behaviour of the whole serial bus can occur,
the master being then in the impossibility to communicate with all present slaves on the bus.

MODBUS RTU Module MAG8000_rev02.doc 9


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

MODBUS addressing model

PRELIMINARY ONLY
The module allows R/W access to the following standard MODBUS data register blocks:
• Coils (ref. 0x address range)
• Holding Registers (ref. 4x address range)

I.e. the module will not support the other standard data register blocks:
• “Discrete Input” (ref. 1x address range)
• “Input Registers”(ref. 3x address range)

Commands
Broadcast communication from master to slave(s) through device address 0 is supported. No response from the slave is
generated in that case. Broadcast communication is not secured by the normal check mechanisms and shall be limited to very
few uses.
A MAG8000 slave only recognizes (and accepts) few MODBUS® RTU commands/function codes.
Supported function codes are listed in the table below.

Function Command text Explanation


code
01 hex Read coils Reads the status of single bit(s) in a slave
03 hex Read multiple registers1 Reads the binary content of multiple 16-bit registers in
the slave. The maximum number of registers is 26
05 hex Write single coil2 Writes a single on/off bit
10 hex Write multiple registers3 Preset values into a sequence of 16-bit registers. The
maximum number of registers is 25
11 hex Report Slave ID All MAG8000 will respond to a Report Slave ID
command (Command 17) request from the master by
giving in formation about device type, vendor,
revision level etc. in a format as shown:

Read coils
The read coils functions (01hex x) allow the master to request information from the slave. The command message of a coil read
is structured as shown below. Each row in the table compares to a byte in the message – top byte (Slave address) is transmitted
first.
Request:
Message byte Example
Slave address xxhex
Function code 01hex
Starting coil Upper 00hex
Lower 00hex
Quantity Upper 00hex
Lower xxhex
CRC-16 Lower xxhex
Upper xxhex

The initial slave address is 1. Address 0 (broadcast) and other values between 1 and 255 can be used.
The function code of this message is 01 hex (read coil) .
The starting coil is the first binary data to be read.

1
Historically called ‘Read holding registers’
2
Historically called ‘Force single coil’
3
Historically called ‘Preset multiple registers’

MODBUS RTU Module MAG8000_rev02.doc 10


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
The quantity indicates how many consecutive bits are to be read. The quantity may range from 1 to 432 bits.

PRELIMINARY ONLY
A CRC value is generated from a calculation using the values of the slave address, function code, and data sections of the
message. When the slave receives the command message it calculates a CRC-16 value and compares it to the one in the CRC-
16 field of the command message. If these two CRC-16 values are the same the slave has received the proper command
message. If the two CRC-16 values are not the same the slave will not respond.
If the command message has a valid slave address, function code, starting coil and quantity value the slave will respond with a
normal response message. If the command message has an invalid slave address, function code, starting coil and/or quantity
the slave will respond with an exception response message.

Normal response:
Message byte Example
Slave address xxhex
Function code 01hex
Bit count xxhex
Coil status byte(s) xxhex
xxhex
Next coil status xxhex
byte(s)
xxhex

Last coil status xxhex


byte(s)
xxhex
CRC-16 Lower xxhex
Upper xxhex

The normal response message contains the same slave address and function code as the command message.
The Bit count is the number of status bits returned in the response message. The number equals the quantity in the command
message.
The data section of the response message contains a number of bits representing the status of the coils(s) that has been read
from the device. The LSB of the coil status byte indicates the status of the coil.

Exception response:
Message byte Example
Slave address xxhex
Function code 81hex
Exception code 02hex
CRC-16 Lower xxhex
Upper xxhex

The exception response message contains the same slave address as the command message.
The function code of the exception message is actually a value of 80 hex plus the original function code of 01 hex .
The exception code indicates where the error occurred in the command message. A complete listing of exception codes is
shown in a later chapter.

Read multiple registers


The multiple register read functions (03hex) allows the master to request information from the slave. The command message of
a multiple register read is structured as shown below. Each row in the table compares to byte in the message – top byte (Slave
address) is transmitted first.

MODBUS RTU Module MAG8000_rev02.doc 11


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Request:

PRELIMINARY ONLY
Message byte Example
Slave address xxhex
Function code 03hex
Starting register Upper 00hex
Lower 20hex
Quantity Upper 00hex
Lower 04hex
CRC-16 Lower xxhex
Upper xxhex

The initial slave address is 1. Address 0 (broadcast) and other values between 1 and 255 can be used.
The function code of this message is 03hex (read multiple registers)
The starting register is the first register to be read.
The quantity indicates how many consecutive 16-bit registers are to be read. The quantity may range from 1 to 26 registers. If
the quantity is greater than 26 an error code of 03 hex is returned in the exception response message.
A CRC value is generated from a calculation using the values of the slave address, function code, and data sections of the
message. When the slave receives the command message it calculates a CRC-16 value and compares it to the one in the CRC-
16 field of the command message. If these two CRC-16 values are the same the slave has received the proper command
message. If the two CRC-16 values are not the same the slave will not respond.
If the command message has a valid slave address, function code, starting register and quantity value the slave will respond
with a normal response message. If the command message has an invalid function code, starting register and/or quantity the
slave will respond with an exception response message.

MODBUS RTU Module MAG8000_rev02.doc 12


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Normal response:

PRELIMINARY ONLY
Message byte Example
Slave address xxhex
Function code 03hex
Byte count xxhex
Starting register Upper xxhex
Lower xxhex
Next register Upper xxhex
Lower xxhex

Last register Upper xxhex


Lower xxhex
CRC-16 Lower xxhex
Upper xxhex

The normal response message contains the same slave address and function code as the command message.
The Byte count is the number of data bytes returned in the response message. The number is actually the quantity (in the
command message) times 2, since there are two bytes of data in each register.
The data section of the response message contains 8 upper and 8 lower bits of data for each register that has been read from the
device.

Exception response:
Message byte Example
Slave address xxhex
Function code 83hex
Exception code 01hex to 06hex
CRC-16 Lower xxhex
Upper xxhex

The exception response message contains the same slave address as the command message.
The function code of the exception message is actually a value of 80 hex plus the original function code of 03hex. The exception
code indicates where the error occurred in the command message. A complete listing of exception codes is shown in a later
chapter.

Write single coil


The write coil functions (05hex) allow the master to control single bits in the slave. The command message of a coil write is
structured as shown below.
Request:
Message byte Example
Slave address xxhex
Function code 05hex
Coil address Upper xxhex
Lower xxhex
New coil value Upper FFhex or
00hex
Lower 00hex
CRC-16 Lower xxhex
Upper xxhex

The initial slave address is 1. Address 0 (broadcast) and other values between 1 and 255 can be used.
The function code of this message is 05hex (write coil).
The coil address is the coil to be written to.

MODBUS RTU Module MAG8000_rev02.doc 13


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
The requested coil status is specified by a constant in the query data field. A value of FFhex , 00hex (upper, lower) requests the

PRELIMINARY ONLY
coil/bit to be set. A value of 00hex , 00hex requests it to be reset. All other values are illegal and will not affect the coil.
CRC check and exception handling is performed as described for command ‘Read multiple registers’.

Normal response:

Message byte Example


Slave address xxhex
Function code 05hex
Coil address Upper xxhex
Lower xxhex
New coil value Upper FFhex or
00hex
Lower 00hex
CRC-16 Lower xxhex
Upper xxhex

MODBUS RTU Module MAG8000_rev02.doc 14


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
The normal response message contains the same slave address and function code as the command message.

PRELIMINARY ONLY
The coil address is the coil that was written to.
The new coil value is the value written to the coil.

Exception response:
Message byte Example
Slave address xxhex
Function code 85hex
Exception code 01hex to 06hex
CRC-16 Lower xxhex
Upper xxhex

The exception response message contains the same slave address as the command message.
The function code of the exception message is actually a value of 80 hex plus the original function code of 05hex . The
exception code indicates where the error occurred in the command message. A complete listing of exception codes is shown
in a later chapter

Write multiple registers


The multiple register write functions (10hex) allows the master to write data to the slaves registers. The command message of a
multiple register write is structured as shown below.
Request:
Message byte Example
Slave address xxhex
Function code 10hex
Starting register Upper 00hex
Lower 20hex
Quantity Upper 00hex
Lower 04hex
Byte count xxhex
Starting register Upper xxhex
value
Lower xxhex
Next register value Upper xxhex
Lower xxhex

Last register value Upper xxhex


Lower xxhex
CRC-16 Lower xxhex
Upper xxhex

The initial slave address is 1. Address 0 (broadcast) and other values between 1 and 255 can be used.
The function code of this message is 10hex (write multiple registers).
The starting register is the first register to be written to.
The quantity indicates how many consecutive 16-bit registers are to be written to. The quantity may range from 1 to 25
registers. If the quantity is greater than 25 an error code of 03 hex is returned in the exception response message.
The Byte count is the number of bytes of data to be written to the device. The number of bytes is actually the quantity times
2, since there are two bytes of data in each register.
The data section of the command message contains 8 upper and 8 lower bits of data for each register that is being written to.
CRC check and exception handling is performed as described for command ‘Read multiple registers’.

MODBUS RTU Module MAG8000_rev02.doc 15


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Normal response:

PRELIMINARY ONLY
Message byte Example
Slave address xxhex
Function code 10hex
Starting register Upper xxhex
Lower xxhex
Quantity Upper xxhex
Lower xxhex
CRC-16 Lower xxhex
Upper xxhex

The normal response message contains the same slave address and function code as the command message.
The starting register is the first register that was written to.
The quantity value indicates how many consecutive registers were written to.

Exception response:
Message byte Example
Slave address xxhex
Function code 90hex
Exception code 01hex to 06hex
CRC-16 Lower xxhex
Upper xxhex

The exception response message contains the same slave address as the command message.
The function code of the exception message is actually a value of 80 hex plus the original function code of 10 hex.
The exception code indicates where the error occurred in the command message. A complete listing of exception codes is
shown in a later chapter.

MODBUS RTU Module MAG8000_rev02.doc 16


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
MODBUS RTU Report Slave ID command
All MAG8000 will respond to a Report Slave ID command (Command 17) request from the master by giving in formation
about device type, vendor, revision level etc. in a format as shown:

Request
Message byte Example
Slave address xxhex
Function code 11hex
CRC-16 Lower xxhex
Upper xxhex

Message byte Description Length


Slave address 1 byte
Function code 1 byte
Byte count 1 byte
Slave ID 1 byte
Run Indicator 0=Off; FF=Running 1 byte
Product code 0x1B = MAG8000 1 byte
Software code no “087C4054” for MAG8000 9 byte
Null terminator incl
Capability bits Bits describing the capabilities of 3 bytes
this module.
1.2, 2.4, 4.8, 9.6, 19.2, 38.4 kB/s
Manufacturer name ”Siemens” (Read from EEPROM) 12 bytes
Null terminator included
Product name “MAG 8000” 12 bytes
Null terminator included
Product major revision 1 byte
Product minor revision 1 byte
Comm option name Not used in MAG8000 11 bytes
Not used in MAG8000 1 byte
Comm option code
Comm option Major Not used in MAG8000 1 byte
revision
CRC-16 2 bytes

MODBUS RTU Module MAG8000_rev02.doc 17


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Data type mapping
Some standard datatypes are defined in the MAG8000 protocol. Most of these datatypes are not present in the MODBUS®
RTU protocol as it defines ‘Registers’ and ‘Coils’ for all variables. A register in this context is always 16 bit long. This will
prove restrictive for the parameters found in Siemens Flow products and therefore a number of approaches have been adopted
to overcome this restriction.

FloBUS MODBUS® RTU implementation


datatype
uint8 Data organized as 8-bit unsigned integers. Example - Normal read response:
The parameters are read using function code Message byte Exmpl
03hex ‘Read multiple registers’. Parameters Slave address 01hex
Function code 03hex
are written using function code 10hex ‘Write
Byte Count 02hex
multiple registers’. ‘uint8’ type of data is Starting register Upper xxhex
accessed through a single register, where the Lower <uint8>
data is found in the lower byte of the CRC-16 Lower xxhex
register. Datavalue can be 0 – 255 with no Upper xxhex
sign bit.
uint16 Data organized as 16-bit unsigned integers. Example - Normal read response:
The parameters are read using function code Message byte Exmpl
03 hex ‘Read multiple registers’. Parameters Slave address 01hex
Function code 03hex
are written using function code 10 hex ‘Write
Byte Count 02hex
multiple registers’. ‘uint16’ type of data is Starting register Upper <uint16 - MSB>
accessed through a single register. Datavalue Lower <uint16 - LSB>
can be 0 – 65536 with no sign bit. CRC-16 Lower xxhex
Upper xxhex
float32 Data organized as 32-bit signed floats (IEEE Example - Normal read response:
format). The parameters are read using Message byte Exmpl
function code 03 hex ‘Read multiple Slave address 01hex
Function code 03hex
registers’. Parameters are written using
Byte Count 04hex
function code 10 hex ‘Write multiple Starting register Upper
registers’. ‘float32’ type of data is accessed
through two registers. Datavalues are coded <float32 -
in IEEE floating point format. MSB1>
Lower 2
<float32 >
Next register Upper 3
<float32 >
Lower <float32 – LSB3>
CRC-16 Lower xxhex
Upper xxhex
float64 Data organized as 64-bit signed floats (IEEE Example - Normal read response:
format). The parameters are read using Message byte Exmpl
function code 03 hex ‘Read multiple Slave address 01hex
Function code 03hex
registers’. Parameters are written using
Byte Count 08hex
function code 10 hex ‘Write multiple Starting register Upper
registers’. ‘float64’ type of data is accessed
through four registers. Datavalues are coded <float64–
in IEEE floating point format. MSB4>
Lower <float641>
Next register Upper <float642>
Lower <float643>
Next register Upper
<float643>
Lower <float643>
Next register Upper <float643>
Lower <float64 – LSB3>
CRC-16 Lower xxhex
Upper xxhex

1
Contains 1 sign bit + 7 exponent bits
2
Contains 1 exponent bit + 7 mantissa bits
3
Contains 8 mantissa bits
4
Contains 1 sign bit + 7 exponent bits
MODBUS RTU Module MAG8000_rev02.doc 18
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

String Consecutive pairs of 8-bit ASCII characters Example - Normal read response:

PRELIMINARY ONLY
stored one pair per 16-bit register. Strings Message byte Exmpl
are read using function code 03 hex “Read Slave address 01hex
Function code 03hex
multiple registers’. Strings are written using
Byte Count 04hex
function code 10 hex ‘Write multiple Starting register Upper
registers’. ‘string’ type of data must be read
or written as a series of 1 to 25 consecutive <first
registers, depending on the number of character>
characters specified for the string. The max. Lower <next character>
string length is therefore 50 chars (incl. Next register Upper <next character>
Lower <last character>
delimiter).
CRC-16 Lower xxhex
Strings are terminated by a zero-delimiter. Upper xxhex
TotalType Datatype defined by Siemens mainly used Example Normal read response
for Totalizer values. TotalType consist of Message byte Exmpl
two parts: Slave address 01hex
Function code 03hex
signed long Number - contains the integer
Byte Count 08hex
part of Value Number Upper <uint16 - MSB>
signed long Decimal – contains the Lower <uint16 - LSB>
fractional part of the Value multiplied with Upper <uint16 - MSB>
1.0E9 Lower <uint16 - LSB>
The parameters are read using function code Decimal Upper <uint16 - MSB>
03 hex ‘Read multiple registers’. Parameters Lower <uint16 - LSB>
Upper <uint16 - MSB>
are written using function code 10 hex ‘Write Lower <uint16 - LSB>
multiple registers’. CRC-16 Lower xxhex
Upper xxhex
Date Datatype defined by Siemens used for dates. Example Normal read response
Date consist of 6 parts: Message byte Exmpl
Unsigned Char Year Slave address 01hex
Function code 03hex
Unsigned Char Month
Byte Count 06hex
Unsigned Char Day Year <uint8 >
Unsigned Char Hour Month <uint8 >
Unsigned Char Minute Day <uint8 >
Unsigned Char Second Hour <uint8 >
Minute <uint8 >
The parameters are read using function code Second <uint8 >
CRC-16 Lower xxhex
03 hex ‘Read multiple registers’. Parameters Upper xxhex
are written using function code 10 hex ‘Write
multiple registers’.

Exception handling
There is a defined set of exception codes to be returned by slaves in the event of problems. All exceptions are signalled in the
response from the slave by adding 80hex to the function code of the request and following this byte by an exception code.

1
Contains 4 exponent bits + 4 mantissa bits
2
Contains 8 mantissa bits

MODBUS RTU Module MAG8000_rev02.doc 19


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

Exception Exception text Explanation

PRELIMINARY ONLY
code (dec)
01 Illegal function The function code received in the query is not an
allowable action for the slave
02 Illegal data address The data address received in the query is not an
allowable address for the slave.
03 Illegal data value A value contained in the query data field is not an
allowable value for the addressed location. This may
indicate a fault in the structure of the remainder of a
complex request, such that the implied length is
incorrect.
04 Slave device failure The request is by some other reason not acceptable. It
may e.g. indicate that the data value to write is
evaluated to be beyond limits.
06 BUSY-acknowledge The slave is processing a long-duration command.
The master should retransmit the message later when
the slave is free.

Write protection of parameters


Writable parameters in the MAG8000 are as minimum protected with a software password. Some
parameters which have influence on the meter accuracy or the identity of the meter are protected with a
Hardware Lock as well - see MAG8000 Operating Manual on how to unlock these parameters.

How to enter Software Password


When attempting to write a parameter without a password MAG8000 will return “Illegal data address”
exception code.
To successfully change a parameter, use the following routine:
1. Write the password to parameter “Meter Access Code” at address 2007. Default password is
“1000”
2. Change the parameter.
When the correct password has been written the meter stays “unlocked” for 10 minutes after last
communication.
If a parameter is write-protected by a Hardware Lock the MAG8000 will return “Illegal data address”
exception if a Hardware Key is not used.

MODBUS RTU Module MAG8000_rev02.doc 20


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

MODBUS Holding Registers

PRELIMINARY ONLY
In the following the Holding Registers for the MAG8000 RTU module are described.
Note! The Register Addresses are applicable for MAG8000 Firmware revision 3.00 or newer.

Customer profile
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Meter access code Password to change parameters in the 4:02008 2007 6 string w
water meter
New access code Downloaded password is protected and 4:00009 8 6 string w
can not be read.
New password can be changed when
old password is entered or if hardware
key is mounted.
Application Customer application identification 4:00656 655 16 string rw
identifier information (max 15 characters)
Application Customer application location 4:00664 663 16 string rw
location information (max 15 characters)

Measurement
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Actual velocity Actual velocity in mm/s 4:03000 2999 4 float32 r
Flow rate Actual flow value 4:03002 3001 4 float32 r
Insulation value Insulation value from last insulation 4:03004 3003 4 float32 r
test
Insulation tests Number of insulation tests since last 4:03006 3005 4 uint32 r
fulfilled power up
Insulation test Date of last insulation test 4:03047 3046 6 date r
date
Electrode Electrode impedance A for empty pipe 4:03008 3007 4 sint32 r
impedance A detection
Electrode Electrode impedance B for empty pipe 4:03010 3009 4 sint32 r
impedance B detection
Flowrate percent Flowrate as percent of Qn 4:03012 3011 4 float32 r
value

Totalization
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Totalizer 1 Volume for totalization register 1 4:03017 3016 8 totaltype rw
Totalizer 2 Volume for totalization register 2 4:03021 3020 8 totaltype rw
Customer Customer totalizer 3 based on totalizer 4:03025 3024 8 totaltype r
totalizer 3 1 set up

MODBUS RTU Module MAG8000_rev02.doc 21


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

Menu control

PRELIMINARY ONLY
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Menu active 1 byte describing which menus are 4:00234 233 1 uint8 r
enabled
Bit 1= Operator menu,
Bit 2: Meter info menu,
Bit 3: Service menu,
Bit 4: Log menu,
Bit 5: Statistic menu,
Bit 6: Revenue menu,
Bit 7 Not Used
Bit 8: Not Used
Example
Menu active = 15 :
Operator; Meter info and Service menu
enabled
Default operator Default menu index. Automatic 4:00402 401 1 uint8 r
menu index selected after 10 minutes of non
operation of display key.
0 =Totalizer 1
1 =Totalizer 2
2 = Actual Flow rate
3 = Fault codes
4 = Customer Totalizer
Decimal point Decimalnumbers for displayed 4:00406 405 1 uint8 rw
totalized value
0 = No point
1 = One digit after point
2 = Two digits after point
3 = Three digits after point
4 = Automatic point adjust
Displayed unit Displayed m3 unit or an arrow 4:00222 221 1 uint8 r
indication for a unit label
0 = m3 unit not displayed
1 = Use m3 unit

Failure

Title Description MODBUS MODBUS No. of Data type Read /


REGISTER ADDRESS bytes Write
Insulation alarm Select 'Yes' to enable current alarm on 0:00000 2 - coil rw
output enable alarm output / call-up
0 = No
1 = Yes
Insulation fault Total hours fault active 4:00272 271 2 uint16 r
hours
Insulation fault Total number of faults 4:00273 272 1 uint8 r
counter
Insulation fault First time the fault appeared 4:00274 273 6 date r
appears
Insulation fault Last time the fault disappeared 4:00277 276 6 date r
disappears
Coil current alarm Select 'Yes' to enable active alarm on 0:00000 3 - coil rw
output enable alarm output / call-up
0 = No
1 = Yes
Coil current fault Total number of faults 4:00281 280 1 uint8 r
counter
Coil current fault First time the fault appeared 4:00282 281 6 date r
appears
MODBUS RTU Module MAG8000_rev02.doc 22
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Coil current fault Last time the fault disappeared 4:00285 284 6 date r

PRELIMINARY ONLY
disappears
Amplifier alarm Select 'Yes' to enable active alarm on 0:00000 4 - coil rw
output enable alarm output / call-up
0 = No
1 = Yes
Amplifier fault Total hours fault active 4:00288 287 2 uint16 r
hours
Amplifier fault Total number of faults 4:00289 288 1 uint8 r
counter
Amplifier fault First time the fault appeared 4:00290 289 6 date r
appears
Amplifier fault Last time the fault disappeared 4:00293 292 6 date r
disappears
Parameter Select 'Yes' to enable active alarm on 0:00000 5 - coil rw
checksum alarm alarm output / call-up
output enable 0 = No
1 = Yes
Parameter Total hours fault active 4:00296 295 2 uint16 r
checksum fault
hours
Parameter Total number of faults 4:00297 296 1 uint8 r
checksum fault
counter
Parameter First time the fault appeared 4:00298 297 6 date r
checksum fault
appears
Parameter Password to change parameters in the 4:00301 300 6 date r
checksum fault water meter
disappears
Low power alarm Select 'Yes' to enable active alarm on 0:00000 6 - coil rw
output enable alarm output / call-up
0 = No
1 = Yes
Low power fault Total hours fault active 4:00304 303 2 uint16 r
hours
Low power fault Total number of faults 4:00305 304 1 uint8 r
counter
Low power fault First time the fault appeared 4:00306 305 6 date r
appears
Low power fault Last time the fault disappeared 4:00309 308 6 date r
disappears
Flow overflow Select 'Yes' to enable active alarm on 0:00000 7 - coil rw
alarm output alarm output / call-up
enable 0 = No
1 = Yes
Overflow fault Total hours fault active 4:00312 311 2 uint16 r
hours
Overflow fault Total number of faults 4:00313 312 1 uint8 r
counter
First time the fault appeared 4:00314 313 6 date r
Overflow fault
appears
Overflow fault Last time the fault disappeared 4:00317 316 6 date r
disappears
Pulse A overload Select 'Yes' to enable active alarm on 0:00000 8 - coil rw
alarm output alarm output / call-up
enable 0= no
1 = Yes
Pulse A overload Total hours fault active 4:00320 319 2 uint16 r
fault hours

MODBUS RTU Module MAG8000_rev02.doc 23


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Pulse A overload Total number of faults 4:00321 320 1 uint8 r

PRELIMINARY ONLY
fault counter
Pulse A overload First time the fault appeared 4:00322 321 6 date r
fault appears
Pulse A overload Last time the fault disappeared 4:00325 324 6 date r
fault disappears
Pulse B overload Select 'Yes' to enable active alarm on 0:00000 9 - coil rw
alarm output alarm output / call-up
enable 0 = No
1 = Yes
Pulse B overload Total hours fault active 4:00328 327 2 uint16 r
fault hours
Pulse B overload Total number of faults 4:00329 328 1 uint8 r
fault counter
Pulse B overload First time the fault appeared 4:00330 329 6 date r
fault appears
Pulse B overload Last time the fault disappeared 4:00333 332 6 date r
fault disappears
Consumption Select 'Yes' to enable active alarm on 0:00000 10 - coil rw
alarm output alarm output / call-up
enable 0 = No
1 = Yes
Consumption Total hours fault active 4:00336 335 2 uint16 r
fault hours
Consumption Total number of faults 4:00337 336 1 uint8 r
fault counter
Consumption First time the fault appeared 4:00338 337 6 date r
fault appears
Consumption Last time the fault disappeared 4:00341 340 6 date r
fault disappears
Leakage alarm Select 'Yes' to enable active alarm on 0:00000 11 - coil rw
output enable alarm output / call-up
0 = No
1 = Yes
Leakage fault Total hours fault active 4:00344 343 2 uint16 r
hours
Leakage fault Total number of faults 4:00345 344 1 uint8 r
counter
Leakage fault First time the fault appeared 4:00346 345 6 date r
appears
Leakage fault Last time the fault disappeared 4:00349 348 6 date r
disappears
Empty pipe alarm Select 'Yes' to enable active alarm on 0:00000 12 - coil rw
output enable alarm output / call-up
0 = No
1 = Yes
Empty pipe fault Total hours fault active 4:00352 351 2 uint16 r
timer
Empty pipe fault Total number of faults 4:00353 352 1 uint8 r
counter

Empty pipe fault First time the fault appeared 4:00354 353 6 date r
appears
Empty pipe fault Last time the fault disappeared 4:00357 356 6 date r
disappears
Low impedance Select 'Yes' to enable active alarm on 0:00000 26 - coil rw
alarm output alarm output / call-up
enable 0 = No
1 = Yes
Low impedance Total hours fault active 4:00795 794 2 uint16 r
fault timer

MODBUS RTU Module MAG8000_rev02.doc 24


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Low impedance Total number of faults 4:00796 795 1 uint8 r

PRELIMINARY ONLY
fault counter
Low impedance First time the fault appeared 4:00797 796 6 date r
fault appears
Low impedance Last time the fault disappeared 4:00800 799 6 date r
fault disappears
Flow alarm output Select 'Yes' to enable active alarm on 0:00000 27 - coil rw
enable alarm output / call-up
0 = No
1 = Yes
Flow alarm fault Total hours fault active 4:00803 802 2 uint16 r
timer
Flow alarm fault Total number of faults 4:00804 803 1 uint8 r
counter
Flow alarm fault First time the fault appeared 4:00805 804 6 date r
appears
Flow alarm fault Last time the fault disappeared 4:00808 807 6 date r
disappears
Reverse flow Select 'Yes' to enable active alarm on 0:00000 28 - coil rw
alarm output alarm output / call-up
enable 0 = No
1 = Yes
Reverse flow fault Total hours fault active 4:00811 810 2 uint16 r
timer
Reverse flow fault Total number of faults 4:00812 811 1 uint8 r
counter
Reverse flow fault First time the fault appeared 4:00813 812 6 date r
appears
Reverse flow fault Last time the fault disappeared 4:00816 815 6 date r
disappears
Alarm 2 bytes describing which 4:00360 359 2 uint16 rw
configuration list errors/warning should generate an
alarm or call up on output B
Bit 1: Insulation error
Bit 2: Coil current error
Bit 3: Preamplifier overload
Bit 4: Database checksum error
Bit 5: Low power warning
Bit 6: Flow overload warning
Bit 7: Pulse A overload warning
Bit 8: Pulse B overload warning
Bit 9: Consumption interval warning
Bit 10/L: Leakage warning
Bit 11/E: Empty pipe warning
Bit 12/C: Low impedance warning
Bit 13/d: Flow limit warning
Bit 14/A: Reverse flow warning
Bit 15: Not used
Bit 16: Not used
Non optimal Total hours of non optimal 4:00052 51 2 uint16 r
measure time measurement conditions
Fault status 2 bytes describing which 4:03016 3015 2 uint16 r
errors/warnings are active
Bit 1: Insulation error
Bit 2: Coil current error
Bit 3: Preamplifier overload
Bit 4: Database checksum error
Bit 5: Low power warning
Bit 6: Flow overload warning
Bit 7: Pulse A overload warning
Bit 8: Pulse B overload warning

MODBUS RTU Module MAG8000_rev02.doc 25


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Bit 9: Consumption interval warning

PRELIMINARY ONLY
Bit 10/L: Leakage warning
Bit 11/E: Empty pipe warning
Bit 12/C: Low impedance warning
Bit 13/d: Flow limit warning
Bit 14/A: Reverse flow warning
Bit 15: Not used
Bit 16: Not used
Call up Select 'Yes' to reset active call-up 0:00000 14 - coil rw
acknowledge 0 = No
1 = Yes
Date of fault log Date of fault log reset 4:00049 48 6 date r
reset
Reset the fault log Reset the fault log and faults 0:00000 13 - coil rw
and faults 0 = No
1 = Reset

Measurement
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Flow unit factor Flow unit correction factor from m3/s 4:00206 205 4 float32 r
to other flow unit
Totalizer volume Totalizer unit correction factor from 4:00208 207 4 float32 r
unit factor m3 to other volume unit
Flowrate unit Meter unit text for flowrate 4:00210 209 12 string r
Totalizer unit Meter unit text for totalized volume 4:00216 215 12 string r
Pipe size Pipe diameter size in mm 4:00223 222 2 uint16 r
Sensor offset Sensor calibration offset in mm/s 4:00224 223 4 float32 r
Qn Nominal flow 4:00226 225 4 float32 r
Flow alarm limit Selectable flow limit for generating a 4:00793 792 4 float32 rw
flow alarm
Calibration factor Calibration factor 4:00228 227 4 float32 r
Calibration date Date of calibration 4:00230 229 6 date r
Verification mode Select 'Yes' to enable verification 4:00233 232 1 uint8 rw
enable mode. High resolution for calibration
or verification. Automatically stopped
after 4 hours.
0 = No
1 = Yes
Gain correction Electronic calibration factor 4:00117 116 4 float32 r
Adjustment Meter correction factor for customer 4:00236 235 4 float32 r
Factor adjustment of the calculated flow
value.

Excitation Maximum possible sensor excitation 4:00247 246 1 uint8 r


frequency sensor frequency.
limit 0 = 1/15Hz
1 = 1/5Hz
2 = 1.5625Hz
3 = 3.125Hz
4 = 6.25Hz
5 = 1/30Hz
6 = 1/60Hz

MODBUS RTU Module MAG8000_rev02.doc 26


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Excitation Maximum selectable excitation 4:00048 47 1 uint8 r
frequency limit frequency
0 = 1/15Hz
1 = 1/5Hz
2 = 1.5625Hz
3 = 3.125Hz
4 = 6.25Hz
5 = 1/30Hz
6 = 1/60Hz
Excitation Actual selected excitation frequency 4:00238 237 1 uint8 r
frequency 0 = 1/15Hz
1 = 1/5Hz
2 = 1.5625Hz
3 = 3.125Hz
4 = 6.25Hz
5 = 1/30Hz
6 = 1/60Hz
Low flow cut-off If the flow subceeds this percentage of 4:00239 238 4 float32 r
Qn, then the flowvalue is set to zero.n.
Filter time Generel filter for flow measurement. 4:00241 240 2 uint16 r
constant Filter constant is the number of
excitations the filtering will take place
over. Higher number gives a slower
and more stable flow signal.
Empty pipe Select 'Yes' to enable empty pipe 4:00242 241 1 uint8 r
detection enable detection.
0 = No
1 = Yes
Empty pipe limit Electrode impedance in ohm for active 4:00243 242 4 sint32 r
empty pipe detection
Low medium Electrode impedance in ohm for active 4:00254 253 4 sint32 rw
impedance alarm low impedance alarm detection
Insulation test Select 'Yes' for enabling insulation 4:00245 244 1 uint8 rw
enable test
0 = No
1 = Yes
Insulation test Number of days between insulation 4:00246 245 2 uint16 rw
interval tests
Reverse flow Selectable reverse flow limit for 4:00820 819 4 float32 rw
alarm limit generating a reverse flow alarm

Totalization
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Flow direction Calculation principle on flow direction 4:00400 399 1 uint8 rw
totalizer 1 for forward - reverse or net flow
0 = Forward
1 = Reverse
2 = Net
Totalizer 1 Date and time when totalizer 1 has 4:00073 72 6 date r
changes date been changed
Flow direction Calculation principle on flow direction 4:00401 400 1 uint8 rw
totalizer 2 for forward - reverse or net flow
0 = Forward
1 = Reverse
2 = Net
Totalizer 2 Date and time when totalizer 2 has 4:00076 75 6 date r
changes date been changed

MODBUS RTU Module MAG8000_rev02.doc 27


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Pulse output
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Output A enable Select 'Yes' to enable output A 4:00373 372 1 uint8 rw
0 = No
1 = Yes
Pulse A function Pulse output calculation on pure 4:00374 373 1 uint8 rw
forward or reverse flow - or net flow
for forward and reverse pulse flow
0 = Forward
1 = Reverse
2 = Forward net
3 = Reverse net
Amount per pulse Volume per pulse. Output A 4:00375 374 4 float32 rw
A
Pulse width for Pulse length when the pulse is active 4:00377 376 1 uint8 rw
pulse A 0 = 10 ms
1 = 50 ms
2 = 100 ms
3 = 500 ms
4 = 5 ms
Output B enable Select 'Yes' to enable output B 4:00378 377 1 uint8 rw
0 = No
1 = Yes
Pulse B function Configuration of output B as pulse - 4:00379 378 1 uint8 rw
alarm or call up function
0 = Pulse
1 = Alarm
2 = Call up
Pulse B direction Pulse output calculation on pure 4:00380 379 1 uint8 rw
forward or reverse flow - or net flow
for forward and reverse pulse flow
0 = Forward
1 = Reverse
2 = Forward net
3 = Reverse net
Amount per pulse Volume per pulse. Output B 4:00381 380 4 float32 rw
B
Pulse width for Pulse length when the pulse is active 4:00383 382 1 uint8 rw
pulse B 0 = 10 ms
1 = 50 ms
2 = 100 ms
3 = 500 ms

MODBUS RTU Module MAG8000_rev02.doc 28


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Device Meter has default address value "1" 4:00528 527 2 uint16 r
Communication with selectable address up to 247
Address
Baudrate Communication port speed 4:00529 528 2 uint16 r
0 = 1200
1 = 2400
2 = 4800
3 = 9600
4 = 19200
5 = 38400
Parity Communication port parity 4:00530 529 2 uint16 r
0 = Even 1 stop
1 = Odd 1 stop
2 = None 2 stop
3 = None 1 stop
Device Product Siemens MAG8000 product ID 10779 4:00079 78 2 uint16 r
ID
Interframe space Minimum space between two 4:00531 530 2 uint16 r
messages given in tenth bytes
Response delay Minimum time from receiving a 4:00372 371 2 uint16 r
request to its response
Reset Warning! Check settings before reset 0:00000 0 1 coil r
communication and accept new communications
driver settings - otherwise communication
will be interrupted!
0 =No
1 = Yes

Service control

Title Description MODBUS MODBUS No. of Data type Read /


REGISTER ADDRESS bytes Write
Coil current Select 'Yes' to disable coil current for 0:00000 15 1 coil r
disable magnetic field
0 = No
1 = Yes
Fixed flow mode Select 'Yes' to enable fixed flow value 0:00000 16 1 coil r
enable 0 = No
1 = Yes
Fixed flow value Fixed flow value for enabled fixed 4:00361 360 4 float32 r
flow
Latest service Latest service date (can also be used 4:00363 362 6 date rw
date for date of installation)
Operating hours Total operation hours since first power 4:00080 79 4 uint32 r
since power up up
Numbers of Total number of power up since first 4:00366 365 2 uint16 r
power up time power up.
Actual date and Actual date and time of day-month- 4:03033 3032 6 date rw
time year and hours:minutes:seconds

MODBUS RTU Module MAG8000_rev02.doc 29


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

PRELIMINARY ONLY
Power control
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Mains frequency Country related mains power 4:00367 366 1 uint8 r
frequency for enabling correct noise
filtering
0 = 50 Hz
1 = 60 Hz
Power supply Meter power supply source 4:03029 3028 1 uint8 r
0 = Battery
1 = Mains supply
Battery power Number of installed batteries (Internal 4:00368 367 1 uint8 r
batterypack has 2 batteries and
external batterypack has 4 batteries)
Excitations no. Numbers of excitations since last 4:03014 3013 4 uint32 r
battery reset
Actual battery Actual remaining battery power 4:03030 3029 1 uint8 r
capacity capacity as a percentage of max
capacity
Battery operating Operating time since installation of 4:00089 88 4 uint32 r
time batteries (last battery reset)
Power status 0 = Normal operation 4:03031 3030 1 uint8 r
1 = Battery alarm. Actual battery
capacity is below battery alarm level
(% of max capacity)
2 = Too low power (enters stand by
mode)
3 = As value 1 and 2 together
4 = External power gone
5 = As value 1 and 4 together
6 = As value 2 and 4 together
7 = As value 1 and 2 and 4 together
Battery alarm Battery capacity level (%) where low 4:00369 368 1 uint8 rw
limit power alarm will be activated.
Transmitter Temperature inside the transmitter (°C) 4:03042 3041 4 float32 r
temperature
Battery Latest installation date of batteries 4:00091 90 6 date r
installation date
Battery change Select 'Yes' to set battery installation 0:00000 17 - coil rw
enable date to current date and reset
remaining battery operation capacity to
maximum.
0 = No
1 = Yes
Communication Communication module type - for 4:00822 821 1 uint8 r
module type calculating correct power use.
0 = No module
1 = RS485
2 = RS232
3 = RS232 always connected

MODBUS RTU Module MAG8000_rev02.doc 30


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

Consumption statistic

PRELIMINARY ONLY
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Reset customer Reset of customer totalizer 0:00000 18 - coil rw
totalizer 3 0 = No
1 = Yes
Customer totalizer Date when customer totalizer has been 4:00098 97 6 date r
3 reset date reset
Highest flowrate Value of highest measured flow rate 4:00407 406 4 float32 r
Date of highest Date where highest flow rate occure 4:00409 408 6 date r
flowrate
Lowest flowrate Value of lowest measured flow rate 4:00412 411 4 float32 r
Date of lowest Date where lowest flow rate occure 4:00414 413 6 date r
flowrate
Highest day Value of highest measured daily 4:00417 416 4 float32 r
consumption consumption. Calculation based on
totalizer 1
Date of highest Date when highest measured daily 4:00419 418 6 date r
day consumption consumption occured
Lowest day Value of lowest measured daily 4:00422 421 4 float32 r
consumption consumption. Calculation based on
totalizer 1
Date of lowest Date when lowest measured daily 4:00424 423 6 date r
day consumption consumption occured
Latest week Latest week consumption (based on 4:00164 163 4 float32 r
consumption totalizer 1 for the last 7 days)
Day 1 (yesterday) Latest day consumption (based on 4:00162 161 4 float32 r
of last week totalizer 1)
consumption
Day 2 of last Latest day-1 consumption (based on 4:00101 100 4 float32 r
week totalizer 1)
consumption
Day 3 of last Latest day-2 consumption (based on 4:00033 32 4 float32 r
week totalizer 1)
consumption
Day 4 of last Latest day-3 consumption (based on 4:00035 34 4 float32 r
week totalizer 1)
consumption
Day 5 of last Latest day-4 consumption (based on 4:00037 36 4 float32 r
week totalizer 1)
consumption
Day 6 of last Latest day-5 consumption (based on 4:00039 38 4 float32 r
week totalizer 1)
consumption
Day 7 (7 days Latest day-6 consumption (based on 4:00041 40 4 float32 r
ago) of last week totalizer 1)
consumption
Actual month Actual month consumption (based on 4:03044 3043 4 float32 r
consumption totalizer 1 from the first in the month)
Latest month Latest month consumption (based on 4:00166 165 4 float32 r
consumption totalizer 1 from the first in the month)
Reset date of Date of log reset of statistic 4:00427 426 6 date r
statistic inf. information
Reset statistic Reset the statistic information log 0:00000 19 - coil rw
information 0 = No
1 = Yes

MODBUS RTU Module MAG8000_rev02.doc 31


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

Consumption profile

PRELIMINARY ONLY
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Upper limit in CP Consumption flow range 1 - from 0 to 4:00430 429 1 uint8 rw
range 1 upper limit 1 as a percent of Qn
Total time in CP Total hours of flow rate in flow range 4:00431 430 4 float32 r
range 1 1
Upper limit in CP Consumption flow range 2 - from 4:00433 432 1 uint8 rw
range 2 previous flow range to upper limit 2 as
a percent of Qn
Total time in CP Total hours of flow rate in flow range 4:00434 433 4 float32 r
range 2 2
Upper limit in CP Consumption flow range 3 - from 4:00436 435 1 uint8 rw
range 3 previous flow range to upper limit 3 as
a percent of Qn
Total time in CP Total hours of flow rate in flow range 4:00437 436 4 float32 r
range 3 3
Upper limit in CP Consumption flow range 4 - from 4:00439 438 1 uint8 rw
range 4 previous flow range to upper limit 4 as
a percent of Qn
Total time in CP Total hours of flow rate in flow range 4:00440 439 4 float32 r
range 4 4
Upper limit in CP Consumption flow range 5 - from 4:00442 441 1 uint8 rw
range 5 previous flow range to upper limit 5 as
a percent of Qn
Total time in CP Total hours of flow rate in flow range 4:00443 442 4 float32 r
range 5 5
Total time in CP Total hours of flow rate in the last flow 4:00445 444 4 float32 r
range 6 range 6 (from previous flow range up
to Qn)
Reset date of Date of log reset of consumption 4:00447 446 6 date r
consumptionprofil profile information
e
Reset Reset the consumption profile 0:00000 20 - coil rw
consumption information log
profile 0 = No
1 = Yes

MODBUS RTU Module MAG8000_rev02.doc 32


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

Leakage statistic

PRELIMINARY ONLY
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Leakage detection Leakage detection can be controlled by 4:00450 449 1 uint8 rw
mode a fixed leakage limit or the lowest
measured value added the leakage
limit
0 = Off
1 = Fixed limit
2 = Lowest added fixed limit
Leakage Selected excitation frequency in 4:00451 450 1 uint8 rw
excitation leakage detection period
frequency 0 = 1/15Hz
1 = 1/5Hz
2 = 1.5625Hz
3 = 3.125Hz
4 = 6.25Hz
5 = 1/30Hz
6 = 1/60Hz
Leakage limit If measured leakage value is above this 4:00452 451 4 float32 rw
limit, a possible leakage is detected
Leakage value The actual text of unit choice (flowrate 4:03036 3035 12 string r
unit or volume)
Leakage source The source value for leakage can be 4:00454 453 1 uint8 rw
flowrate or volume
0 = Flowrate
1 = Volume
Start period for Time of day to start the leakage 4:00455 454 2 uint16 rw
leakage detection detection period
Duration leakage Leakage detection duration in 10 4:00456 455 1 uint8 rw
detection minutes resolution
Periods with Actual days/periods where measured 4:00457 456 1 uint8 r
possible leakage leakage value is above leakage limit
Leakage periods Number of days / periods before 4:00458 457 1 uint8 rw
before alarm leakage fault/alarm appears
Lowest measured Lowest measured value in leakage 4:00459 458 4 float32 r
leakage value period
Date of lowest Date of lowest measured value 4:00461 460 6 date r
leakage value
Highest measured Highest measured value in leakage 4:00464 463 4 float32 r
leakage value period
Date of highest Date of highest measured value 4:00466 465 6 date r
leakage value
Latest leakage Last period lowest flow value 4:00469 468 4 float32 r
period flowrate
Latest leakage Latest leakage period totalized 4:00370 369 4 float32 r
period volume
Reset leakage Reset the leakage fault. 0:00000 22 - coil rw
fault 0 = No
1 =Yes
Reset leakage Reset the leakage indication 0:00000 21 - coil rw
period information
information 0 = No
1 = Yes

Leakage status One byte describing status of leakage 4:00403 402 1 uint8 rw
detection
Bit 1: Finished successfully

MODBUS RTU Module MAG8000_rev02.doc 33


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Bit 2: Leakage detection running

PRELIMINARY ONLY
Bit 3: Leakage detection failed
(SystemStatus have fatal error)
Bit 4: Leakage detection failed
(Empty-pipe detection disabled)
Bit 5: Leakage detection failed (Coil
current off)
Bit 6: Leakage detection failed
(Insulation test was active during
detection)
Bit 7 : Leakage detection stopped
because leakage parameter was
changed.

Datalog

Title Description MODBUS MODBUS No. of Data type Read /


REGISTER ADDRESS bytes Write
Log interval Log interval 4:00471 470 1 uint8 rw
0 = Daily
1 = Weekly (7 days)
2 = Monthly
Delay weekly log Delay of weekly data logging from 4:00235 234 1 uint8 rw
interval current day to first day logging at
00:00:00. Thereafter a fixed interval of
7 days.
Limit for too high Limit for too high consumption during 4:00472 471 4 float32 rw
consumption current log interval. Based on totalizer
1
Limit for too low Limit for too low consumption during 4:00474 473 4 float32 rw
consumption current log interval. Based on totalizer
1
Reset Reset the consumption fault. Caused 0:00000 23 - coil rw
consumption log by too low or too high consumption in
fault the log interval
0 = No
1 = Yes
Date of latest log Date of latest stored value for log 1 4:00476 475 6 date r
period
Latest Log period Latest logged value of consumption 4:00479 478 4 float32 r
totalized (1) based on totalizer 1
Latest Log period Latest logged value of consumption 4:00481 480 4 float32 r
totalized (2) based on totalizer 2
Latest Log period Two bytes describing fault status in log 4:00483 482 2 uint16 r
fault status period
Bit 1: Insulation error
Bit 2: Coil current error
Bit 3: Preamplifier overload
Bit 4: Database checksum error
Bit 5: Low power warning
Bit 6: Flow overload warning
Bit 7: Pulse A overload warning
Bit 8: Pulse B overload warning
Bit 9: Consumption interval warning
Bit 10/L: Leakage warning
Bit 11/E: Empty pipe warning
Bit 12/C: Low impedance warning
Bit 13/d: Flow limit warning
Bit 14: Not used
Bit 15: Not used
MODBUS RTU Module MAG8000_rev02.doc 34
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Bit 16: Not used

PRELIMINARY ONLY
Latest Log period One byte describing status information 4:00484 483 1 uint8 r
status information in log period
Bit 1: Totalizer 1 or 2 changed or reset
Bit 2: Tariff setting changed or reset
Bit 3: Tariff register changed or reset
Bit 4: Date - time changed
Bit 5: Alarm active in logged period
(See alarm fault log)
Bit 6: Fault log has been reset
Bit 7: HW lock broken
Bit 8: Power Up
Date of log period Date where value for log 2 is stored 4:00485 484 6 date r
2
Log period 2 Previous logged value of consumption 4:00488 487 4 float32 r
totalized (1) based on totalizer 1
Log period 2 Previous logged value of consumption 4:00490 489 4 float32 r
totalized (2) based on totalizer 2
Log period 2 fault Two bytes describing fault status in log 4:00492 491 2 uint16 r
status period
Bit 1: Insulation error
Bit 2: Coil current error
Bit 3: Preamplifier overload
Bit 4: Database checksum error
Bit 5: Low power warning
Bit 6: Flow overload warning
Bit 7: Pulse A overload warning
Bit 8: Pulse B overload warning
Bit 9: Consumption interval warning
Bit 10/L: Leakage warning
Bit 11/E: Empty pipe warning
Bit 12/C: Low impedance warning
Bit 13/d: Flow limit warning
Bit 14: Not used
Bit 15: Not used
Bit 16: Not used
Log period 2 One byte describing status information 4:00493 492 1 uint8 r
status information in log period
Bit 1: Totalizer 1 or 2 changed or reset
Bit 2: Tariff setting changed or reset
Bit 3: Tariff register changed or reset
Bit 4: Date - time changed
Bit 5: Alarm active in logged period
(See alarm fault log)
Bit 6: Fault log has been reset
Bit 7: HW lock broken
Bit 8: Power Up
Date of log period Date where value for log 3 is stored 4:00494 493 6 date r
3
Log period 3 Log period 3 logged value of 4:00497 496 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 3 Log period 3 logged value of 4:00499 498 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 3 fault See log period 2 4:00501 500 2 uint16 r
status
Log period 3 See log period 2 4:00502 501 1 uint8 r
status information
Date of log period Date where value for log 4 is stored 4:00503 502 6 date r
4
Log period 4 Log period 4 logged value of 4:00506 505 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 4 Log period 4 logged value of 4:00508 507 4 float32 r
MODBUS RTU Module MAG8000_rev02.doc 35
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
totalized (2) consumption based on totalizer 2

PRELIMINARY ONLY
Log period 4 fault See log period 2 4:00510 509 2 uint16 r
status
Log period 4 See log period 2 4:00511 510 1 uint8 r
status information
Date of log period Date where value for log 5 is stored 4:00532 531 6 date r
5
Log period 5 Log period 5 logged value of 4:00535 534 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 5 Log period 5 logged value of 4:00537 536 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 5 fault See log period 2 4:00539 538 2 uint16 r
status
Log period 5 See log period 2 4:00540 539 1 uint8 r
status information
Date of log period Date where value for log 6 is stored 4:00541 540 6 date r
6
Log period 6 Log period 6 logged value of 4:00544 543 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 6 Log period 6 logged value of 4:00546 545 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 6 fault See log period 2 4:00548 547 2 uint16 r
status
Log period 6 See log period 2 4:00549 548 1 uint8 r
status information
Date of log period Date where value for log 7 is stored 4:00550 549 6 date r
7
Log period 7 Log period 7 logged value of 4:00553 552 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 7 Log period 7 logged value of 4:00555 554 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 7 fault See log period 2 4:00557 556 2 uint16 r
status
Log period 7 See log period 2 4:00558 557 1 uint8 r
status information
Date of log period Date where value for log 8 is stored 4:00559 558 6 date r
8
Log period 8 Log period 8 logged value of 4:00562 561 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 8 Log period 8 logged value of 4:00564 563 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 8 fault See log period 2 4:00566 565 2 uint16 r
status
Log period 8 See log period 2 4:00567 566 1 uint8 r
status information
Date of log period Date where value for log 9 is stored 4:00568 567 6 date r
9
Log period 9 Log period 9 logged value of 4:00571 570 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 9 Log period 9 logged value of 4:00573 572 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 9 fault See log period 2 4:00575 574 2 uint16 r
status
Log period 9 See log period 2 4:00576 575 1 uint8 r
status information
Date of log period Date where value for log 10 is stored 4:00577 576 6 date r
10
Log period 10 Log period 10 logged value of 4:00580 579 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 10 Log period 10 logged value of 4:00582 581 4 float32 r
totalized (2) consumption based on totalizer 2
MODBUS RTU Module MAG8000_rev02.doc 36
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Log period 10 See log period 2 4:00584 583 2 uint16 r

PRELIMINARY ONLY
fault status
Log period 10 See log period 2 4:00585 584 1 uint8 r
status information
Date of log period Date where value for log 11 is stored 4:00586 585 6 date r
11
Log period 11 Log period 11 logged value of 4:00589 588 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 11 Log period 11 logged value of 4:00591 590 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 11 See log period 2 4:00593 592 2 uint16 r
fault status
Log period 11 See log period 2 4:00594 593 1 uint8 r
status information
Date of log period Date where value for log 1 2 is stored 4:00595 594 6 date r
12
Log period 12 Log period 12 logged value of 4:00598 597 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 12 Log period 12 logged value of 4:00600 599 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 12 See log period 2 4:00602 601 2 uint16 r
fault status
Log period 12 See log period 2 4:00603 602 1 uint8 r
status information
Date of log period Date where value for log 13 is stored 4:00604 603 6 date r
13
Log period 13 Log period 13 logged value of 4:00607 606 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 13 Log period 13 logged value of 4:00609 608 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 13 See log period 2 4:00611 610 2 uint16 r
fault status
Log period 13 See log period 2 4:00612 611 1 uint8 r
status information
Date of log period Date where value for log 14 is stored 4:00613 612 6 date r
14
Log period 14 Log period 14 logged value of 4:00616 615 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 14 Log period 14 logged value of 4:00618 617 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 14 See log period 2 4:00620 619 2 uint16 r
fault status
Log period 14 See log period 2 4:00621 620 1 uint8 r
status information
Date of log period Date where value for log 15 is stored 4:00622 621 6 date r
15
Log period 15 Log period 15 logged value of 4:00625 624 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 15 Log period 15 logged value of 4:00627 626 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 15 See log period 2 4:00629 628 2 uint16 r
fault status
Log period 15 See log period 2 4:00630 629 1 uint8 r
status information
Date of log period Date where value for log 16 is stored 4:00631 630 6 date r
16
Log period 16 Log period 16 logged value of 4:00634 633 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 16 Log period 16 logged value of 4:00636 635 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 16 See log period 2 4:00638 637 2 uint16 r
MODBUS RTU Module MAG8000_rev02.doc 37
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
fault status

PRELIMINARY ONLY
Log period 16 See log period 2 4:00639 638 1 uint8 r
status information
Date of log period Date where value for log 17 is stored 4:00678 677 6 date r
17
Log period 17 Log period 17 logged value of 4:00681 680 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 17 Log period 17 logged value of 4:00683 682 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 17 See log period 2 4:00685 684 2 uint16 r
fault status
Log period 17 See log period 2 4:00686 685 1 uint8 r
status information
Date of log period Date where value for log 18 is stored 4:00687 686 6 date r
18
Log period 18 Log period 18 logged value of 4:00690 689 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 18 Log period 18 logged value of 4:00692 691 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 18 See log period 2 4:00694 693 2 uint16 r
fault status
Log period 18 See log period 2 4:00695 694 1 uint8 r
status information
Date of log period Date where value for log 19 is stored 4:00696 695 6 date r
19
Log period 19 Log period 19 logged value of 4:00699 698 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 19 Log period 19 logged value of 4:00701 700 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 19 See log period 2 4:00703 702 2 uint16 r
fault status
Log period 19 See log period 2 4:00704 703 1 uint8 r
status information
Date of log period Date where value for log 20 is stored 4:00705 704 6 date r
20
Log period 20 Log period 20 logged value of 4:00708 707 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 20 Log period 20 logged value of 4:00710 709 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 20 See log period 2 4:00712 711 2 uint16 r
fault status
Log period 20 See log period 2 4:00713 712 1 uint8 r
status information
Date of log period Date where value for log 21 is stored 4:00714 713 6 date r
21
Log period 21 Log period 21 logged value of 4:00717 716 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 21 Log period 21 logged value of 4:00719 718 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 21 See log period 2 4:00721 720 2 uint16 r
fault status
Log period 21 See log period 2 4:00722 721 1 uint8 r
status information
Date of log period Date where value for log 22 is stored 4:00723 722 6 date r
22
Log period 22 Log period 22 logged value of 4:00726 725 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 22 Log period 22 logged value of 4:00728 727 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 22 See log period 2 4:00730 729 2 uint16 r
fault status
MODBUS RTU Module MAG8000_rev02.doc 38
Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Log period 22 See log period 2 4:00731 730 1 uint8 r

PRELIMINARY ONLY
status information
Date of log period Date where value for log 23 is stored 4:00732 731 6 date r
23
Log period 23 Log period 23 logged value of 4:00735 734 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 23 Log period 23 logged value of 4:00737 736 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 23 See log period 2 4:00739 738 2 uint16 r
fault status
Log period 23 See log period 2 4:00740 739 1 uint8 r
status information
Date of log period Date where value for log 24 is stored 4:00741 740 6 date r
24
Log period 24 Log period 24 logged value of 4:00744 743 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 24 Log period 24 logged value of 4:00746 745 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 24 See log period 2 4:00748 747 2 uint16 r
fault status
Log period 24 See log period 2 4:00749 748 1 uint8 r
status information
Date of log period Date where value for log 25 is stored 4:00750 749 6 date r
25
Log period 25 Log period 25 logged value of 4:00753 752 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 25 Log period 25 logged value of 4:00755 754 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 25 See log period 2 4:00757 756 2 uint16 r
fault status
Log period 25 See log period 2 4:00758 757 1 uint8 r
status information
Date of log period Date where value for log 26 is stored 4:00759 758 6 date r
26
Log period 26 Log period 26 logged value of 4:00762 761 4 float32 r
totalized (1) consumption based on totalizer 1
Log period 26 Log period 26 logged value of 4:00764 763 4 float32 r
totalized (2) consumption based on totalizer 2
Log period 26 See log period 2 4:00766 765 2 uint16 r
fault status
Log period 26 See log period 2 4:00767 766 1 uint8 r
status information

Consumption readings
Title Description MODBUS MODBUS No. of Data type Read /
REGISTER ADDRESS bytes Write
Actual flow meter One byte describing actual status 4:00144 143 1 uint8 r
status Bit 1: Totalizer 1 or 2 changed or reset
Bit 2: Tariff setting changed or reset
Bit 3: Tariff register changed or reset
Bit 4: Date - time changed
Bit 5: Alarm active
Bit 6: Fault log has been reset
Bit 7: HW lock broken
Bit 8: Power Up
Next settling date Next automatically settling date where 4:00145 144 6 SettlingDat rw
actual value of totalizer 1 is stored e
Latest settling Latest settling date where value of 4:00148 147 6 date r
date totalizer 1 was stored

MODBUS RTU Module MAG8000_rev02.doc 39


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
Latest totalizer 1 Latest stored value of totalizer 1 4:00151 150 8 totaltype r

PRELIMINARY ONLY
value
Previous settling Previous settling date where value of 4:00155 154 6 date r
date totalizer 1 was stored
Previous totalizer Previous stored value of totalizer 1 4:00158 157 8 totaltype r
1 value

MODBUS RTU Module MAG8000_rev02.doc 40


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module

APPENDIX D CRC calculation

PRELIMINARY ONLY
The Cyclical Redundancy Checking (CRC) field is two bytes, containing a 16–bit binary value. The CRC value is first
generated by the transmitting device, which appends the CRC to the message. The device that receives recalculates a CRC
during receipt of the message, and compares the calculated value to the actual value it received in the CRC field. If the two
values are not equal, an error results.

There are many ways of calculating a CRC checksum. To ensure correct calculation, please refer to [Ref 1] MODBUS® over
serial line, where detailed descriptions and programming examples are available. Even more information and programming
examples in different programming languages can be found on: [Link] searching for CRC.

Below is a short text description of how the CRC is calculated. This description is then followed by a C programming example.

CRC calculation:
1. Load a 16–bit register with FFFF hex (all 1’s). Call this the CRC register.
2. Exclusive OR the first 8–bit byte of the message with the low–order byte of the 16–bit CRC register, putting the result in the
CRC register.
3. Shift the CRC register one bit to the right (toward the LSB), zero–filling the MSB. Extract and examine the LSB.
4. (If the LSB was 0): Repeat Step 3 (another shift). (If the LSB was 1): Exclusive OR the CRC register with the polynomial
value 0xA001 (1010 0000 0000 0001).
5. Repeat Steps 3 and 4 until 8 shifts have been performed. When this is done, a complete 8–bit byte will have been
processed.
6. Repeat Steps 2 through 5 for the next 8–bit byte of the message. Continue doing this until all bytes have been processed.
7. The final content of the CRC register is the CRC value.
8. When the CRC is placed into the message, its upper and lower bytes must be swapped as described below.

Placing the CRC into the Message


When the 16–bit CRC (two 8–bit bytes) is transmitted in the message, the low-order byte will be transmitted first, followed by
the high-order byte.
For example, if the CRC value is 1241 hex (0001 0010 0100 0001):

Data Data Data Data Data CRC CRC


Addr Func
Count n n+1 n+2 n+x LO HI

0x41 0x12

C programming example
/* Table of CRC values for high-order byte */
static __flash unsigned char auchCRCHi[] = {
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40
};

/* Table of CRC values for low-order byte */


static __flash char auchCRCLo[] = {
0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4,
0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,

MODBUS RTU Module MAG8000_rev02.doc 41


Rev 1.00 pre02
Siemens Flow Division MAG8000 Modbus RTU Module
0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD,

PRELIMINARY ONLY
0x1D, 0x1C, 0xDC, 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,
0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2, 0x32, 0x36, 0xF6, 0xF7,
0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,
0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE,
0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,
0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2,
0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,
0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB,
0x7B, 0x7A, 0xBA, 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0, 0x50, 0x90, 0x91,
0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,
0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88,
0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80,
0x40
};

unsigned short int CRC16(unsigned char *puchMsg, unsigned short int usDataLen)
{
unsigned char uchCRCHi = 0xFF; /* high byte of CRC initialized */
unsigned char uchCRCLo = 0xFF; /* low byte of CRC initialized */
unsigned uIndex ; /* will index into CRC lookup table */
while(usDataLen--) /* pass through message buffer */
{
uIndex = uchCRCHi ^ *puchMsg++ ; /* calculate the CRC */
uchCRCHi = uchCRCLo ^ auchCRCHi[uIndex] ;
uchCRCLo = auchCRCLo[uIndex] ;
}
#ifdef INTEL_LIKE_PROCESSOR
return (unsigned short int)((uchCRCLo << 8) | uchCRCHi);
#else
return (unsigned short int)((uchCRCHi << 8) | uchCRCLo);
#endif
}

MODBUS RTU Module MAG8000_rev02.doc 42


Rev 1.00 pre02

Common questions

Powered by AI

Exception response messages in the MODBUS RTU protocol are essential for error handling within the MAG8000 system. These messages indicate issues such as invalid function codes or address errors by utilizing an exception code and an increment to the original message function code by 80hex. This response mechanism allows the system to communicate specific error types back to the master for corrective actions .

The key difference in response structures between a normal and an exception response in the MODBUS protocol lies in the function code adjustment. Both responses maintain the same slave address. However, a normal response retains the original function code, while an exception response increments it by 80hex to indicate an error. The exception response also incorporates an exception code that specifies the nature of the error, enhancing diagnostic capabilities .

In the Siemens MAG8000 module, a normal response for coil status requests includes the same slave address and function code as the original command, along with the coil's status. Conversely, an exception response modifies the function code by adding 80hex and includes an exception code that pinpoints the issue (e.g., invalid coil address), ensuring precise feedback for troubleshooting .

The Siemens MAG8000 Modbus RTU Module performs coil writing using a function code of 05hex which specifies the coil address and the value to be set. The CRC check in this process ensures data integrity by validating that the transmitted message was received correctly. The coil value can be set or reset based on the specified data, and any deviation from valid values leads to no change and potential error reporting .

The process of writing multiple registers in the MODBUS RTU protocol using the MAG8000 module involves using function code 10hex. A constraint exists on the number of registers that can be written concurrently, which is a maximum of 25. If the quantity exceeds 25, the system returns an error code of 03hex in the exception response, limiting batch processing capabilities .

The hardware lock status, indicated within the Siemens MAG8000 log period status information, signals potential unauthorized access attempts or physical tampering with the device. The breaking of the hardware lock bit suggests compromised security, which could affect data integrity or device functionality. Immediate investigation and corrective measures are essential to secure the system and prevent further unauthorized activities .

The MODBUS RTU protocol ensures message integrity by using a CRC-16 b. The system generates a CRC value from the transmitted message, which includes the slave address, function code, and data sections. Upon receipt, the slave recalculates the CRC value and compares it to the received value to verify message integrity. This process is critical as it prevents data corruption and ensures accurate and reliable communication between devices .

Log period data in the Siemens MAG8000 Modbus RTU Module is structured to provide historical consumption data and status information across multiple periods. Each log contains specific fields such as totalized consumption values, fault status indicators, and status information. This structure is critical for diagnostics and reporting, allowing users to track changes over time, identify trends, and detect potential issues affecting operations .

A normal response in the MODBUS RTU protocol for reading multiple registers includes the same slave address and function code as the request message, followed by the actual data returned from the specified registers. Error detection is managed using a cyclic redundancy check (CRC-16) value, which is calculated from the message components and compared upon receipt to validate data integrity .

Fault status bits in the log periods of the MAG8000 module convey critical error states such as insulation errors, power warnings, and system overloads, among others. Utilization of this information allows for proactive maintenance by identifying errors early, planning corrective actions, and thus minimizing downtime and enhancing system reliability .

You might also like