MAG8000 Modbus RTU Module Guide
MAG8000 Modbus RTU Module Guide
PRELIMINARY ONLY
Modbus RTU RS485/RS232 Add-On Module for Sitrans FM MAG8000
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.
References
Reference 1 MODBUS® over Serial Line
Specification & Implementation guide v. 1.0
[Link] 12/02/02
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
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
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.
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.
RS232 connections
PRELIMINARY ONLY
RX
TX
+ Common
-
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.
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
PRELIMINARY ONLY
FlowTool Setup
Figure 3 FlowTool
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.
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’
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
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.
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.
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
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.
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.
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:
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
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’.
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.
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
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.
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
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.
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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.
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
};
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
}
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 .