Download - Smartstruxurelite Documentation

SSL Tech - Kamstrup Multical Energy Meter
SSL Tech - Kamstrup
Multical Energy Meter
Modbus driver
Abstract: How to use the Kamstrup Multical Energy Meter, a non-natively integrated device, with the SSL MPM.
Get Control. Get Efficient. Get ValueTM
2
SSL Tech - Kamstrup Multical Energy Meter
INTRODUCTION
Modbus is an open, widespread and well established serial communication protocol used within building
automation that is compatible with SmartStruxure Lite Multi-Purpose Managers (SSL MPMs). The MPM-UN2
model has an optional RS485 port and handles Modbus RTU. This allows communication on the same bus to
multiple devices up to XX. While some Modbus-enabled devices are integrated into Building Expert, the Kamstrup
Multical 602 Energy Meter is not integrated and requires a LUA script to enable the MPM to read data from it.
Schneider Electric - Small Building Systems Tel. Americas: North Andover, MA 1-800-225-0962 Tel. Europe: Malmö, Sweden +46 40 38 68 50 Tel. Asia Pacific: Hong Kong +852 2565 0621
SSL_TECH_Kamstrup
www.schneider-electric.com/buildings April 2014
© 2013 Schneider Electric. All rights reserved.
This document describes the steps to read data from the Kamstrup Multical 602 Energy Meter using the Modbus
RTU Slave Module. For further information regarding the Modbus RTU Slave module, refer to the Schneider
Electric Multical 602 documentation.
SSL Tech - Kamstrup Multical Energy Meter
3
Installation
Follow manufacturer instructions to install the Kamstrup Multical Energy Meter. When the device is installed and
displays correct information, you can do forward with connecting the device to the MPM.
Hardware connections for communication with a MPM.
The Kamstrup serial communication parameters are factory configured and cannot be adjusted without the optical
cable from Kamstrup. Use the manufacturer instructions for the default communication settings and installation
instructions.
To connect the Kamstrup Energy Meter to a SSL MPM, connect the Modbus RTU Slave Moduke RS485
connection to the A-B connectors on the MPM. Connect the positive lead to connector A and the negative lead to
connector B.
The Modbus RTU module’s power is supplied from the meter’s internal 230 VAC/3.6 VDC or 24 VAC/3.6 VDC
power supply module.
Data model
address
PDU
address
PDU
address
(hex)
Individual
description
Size in
bytes
Table
Contents
Data Type
Update Status
1
0
0x0000
Heat energy E1
4
1
Values in float
IEEE Float - 32 bit
Dynamic
5
4
0x0004
Actual flow
4
1
Values in float
IEEE Float - 32 bit
Dynamic
9
8
0x0008
Volume V1
4
1
Values in float
IEEE Float - 32 bit
Dynamic
13
12
0x000C
Actual power
4
1
Values in float
IEEE Float - 32 bit
Dynamic
17
16
0x0010
Inlet temperature T1
4
1
Values in float
IEEE Float - 32 bit
Dynamic
21
20
0x0014
Outlet temperature T2
4
1
Values in float
IEEE Float - 32 bit
Dynamic
25
24
0x0018
Pulse input A
4
1
Values in float
IEEE Float - 32 bit
Dynamic
29
28
0x001C
Pulse input B
4
1
Values in float
IEEE Float - 32 bit
Dynamic
Schneider Electric - Small Building Systems Tel. Americas: North Andover, MA 1-800-225-0962 Tel. Europe: Malmö, Sweden +46 40 38 68 50 Tel. Asia Pacific: Hong Kong +852 2565 0621
SSL_TECH_Kamstrup
www.schneider-electric.com/buildings April 2014
© 2013 Schneider Electric. All rights reserved.
The following registers are read by the script defined in next section every minute:
SSL Tech - Kamstrup Multical Energy Meter
4
Using the script to communicate with the energy meter
Communication with the Kamstrup energy meter is accomplished by running a script in Building Expert to read
the data. While it is possible to control multiple devices using this script, it is not possible to use multiple integrated
devices at the same time. To communicate with multiple devices using this script, you must define the same
communication parameters in each device’s table of parameters. Each device must have separate objects defined
in the script.
To use your device:
1. Connect to your MPM.
2. Log in to Building Expert and navigate to the Explorer menu.
3. Select or add an unused Lua Program object and import the “SSL_TECH_Kamstrup_Driver.lua” script.
4. Define the parameters and objects in the script header
Before using the Kamstrup device, some parameters below require configuration in the script.
devices = {
{ config = { id = 1 , tag = “Energy Meter #1” },
heatEnergy = “AV1”,
--object 1: Heat Energy E1
actualFlow = “AV2”,
--object 2: Actual Flow
volumeV1 = “AV3”,
--object 3: Volume V1
actualPower = “AV4”,
--object 4: Actual Power
inletTemp = “AV5”, --object 5: Inlet Temperature T1
outletTemp = “AV6”, --object 6: Outlet Temperature T2
pulseInputA = “AV7”, --object 7: Pulse Input A
pulseInputB = “AV8”, --object 8: Pulse Input B
},
{ config = { id = 2 , tag = “Energy Meter #2” },
heatEnergy = “AV11”,
--object 1: Heat Energy E1
actualFlow = “AV12”,
--object 2: Actual Flow
volumeV1 = “AV13”,
--object 3: Volume V1
actualPower = “AV14”,
--object 4: Actual Power
inletTemp = “AV15”, --object 5: Inlet Temperature T1
outletTemp = “AV16”, --object 6: Outlet Temperature T2
pulseInputA = “AV17”, --object 7: Pulse Input A
pulseInputB = “AV18”, --object 8: Pulse Input B
},
Parameters that have “--“ in front of them are commented out and are disabled.
Below this section is the body of the script. DO NOT MODIFY any lines below this section; this is also stated in the
script as a reminder message.
Do not leave unused parameters or devices in the script as they will be read by the MPM and this can cause
improper script function. Comment out or remove the line completely. Ensure you have correct AV numbers for the
desired parameters.
Schneider Electric - Small Building Systems Tel. Americas: North Andover, MA 1-800-225-0962 Tel. Europe: Malmö, Sweden +46 40 38 68 50 Tel. Asia Pacific: Hong Kong +852 2565 0621
SSL_TECH_Kamstrup
www.schneider-electric.com/buildings April 2014
© 2013 Schneider Electric. All rights reserved.
}
SSL Tech - Kamstrup Multical Energy Meter
5
5. In the MPM Explorer, add all AV objects referenced in the script.
6. Save the script and then run the script.
As long as this script is running you can communicate with devices you have added. In addition, as usual
you must click the Save to Database button in the Explorer tab to ensure your changes are stored to Flash
memory.
Schneider Electric - Small Building Systems Tel. Americas: North Andover, MA 1-800-225-0962 Tel. Europe: Malmö, Sweden +46 40 38 68 50 Tel. Asia Pacific: Hong Kong +852 2565 0621
SSL_TECH_Kamstrup
www.schneider-electric.com/buildings April 2014
© 2013 Schneider Electric. All rights reserved.
7. Validate the script is running according to the following:
a. Open the output of the PG object to confirm there are no error messages. PG output prints a message
with a time stamp every time a telegram is received from one of the devices.
b. Validate you are receiving the correct information and verify that it is sent to the correct object.
Note
• At the top of the script, set the value of the “nameEnable” field to true if you want to automatically name the
variables. Variables will then be named according to the format [tag]_[index of variable table],
eg: AC Unit #1_mode. Set the value of the “nameEnable” field to false if you want to name objects manually.
• The variable “baudRate” can be changed in the script. By default it is set to 9600. The MOD1 object must be
disabled, otherwise the internal driver and the script will conflict.