Modbus PX Io
Modbus PX Io
Modbus PX Io
Desigo™ PX Open
PX Open M-bus
Engineering guide
Version 4.1 / 5.0 / 5.1 / 6.0
CM2Y9774en_04
2016-07-31 Building Technologies
Contents
0 Before you start ....................................................................................... 4
0.1 Revision history ......................................................................................... 4
0.2 Trademarks ............................................................................................... 4
0.3 Related documents ................................................................................... 4
1 Introduction ............................................................................................. 5
1.1 Positioning of the PX Open M-bus solution .............................................. 5
1.2 Requirements and limitations in relation to the M-bus system ................. 5
2 Project engineering overview ................................................................ 6
2.1 The integration workflow ........................................................................... 6
2.1.1 Adding a system controller ........................................................................ 6
2.1.2 DP-Import in System Design ..................................................................... 6
2.1.3 Creating the technical hierarchy ............................................................... 6
2.1.4 Creating the M-bus subsystem structure .................................................. 7
2.1.5 Synchronizing the project to PX Design.................................................... 8
2.1.6 Navigating to the CFC project in PX Design ............................................. 9
2.1.7 Adding and setting the COMBLK and MSGBLK blocks to CFC. ............ 10
2.1.8 Adding the main pin (main value) ........................................................... 11
2.1.9 Adding text blocks ................................................................................... 11
2.1.10 Node Setup, compiling the CFC project and downloading the program . 11
3 Project engineering details .................................................................. 12
3.1 Desigo Xworks Plus ................................................................................ 12
3.2 CFC-Editor von PX Design ..................................................................... 13
3.2.1 M-bus data point mapping via meter tables ............................................ 13
3.2.2 M-bus data point mapping via instance table.......................................... 14
3.2.3 M-bus data point mapping via DP key words.......................................... 16
3.2.4 M-bus data point mapping via DIF, DIFE, VIF, VIFE for manufacturer-
specific M-bus data points....................................................................... 17
3.2.5 M-bus data point mapping via RAW for manufacturer-specific M-bus
data points ............................................................................................... 18
4 Functional scope of the application .................................................... 21
4.1 Overview ................................................................................................. 21
4.2 Communication ....................................................................................... 21
4.2.1 The M-bus protocol ................................................................................. 21
4.2.2 Polling response of the M-bus master .................................................... 23
4.2.3 BACnet Reliability [Rlb] ........................................................................... 23
4.3 Setting parameters .................................................................................. 26
4.3.1 Monitoring the communications .............................................................. 28
4.3.2 Scan priorities and waiting periods ......................................................... 29
4.3.3 Setting the baud rate using the user-defined meter table. ...................... 31
5 Details of M-bus data point mapping .................................................. 32
5.1 M-bus data point mapping, directly via the I/O address .......................... 32
5.1.1 Meter table .............................................................................................. 32
5.1.2 Instance table .......................................................................................... 40
5.1.3 Data point key words and units ............................................................... 42
6 Commissioning ..................................................................................... 45
7 Technical Data ....................................................................................... 45
2 / 47
3 / 47
0.2 Trademarks
The following trade names and product names are registered trademarks:
BACnet American National Standard (ANSI/ASHRAE 135-2012)
4 / 47
Topologies
The Desigo building automation and control system supports the integration of
third-party devices and systems at all levels (see the topology diagram above).
M-bus meters to be integrated at the automation level are integrated with the PX
Open M-bus solution, which runs on the PXC001... system controller fitted with an
extension module PXA40-RS... .
PX Open M-Bus as The M-bus meters and M-bus systems are integrated into the Desigo system.
M-bus master The values of the M-bus data points and the status of the existing data connection
to the data points are mapped to BACnet objects by the PX Open M-bus solution.
In this way, these M-bus data points can be made available in all the devices in the
Desigo system.
PX Open Monitor The PX Open Monitor software, described in the User's Guide [3], is available for
the monitoring and analysis of data traffic on the M-bus.
Secondary addressing The PX Open M-bus solution does not support secondary addressing of the M-bus
meters.
Configuring the M-bus M-bus meters cannot be configured via the PX Open M-bus.
devices
Slave Search An automatic slave search feature is not supported on the M-bus.
5 / 47
The DP-Import tool feature in XWP is used to import the complete M-bus subsys-
tem structure.
If you are using DP-Import, you can go straight to section 2.1.5.
6 / 47
1. In the Technical hierarchy view in System Design, create the required M-bus
subsystem structure (e.g. with each meter corresponding to a "component").
2. Assign the required data points to the meters and complete the data point
fields (the "I/O Address" field must be completed in accordance with the map-
ping instructions).
3. Create the new component Mtr1 (Meter 1).
7 / 47
1. Synchronize to CFC.
---> Clicking “Generate CFC data and exit” will guide you directly to CFC.
2. Navigate to CFC.
8 / 47
Navigate XWP to the CFC project in PX Design. When you open the project, you
will see the meter components created in XWP.
9 / 47
Block COMBLK (FB495) allows you to set up communication ports for third-party
devices, and license numbers. The block is used in conjunction with PX Open for
internal communication settings and license settings.
Block MSGBLK (FB496) handles error statistics associated with communications
with third-party devices and other internal information. This block is used in con-
junction with PX Open to display and configure error statistics.
Important! • It is essential that both blocks are added to the CFC project.
• Each one must be added once only for each PXC001... controller.
10 / 47
A "main pin" must be set for all elements mapped to BACnet (partial plant, aggre-
gates, components and rooms).
Important! In the case of solutions created in Point Configurator, the main pin is already set.
If text blocks are to be used for meter integration in the project, these must be add-
ed directly here, in the CFC project. Text blocks are not supported in Point Config-
urator.
The remaining steps in the procedure, such as "Node Setup", "compiling the CFC
project" and "downloading the program" are the same as for a standard PX control-
ler.
In the case of the PX Open M-bus solution, the complete program should be down-
loaded.
11 / 47
The information about how a data point from an M-bus meter is addressed (the
mapping information) is contained in the I/O address.
The mapping information can be
• entered directly in CFC in the I/O address field, or
• imported automatically from an external table using the DP Import function of
Point Configurator.
The meters can be mapped within the technical hierarchy, e.g. as components. The
individual values from the meters are mapped in CFC to the standard data point
types CI or AI.
When an M-bus data point is integrated via a CI data point type, the data type
UINT32 must be entered in the I/O address. The signal type is selected accordingly
with UINT32, but is not relevant for the application in CFC.
When an M-bus data point is integrated via data point type AI, the data type FLOAT
must be entered in the I/O address. The signal type is selected accordingly with
FLOAT, but is not relevant for the application in the CFC.
12 / 47
The information about how a data point from an M-bus meter is addressed (the
mapping information) is contained in the I/O address of the D-MAP block.
Mapping information can be entered directly in the CFC Editor of XWP.
Mapping information is available as an index in table form, meter table 0, which
corresponds to the M-bus data point to be mapped to the D-MAP block. You will
find meter table 0 in section 5.1.1.
M=x(y.z[DATATYPE])
y M-bus 0 … 999 Table 0 is used as the default table and corresponds to the meter table.
"meter table" Tables 1 to 999 refer to the device-specific text blocks.
z Data point 0 … 65535 The index numbers for meter table 0 are predefined and cannot be
index number changed. Index numbers for data points from the device-specific text
blocks can be used freely.
DATATYPE Data type BOOL, UINT16, SINT16, Data formats mapped from the M-bus data points to the associated
UINT32, SINT32, FLOAT BACnet object.
Recommendation
• If an M-bus data point is integrated via an AI block, FLOAT should be selected as the data type.
• When an M-bus data point is integrated via a CI block, UINT32 should be selected as the data
type.
13 / 47
If manufacturer documentation for the meter is not available, the desired data type
can be read from the meter with the help of the MBSheet tool from Relay (see:
http://www.relay.de/en/produkte/software/mbsheet.html).
Tariff number, Storage number and Module number are read directly – together
with the data type and unit. You can reference the index number from the instance
table in section 5.1.2 from data type and unit and use it together with Tariff number,
Storage number and Module number in the following mapping information.
M=x(0.b.c.d.e[DATATYPE])
Recommendation
• If an M-bus data point is integrated via an AI block, FLOAT should be selected as the data type.
• When an M-bus data point is integrated via a CI block, UINT32 should be selected as the data
type.
14 / 47
M=90(0.3.0.0.1[UINT32])
M-Bus Slave Address 90
Meter Table 0
Module number 3
Storage number 0
Tariff number 0
DP Index Energy KWh 1
Type: instant. (1)
Access to the type with the addressing from the instance table:
(1 = Inst, 2 = Max, 3 = Min, 65535 = Err)
Example 2 The following example shows the addressing of the 15 monthly energy values for
an ULTRAHEAT XS 2WR6 energy meter.
With MBSheet, the following addressing elements can be identified (framed in red):
The addressing of the 15 previous month energy values can be done as follows:
15 / 47
Text blocks can be used to map M-bus data points via "keywords". The standard
blocks such as CI or AI always refer to the I/O addresses of these text blocks.
I/O address input in the text block: M=x.y(1)
y Text block number 1…X Number of a text block within the meter table
The following is an example of a meter table No. 1, generated with two text blocks.
Input rules The following input rules apply to the individual text fields and the designation of
the "DP keywords":
Entries in the Value field of the text block:
"DP Index", "DP keyword" and "Unit".
The meter table (see illustration above) only needs to be created once for each
meter type. Several meters in the subsystem can point to the same text block.
16 / 47
You will need this solution for vendor-specific M-bus data points which cannot be
read from the meter by the generic M-bus User Group approach.
The TXTBLK block can be used to set up text strings corresponding to the vendor-
specific data points. The text block must adopt the information required for this
purpose, such as DIF, DIFE, VIF and VIFE from the manufacturer's tables.
The text block only needs to be created once for each meter type. Several meters
in the subsystem can point to the same text block.
Input rules The following input rules apply to the individual text fields.
Entries in the Value field of the text block:
"DP-Index" "Data point name" "Unit" "DIF:xx" "DIFE:xx" "VIF:xx" "VIFE:xx"
If you use several DIFEs and VIFEs, the values should be separated with commas:
"DIFE:80,40"
If there is no DIFE or VIFE, there will be an empty space between the inverted
commas (see example), i.e. "DIFE:" or "VIFE:" is not allowed in the meter table:
Example
Note: VIF/DIF coding must match the VIF/DIF coding of the M-bus device re-
sponse telegram.
17 / 47
This solution is required for manufacturer-specific M-bus data points that cannot be
read from the meter using a generic approach by the M-bus user group, and for
which the manufacturer does not describe using data identification per M-bus
standard.
Read data using:
– Byte data in the supplier specific part of the telegram.
– Data length.
– Data format with the M-bus data types.
Text blocks can be used to map M-bus data points via "manufacturer-specific M-
bus data points".
Input rules The following input rules apply to the individual text fields:
Entries in the Value field of the text block:
"DP-Index" "Data point name" "Unit" "RAW:t,b,a,f.y"
18 / 47
Meaning First RSP_UD2 telegram; from 0x0F or 0x1F up to the 1st Byte of the data to be
mapped are 11 Bytes, 4 Bytes to be mapped, coded as 8 digit BCD.
Coded in TXTBLK
Result in CFC
19 / 47
Meaning First RSP_UD2 telegram, from 0x0F or 0x1F up to the 1st Byte of the data to be
mapped there are 3 Bytes, 1 Byte to be mapped, coded as 1 Byte for Bit access,
map 1st Bit.
Encoded in TXTBLK
Result in CFC
20 / 47
Function • The PX Open M-bus solution enables data points from M-bus devices to be in-
tegrated into the Desigo system.
• The values of the M-bus data points and the status of the existing data connec-
tion with the data point are mapped to BACnet objects by the PX Open M-bus
solution.
• The PX Open M-bus solution is implemented as an M-bus master.
Hardware platform The hardware platform is the system controller or the PXC001… with (optional)
extension modules PXA40-RS.. .
4.2 Communication
4.2.1 The M-bus protocol
The following section provides only a brief overview of the M-bus protocol.
For a detailed specification, refer to the document [1].
Master/slave protocol The M-bus protocol is a master/slave protocol. By definition, this means that an M-
bus network contains one master and at least one slave.
Transactions The M-bus master starts the transactions over the network with a slave query.
over the M-bus The slave concerned sends a response.
Creating the SND_UD The SND_UD "Data Frame" is created in the associated text block. It is possible to
enter more than one SND_UD "Data Frame" entries in one text block.
21 / 47
Important: The meter is only queried (see the yellow highlighted section above)
if referenced is made to this slave in CFC using an M-bus mapping variant.
22 / 47
At regular intervals, the M-bus master reads the data points and required commu-
nications service from the slaves. If a slave fails to respond, the master waits after
each query for the (relatively long) response-timeout time to elapse. This causes a
major delay in the exchange of data with those slaves that still have to respond.
To overcome this, the PX Open M-bus solution works in "master mode" as follows:
• Telegram is repeated
• If the slave still fails to respond, any pending queries for this slave are skipped
until all the pending queries for the other slaves have been processed once.
The status of the M-bus data points is mapped to the [Rlb] (Reliability) parameter.
In the standard I/O blocks, one [Rlb] parameter is available for each M-bus data
point. By contrast, the Discipline I/O blocks COMBLK and MSGBLK have a single,
shared, [Rlb]. This applies jointly to all M-bus data points of the Discipline I/O.
Reliability value Meaning
0 / NO_FAULT_DETECTED The connection between data point and slave is OK.
2 / OVER_RANGE Value of the M-bus data point is higher than the defined value range.
3 / UNDER_RANGE Value of the M-bus data point is lower than the defined value range.
8 / PROCESS_ERROR Processing error of ComBlock, MessageBlock or TextBlock inputs.
10 / CONFIGURATION_ERROR Invalid data type configured for data point.
68 / INVALID_ADDR Error while programming the IO address or the meter table.
70 / INVALID_PARAM Internal error at the creation of a data point.
80 / UNRELIABLE_OBJECT Connection problem between M-bus slave and a data point.
84 / MEMORY_LIMIT_REACHED Number of licensed data points has been exceeded.
In the event of an error, more information can be obtained by use of the PX Open
Monitor (see also User's Guide, PX Open Monitor [3]).
Suppression of alarm If one or more slaves fail to respond, the M-bus master sets the Reliability parame-
messages in the event ter of all the affected I/O blocks to UNRELIABLE_OBJECT.
of a bus failure In the case of a common source, a very large number of alarms can be triggered (a
"burst"), which can overload the entire system.
To prevent this, in cases where there is "No response from slave", it is possible to
selectively suppress this change to the Reliability parameter. The "free syntax" in
the IO address string is used for this purpose:
M=X(Y.Y.Y.Y.Y[Z])/R15
Recommendation We recommend that at least one data point per slave should not be suppressed.
23 / 47
2. The max. number of ScanCycles can be set via the diagnostic point D=99 as
follows:
– Settings in the analog out (AO) point have to be adjusted as follows:
o IOAddr: D=99
o EnPgm=Yes
o Slope=1
o Icpt=0
– The values for the pin ValPgm have the following meaning:
o ValPgm=0 2 ScanCycles (Default)
o ValPgm=1 1 ScanCycle
o ValPgm=n n ScanCycles (n < 1000)
Time limitation between The time limit between two repeating SND_NKE- or REQ_UD2 telegrams must be
repeating SND_NKE or adjustable as certain meters (Sontex) have a sleep mode while operating on bat-
REQ_UD2 telegrams teries to save them and must be awaken with a slave query, i.e. that the first tele-
gram is not answered and a new query must occur within 2 seconds as the meter
otherwise returns to sleep mode.
Via the diagnostic point D=98 the time limitation between two telegram repetitions
(SND_NKE or REQ_UD2) can be set as follows:
– Set the analog out data point (AO) as follows:
o IOAddr: D=98
o EnPgm=Yes
o Slope=1
o Icpt=0
– The values for the pin ValPgm have the following meaning:
o ValPgm=0 2.5 FrmTio im COMBLK (Default)
o ValPgm=100 100ms
o ValPgm=1000 1 s
Limitation The M-bus master starts transactions on the network with a slave scan SND_NKE.
of REQ_UD2 The queried slave responds with 0xE5.
telegrams The master demands with REQ_UD2 meter data from the slave. It does not ask for
certain points in this scan, but rather scans data in general.
24 / 47
Input rules The following input rules apply to the individual text fields:
Entries in the Value field of the text block:
"NUMBER REQ_UD2" "Maximum number of telegrams"
Example in CFC In the following example one single REQ_UD2 telegram is queried from the slave
with the address 43 (0x2B), though in the RES_UD2 telegram 0x1F is set and this
means that there would be more data available:
25 / 47
a)
Note! Licensing as per the Release notes.
26 / 47
b)
Note! Licensing as per Release notes.
Encoding SwStatus The Pin SwStatus of the MSGBLK shows more detailed and more reliable infor-
mation about the subsystem status:
SwStatus Description
0 (EStartCreate) Getting MAC address or Neuron ID.
1 (EStartSuspend) DETDriver terminated, delayed start message will be sent (delay of 1000ms).
2 (EStartDET) Waiting for a valid ID
3 (EStartLicence) License check
4 (EStartRunApplication) New DBase sort
5 (EApliReset) Reset application
6 (EApliDBaseOK) DBase OK, start application init
7 (EApliDBaseContinue) The dbase sort is not finished,
8 (EApliInitOK) Application init OK, start the Driver3rd
9 (EApliInitContinue) The initialization for user data is not finished
10 (EApliDriverOK) Driver init OK
11 (EApliDriverContinue) Driver third init is in process
12 (EApliUserState) Start user application
13 (EApliActivePolling) Polling
14 (EApliActiveServer) Processing server services
The whole startup and initialization sequence can last up to 1 minute. Once the
startup has completed and during normal operation, the PX Open M-bus should be
in state 13. This indicates that the PX Open M-bus is polling the M-bus devices.
27 / 47
In the Protocol Analyzer pane, the reader can see the raw data of the communi-
cation between PX Open M-bus and third-party automation system.
28 / 47
Where "SCAN PRIO" is the syntax for the polling priority, and "2" is the polling pri-
ority number.
If no entry is made into the meter table, then no polling priority is assumed. This
means that the M-bus device will be polled on a continual basis based on the time
needed to complete the scan cycle (which depends on the number of M-bus devic-
es on the bus).
The timer settings for the polling priorities can be set via the COMBlk Block pins
ComInfo2 - ComInfo4. The values entered in these pins are in minutes.
The other important thing to note here is that the values entered here must be in a
priority. For example, Prio2 is higher than Prio3, which is in turn higher than Prio4.
This means that value for Prio2 must be less than that for Prio3, which in turn must
be less than that for Prio4.
Prio1 is reserved for all M-bus devices integrated into the PX Open M-bus and
overrides all the other Prio settings (i.e.ComInfo 1 overrides all settings for
ComInfo2-4).
29 / 47
Configuration example
for the 1st TXTBLK
block with SCAN PRIO
2:
Configuration example
for the 2nd TXTBLK
block with SCAN PRIO
3:
30 / 47
Whenever older M-bus devices that are only running with 300 baud have to be
integrated, then the baud rate can be set using the user-defined meter table.
Important
• With meters referencing the above mentioned user-defined meter table the
master communicates at a baud rate of 300 Bit/s.
• With the remaining meters the master communicates at the baud rate set in
the pin BAUD of the COMBLK block.
31 / 47
The information about how a data point from an M-bus meter is addressed (the
mapping information) is contained in the I/O address of the D-MAP block.
Mapping information is available as an index in table form for meter table 0 which
corresponds to the M-bus data point to be mapped to the D-MAP block.
Note • All data points from 0 to 386 can be used in AI or CI D-MAP blocks.
• Data point 254, Application Reset, must be used in a BO, AO or MO block (Write
Only).
• Data point 255, Device Status, can be used in an AI, CI, BI or MI block.
32 / 47
33 / 47
34 / 47
35 / 47
36 / 47
37 / 47
38 / 47
39 / 47
The parameter Tariff, Storage Number and Unit can only be mapped with the meter
table 0.
40 / 47
41 / 47
M-bus data point map- Text blocks can be used to map M-bus data points via "keywords".
ping via TXTBLK The standard blocks such as CI or AI always refer to the I/O addresses of these
blocks and DP key- text blocks.
words
The text block only needs to be created once for each meter type.
Several meters in the subsystem can point to the same text block.
42 / 47
43 / 47
44 / 47
7 Technical Data
For technical data refer to:
• Data sheet PX Open PXC001… System controller and option modules [4]
• Data sheet PX Open M-bus [2]
45 / 47
A L
Alarm suppression ......................... 23 Lizenzierungs-Mechanismus ......... 26
B M
BACnet Reliability [lRlb] ................. 23 Main pin .......................................... 11
Blocks Mapping information ...................... 13
COMBLK .............................. 10, 26 Master/slave protocol .................... 21
MSGBLK .............................. 10, 26 M-Bus data point mapping ............ 13
TXTBLK .......................... 16, 17, 42 M-bus master .................................. 5
M-bus master polling response ..... 23
C M-bus protocol............................... 21
CFC editor ..................................... 13 M-bus subsystem structure ............. 7
CFC project Meter table 0 ........................... 13, 32
Add blocks .................................. 10
Add text blocks ........................... 11 N
Communication monitoring ............ 28 Node setup ..................................... 11
Communication services ............... 21
Compile CFC project ..................... 11 P
Polling response ............................ 23
D Protocol analyzer........................... 28
Data point keywords ...................... 42 PX Design ..................................... 13
Data point mapping ........... 16, 32, 42 PX M-bus ......................................... 5
Desigo Xworks Plus ....................... 12 PX Open monitor ........................... 28
D-MAP block .................................. 13 PXA40-RS.. ..................................... 5
Download program ........................ 11 PXC001.. ......................................... 5
DP import ....................................... 12
DP import tool .................................. 6 R
DP keywords.................................. 16 Reliability Rlb ................................. 23
DP keywords.................................. 16 Requirements .................................. 5
E S
Engineering details ........................ 12 Setting parameters ........................ 26
Error statistics ................................ 10 Slave response.............................. 21
Extension modules PXA40-RS.. .... 21 SND_UD ........................................ 21
System controller PXC001.. ...... 6, 21
F System limits ................................... 5
Functions ....................................... 21
T
H Technical hierarchy.......................... 6
Hardware platform ......................... 21 Text blocks ..................................... 16
Text strings .................................... 17
I
Input rules .............. 16, 17, 18, 22, 25 X
Integrations workflow ....................... 6 XWP
Technical hierarchy ...................... 6
K
Keywords ....................................... 16
46/47
47 / 47