How to connect, commissioin and program MBus devices at FX-series substation
Prerequisites:
1. FX-series substation. Any of FX2020. FX2025x, FX2030x, FX3000-C, FX-Spider.
2. multiLINK protocol converter equipped with 1 or 2 MBus ports.
mutliLINK power supply must be +24VDC in order to MBus port works properly.
3. MBus device (meter, sensor, etc.)
FX-substation configuration
First communication ports parameters shall be set:
Then we can create an MBus device object (Module):
Press "Add" button at the left pane to create, "Change" to set new parameters to existing module.
When "Message count" is bigger than zero, it means that communication is established.
mutlLINK configuration
Connect to the multiLINK and configure it's Serial port #2 settings as following:
Once configured, multiLINK shall send data to corresponding Serial #2 and there shall be blinking TX LED following with blinkin RX LED. If you've got similar result, communication to MBus device has been established succesfully.
IEC programming (OpenPCS)
MBus records are translating into values by IEC program running on FX substation.
Description in FX-substation manual:
Example of a previously described MBus connection:
realVolume := GetMBUSValueF( Module:=2, Index:= 1, Divider:=0.001, Port:=0 ) ;
realTemp := GetMBUSValueF( Module:=2, Index:= 5, Divider:=1.0, Port:=0 ) ;
(* Kamstrup warm water measurement in cubic meters, index is 1, divider is 0.001
Water temperature in Celsius degrees, index is 5, divider is 1 *)
If "index" unknown, you can detect those by analyzing MBusDebug.txt file, created at the FX-substation.
Select "Debug" checkbox and press "Change" to create a MBusDebug.txt file.
Proceed to "Settings" -> " System status"
Select MBusDebug.txt from "Debug files" lista and press "Show file" button.
In the new window/tab you will see the content of the file with all MBus messages received from corresponding MBus device "module".
Following example is received from Kamstrup warm water meter.
Data records are the actual measurements/parameters and their number order (from zero) corresponds to the "index" parameter of IEC function GetMBusValueF(). Multiplier is shown among data record properties.
As we can see, index = 0 or index = 1 shall contains consumption volume and index = 5 contains water temperature in Celsius degrees.
-----------------------------------------------------------
89241 ReadMBUSModule Start
IP 10.100.1.98 Port 10002 m_PrimaryAddress 2 m_CommunicationAddress 0
94303 Sending primary address: 68 0b 0b 68 53 fd 52 70 28 66 77 ff ff ff ff 13 16
94563 CMBUS::ReadAckMsg: Data e5
99735 Sending ask data: 10 7b fd 78 16
ReadLongFrameMsg() Valid msg
00619 ReadLongFrameMsg() Status 1 m_BytesInBuf=144 uBytesInMsg=144
00621 CMBUS::GetData(): ReadLongFrameMsg() returned 1
68 8a 8a 68 08 46 72 70 28 66
77 2d 2c 1f 06 ef 10 00 00 04
13 00 00 00 00 04 93 3c 00 00
00 00 04 22 2f 81 00 00 02 3b
00 00 01 5b 81 01 67 16 22 3b
00 00 12 3b 00 00 21 5b 7f 01
db ff 0f 81 21 67 14 11 67 16
01 e7 ff 0f 14 04 6d 11 27 b9
23 44 13 00 00 00 00 62 3b 00
00 52 3b 00 00 61 5b 7f 41 db
ff 0f 81 61 67 11 51 67 17 41
e7 ff 0f 13 42 6c bc 22 02 ff
20 01 00 06 ff 11 96 8a 64 54
17 00 02 ff 1a 02 22 02 fd 0e
01 04 2f 16
02057 CMBUS::ParseMessage()
DataLen 138 Field_C 08H
Field_A 70 Field_CI 72H
Man KAM Field_Version 31
Field_Medium 6 Hot Water Field_Access 239
Field_Status 16 IDnumber 77662870
Datarecord: DataRecordPtr=19
DIF 04H VIF 13H Coding 2 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume [m3]' DataType: '4 = 32 bit integer'
Datarecord: DataRecordPtr=25
DIF 04H VIF 13H Coding 2 Exponent 3 Multiplier 0.001 VIFE 3cH
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume [m3]' DataType: '4 = 32 bit integer'
Datarecord: DataRecordPtr=32
DIF 04H VIF 22H Coding 4 Exponent 0 Multiplier 3600
Value: 0 / 812f (hex) , 0 / 33071 (dec), 119055600.000000 (dbl) Unit: 'Time [sec]' DataType: '4 = 32 bit integer'
Datarecord: DataRecordPtr=38
DIF 02H VIF 3bH Coding 7 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume flow [m3/h]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=42
DIF 01H VIF 5bH Coding 11 Exponent 3 Multiplier 1
Value: ffffffff / ffffff81 (hex) , -1 / -127 (dec), -127.000000 (dbl) Unit: 'Flow temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=45
DIF 01H VIF 67H Coding 12 Exponent 3 Multiplier 1
Value: 0 / 16 (hex) , 0 / 22 (dec), 22.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=48
DIF 22H VIF 3bH Coding 7 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume flow [m3/h]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=52
DIF 12H VIF 3bH Coding 7 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume flow [m3/h]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=56
DIF 21H VIF 5bH Coding 11 Exponent 3 Multiplier 1
Value: 0 / 7f (hex) , 0 / 127 (dec), 127.000000 (dbl) Unit: 'Flow temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=59
DIF 01H VIF 5bH Coding 11 Exponent 3 Multiplier 1 VIFE 7fH VIFE 0fH
Value: ffffffff / ffffff81 (hex) , -1 / -127 (dec), -127.000000 (dbl) Unit: 'Flow temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=64
DIF 21H VIF 67H Coding 12 Exponent 3 Multiplier 1
Value: 0 / 14 (hex) , 0 / 20 (dec), 20.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=67
DIF 11H VIF 67H Coding 12 Exponent 3 Multiplier 1
Value: 0 / 16 (hex) , 0 / 22 (dec), 22.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=70
DIF 01H VIF 67H Coding 12 Exponent 3 Multiplier 1 VIFE 7fH VIFE 0fH
Value: 0 / 14 (hex) , 0 / 20 (dec), 20.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=75
DIF 04H VIF 6dH Coding 13 Exponent 1 Multiplier 1
Value: 0 / 23b92711 (hex) , 0 / 599336721 (dec), 599336721.000000 (dbl) Unit: 'Time Point [??]' DataType: '4 = 32 bit integer'
Datarecord: DataRecordPtr=81
DIF 44H VIF 13H Coding 2 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume [m3]' DataType: '4 = 32 bit integer'
Datarecord: DataRecordPtr=87
DIF 62H VIF 3bH Coding 7 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume flow [m3/h]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=91
DIF 52H VIF 3bH Coding 7 Exponent 3 Multiplier 0.001
Value: 0 / 0 (hex) , 0 / 0 (dec), 0.000000 (dbl) Unit: 'Volume flow [m3/h]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=95
DIF 61H VIF 5bH Coding 11 Exponent 3 Multiplier 1
Value: 0 / 7f (hex) , 0 / 127 (dec), 127.000000 (dbl) Unit: 'Flow temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=98
DIF 41H VIF 5bH Coding 11 Exponent 3 Multiplier 1 VIFE 7fH VIFE 0fH
Value: ffffffff / ffffff81 (hex) , -1 / -127 (dec), -127.000000 (dbl) Unit: 'Flow temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=103
DIF 61H VIF 67H Coding 12 Exponent 3 Multiplier 1
Value: 0 / 11 (hex) , 0 / 17 (dec), 17.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=106
DIF 51H VIF 67H Coding 12 Exponent 3 Multiplier 1
Value: 0 / 17 (hex) , 0 / 23 (dec), 23.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=109
DIF 41H VIF 67H Coding 12 Exponent 3 Multiplier 1 VIFE 7fH VIFE 0fH
Value: 0 / 13 (hex) , 0 / 19 (dec), 19.000000 (dbl) Unit: 'Ext temp [C]' DataType: '1 = 8 bit integer'
Datarecord: DataRecordPtr=114
DIF 42H VIF 6cH Coding 13 Exponent 1 Multiplier 1
Value: 0 / 22bc (hex) , 0 / 8892 (dec), 8892.000000 (dbl) Unit: 'Time Point [??]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=118
Unsupported VIF 7fH
DIF 02H VIF 7fH Coding 13 Exponent 0 Multiplier 1 VIFE 20H
Value: 0 / 1 (hex) , 0 / 1 (dec), 1.000000 (dbl) Unit: '[???]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=123
Unsupported VIF 7fH
DIF 06H VIF 7fH Coding 13 Exponent 0 Multiplier 1 VIFE 11H
Value: 17 / 54648a96 (hex) , 23 / 1415875222 (dec), 100200123030.000000 (dbl) Unit: '[???]' DataType: '6 = 48 bit integer'
Datarecord: DataRecordPtr=132
Unsupported VIF 7fH
DIF 02H VIF 7fH Coding 13 Exponent 0 Multiplier 1 VIFE 1aH
Value: 0 / 2202 (hex) , 0 / 8706 (dec), 8706.000000 (dbl) Unit: '[???]' DataType: '2 = 16 bit integer'
Datarecord: DataRecordPtr=137
Unsupported VIF 7dH
DIF 02H VIF 7dH Coding 13 Exponent 0 Multiplier 1 VIFE 0eH
Value: 0 / 401 (hex) , 0 / 1025 (dec), 1025.000000 (dbl) Unit: '[???]' DataType: '2 = 16 bit integer'
27 Datarecords received
After V950_SaveMBUSData()
03694 CMBUS::GetData(): ParseMessage returned 0
03697 ReadMBUSModule End