WM HPC Modbus Protocol - Rev 1
WM HPC Modbus Protocol - Rev 1
Project name
Page
WMHpc
Revision
1/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
CONTENTS
1 MODBUS protocol and parameters ................................................................................... 2 1.1 Implementation........................................................................................................... 2 1.2 Commands.................................................................................................................. 3 1.3 Parameters .................................................................................................................. 5 2 MODBUS virtual memory map ......................................................................................... 6 2.1 Bit addressing area (#01: "coil" parameters).............................................................. 6 2.2 Bit addressing area (#02: "input" parameters) ........................................................... 8 2.3 Register addressing area (#03, #06, #16: "holding register" parameters) .................. 9 2.4 Register addressing area (#04: "input register" parameters) .................................... 20
9cument name
Project name
Page
WMHpc
Revision
2/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
9cument name
Project name
Page
WMHpc
Revision
3/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
1.2 Commands Only a subset of the general Modbus commands and exception codes are supported: Commands dedicated for bit addressing area ("input/coil"-parameters) #01 = "Read coils". #02 = "Read discrete inputs" 1. Commands dedicated for register addressing area ("holding register"-parameters) #03 = "Read holding registers". #04 = "Read input registers" 2. #06 = "Write single register". #16 = "Write multiple registers". The following exception codes can be generated 01 = "Illegal function". 02 = "Illegal data address". 03 = "Illegal data value". 06 = "Slave device busy" (configurable usage). Description of command table (see next page) Q = Question. A = Answer. Exc = Exception code. id = WMHpc communication address (slave). addr = Start address (big endian). regs = Number of registers (big endian). bits = Number of bits (big endian). bytes = Byte count. value = Data value (big endian). mask = Data bitmask. crc = Cyclic redundancy checksum (little endian). <:1> = Item size is 1 byte. <:2> = Item size is 2 byte. <:N> = Item size in number of bytes, according to the content of bytes.
1 2
Identical functionality as command #01 but with a different memory mapping. Identical functionality as command #03 but with a different memory mapping.
9cument name
Project name
Page
WMHpc
Revision
4/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
#01: "Read coils" N = size according to bytes = (bits + 7) div 8 Q: A: Exc: <id:1>,<0x01>,<addr:2>,<bits:2>,<crc:2> <id:1>,<0x01>,<bytes:1>,<mask:N>,<crc:2> <id:1>,<0x81>,<exc:1>,<crc:2>
#02: "Read discrete inputs" N = size according to bytes = (bits + 7) div 8 Q: A: Exc: <id:1>,<0x02>,<addr:2>,<bits:2>,<crc:2> <id:1>,<0x02>,<bytes:1>,<mask:N>,<crc:2> <id:1>,<0x82>,<exc:1>,<crc:2>
#03: "Read holding registers" N = size according to bytes = regs * 2 Q: A: Exc: <id:1>,<0x03>,<addr:2>,<regs:2>,<crc:2> <id:1>,<0x03>,<bytes:1>,<value:N>,<crc:2> <id:1>,<0x83>,<exc:1>,<crc:2>
#04: "Read input registers" N = size according to bytes = regs * 2 Q: A: Exc: <id:1>,<0x04>,<addr:2>,<regs:2>,<crc:2> <id:1>,<0x04>,<bytes:1>,<value:N>,<crc:2> <id:1>,<0x84>,<exc:1>,<crc:2>
Q: A: Exc:
#16: "Write multiple registers" N = size according to bytes Q: A: Exc: <id:1>,<0x10>,<addr:2>,<regs:2>,<bytes:1>,<value:N>,<crc:2> <id:1>,<0x10>,<addr:2>,<regs:2>,<crc:2> <id:1>,<0x90>,<exc:1>,<crc:2>
9cument name
Project name
Page
WMHpc
Revision
5/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
1.3 Parameters A WMHpc parameter element can have one of the following standard data types: bool : 1 bit data, boolean uchar : 1 byte data, unsigned character schar : 1 byte data, signed character uint : 2 byte data, unsigned integer sint : 2 byte data, signed integer ulong : 4 byte data, unsigned long integer slong : 4 byte data, signed long integer fixN : 4 byte data, signed long integer * 10N (range = 0 .. 1). (range = 0 .. 255). (range = -128 .. 127). (range = 0 .. 65535). (range = -32768 .. 32767). (range = 0 .. 4294967295). (range = -2147483648 .. 2147483647). (real, with a fixed number of decimals = N).
These parameter elements can then be arranged into 0, 1, 2 or 3 dimensions, hence called "single", "array", "matrix" or "cube". 0-dimensional parameters (single) consist of only one single data element. 1-dimensional parameters (array) consist of an array of data elements. 2-dimensional parameters (matrix) consist of an array of arrays of data elements.
9cument name
Project name
Page
WMHpc
Revision
6/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
ALARMSTATUS Status of active alarms (as bits instead of registers) 0 = Not active 1 = Active Alarm 01: High return temp Alarm 02: Temp diff brine Alarm 03: Compressor current Alarm 04: Brine pump current Alarm 05: High pressure Alarm 06: Low pressure Alarm 07: Low brine flow Alarm 08: Brine pressure Alarm 09: Compressor heat Alarm 10: Hot gas temperature Alarm 11: Control pressostat Alarm 12: Sensor supply temp Alarm 13: Sensor return temp Alarm 14: Broken outdoor temp Alarm 15: Sensor hot water Alarm 16: Sensor hot gas temp Alarm 17: Sensor brine in Alarm 18: Sensor brine out Alarm 19: Sensor prim. supply Alarm 20: HPC RM Communication Alarm 21: 24 VAC Power fail Alarm 22: WCS sensor Error Alarm 23: WCS Controller error Alarm 24: Sensor Error TWC Alarm 25: TWC out temp Alarm 26: TWC Return Temp Alarm 27: Ctrl err cooling c Alarm 28: Sensor cooling tank Alarm 29: Sensor surplus cool Alarm 30: Sensor cooling t out Alarm 31: Sensor cooling circ. Alarm 32: Reserved
array R
+0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31
All All All All All All Option Option All Not used All All All Master Master Option All All Master All All Option Option Option Option Option Option Option Option Option Option Not used
9cument name
Project name
Page
WMHpc
Revision
7/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
2008-10-03 Abelko Innovation Alarm 33: Reserved Alarm 34: Shunt 1 sensor Alarm 35: Shunt 1 ctrl err Alarm 36: Shunt 2 sensor Alarm 37: Shunt 2 ctrl err Alarm 38: Shunt 3 sensor Alarm 39: Shunt 3 ctrl err Alarm 40: Shunt 4 sensor Alarm 41: Shunt 4 ctrl err Alarm 42: Shunt 5 sensor Alarm 43: Shunt 5 ctrl err Alarm 44: Shunt 6 sensor Alarm 45: Shunt 6 ctrl err Alarm 46: Shunt 7 sensor Alarm 47: Shunt 7 ctrl err Alarm 48: Shunt 8 sensor Alarm 49: Shunt 8 ctrl err Alarm 50: Communication Master Alarm 51: High brine in temp Alarm 52: Low brine in temp Alarm 53: Low brine out temp Alarm 54: Slave pump missing Alarm 55: Reserved Alarm 56: Reserved Alarm 57: Reserved Alarm 58: Reserved Alarm 59: Reserved Alarm 60: Reserved Alarm 61: Reserved Alarm 62: Reserved Alarm 63: Reserved Alarm 64: Reserved Alarm 65: Reserved Alarm 66: Reserved Alarm 67: Reserved Alarm 68: Reserved Alarm 69: Reserved Alarm 70: Reserved Not used Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Slave Option Option Option Master Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used
Martin Forsberg +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69
9cument name
Project name
Page
WMHpc
Revision
8/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
2.2 Bit addressing area (#02: "input" parameters) Accessible via Modbus command #02. Identical to command #01, except that the memory map starts at 10000 instead of 0. (See chapter 2.1). Note: Bit addr should be decremented by 10001 when converting to protocol level address. (Protocol level addresses are identical between command #01 and #02).
9cument name
Project name
Page
WMHpc
Revision
9/20
Revision date
1.3
Note
2008-12-09
Created
Mikael Engstrm
Approved by
Martin Forsberg
2.3 Register addressing area (#03, #06, #16: "holding register" parameters) Accessible via Modbus commands #03, #06, #16. Note: Word addr, Size and Offs are given in word resolution for these tables. Word addr should be decremented by 40001 when converting to protocol level address.
Word (Size) addr +Offs 40001 (1) Word addressed parameters RW Type [Value] Unit uint 1
MODBUSREVISION Modbus protocol revision (for future usage) VERNR WMHpc version numbers Bootloader Firmware Webpages Appscript ALARMSTATUS Status of active alarms (as registers instead of bits) 0 = Not active 1 = Active
single RW
array R
fix2
array R
uint
[0..1]
+0