Modbus-Rtu Satec
Modbus-Rtu Satec
SATEC POWERMETERS
Every effort has been made to ensure complete and accurate information concerning the material presented in this book. However, the manufacturer can neither guarantee nor be held legally responsible for any mistakes in printing or faulty instructions contained in this book. The authors always appreciate receiving notice of any errors or misprints. The manufacturer does not accept liability for any damage caused by instrument malfunction. The manufacturer accepts no responsibility that the instrument is suitable for the application for which it was purchased. If further information is desired by the purchaser regarding his particular installation, operation or maintenance of his equipment, the manufacturer or local representative or local distributor should be contacted.
BG0108 Rev.C
Table of Contents
1 GENERAL ............................................................................................................................ 4 2 MODBUS FRAMING.......................................................................................................... 5
2.1 Transmission Mode ..........................................................................................................5 2.2 RTU Frame Format ..........................................................................................................5 2.3 Address Field....................................................................................................................5 2.4 Function Field ...................................................................................................................5 2.5 Data Field..........................................................................................................................6 2.6 Error Check Field..............................................................................................................6 2.7 Data Conversion...............................................................................................................7 2.8 Data Addressing Modes ...................................................................................................8 Modicon Addressing Scheme.............................................................................................8 Powermeter Addressing Modes ..........................................................................................8 2.9 Modbus Messages............................................................................................................9 Function 03 - Read Multiple Registers ................................................................................9 Function 04 - Read Multiple Registers ................................................................................9 Function 20 - Read Multiple Registers ................................................................................9 Function 06 - Write Single Register...................................................................................10 Function 16 - Write Multiple Registers ..............................................................................11 Function 21 - Write Multiple Registers ..............................................................................11 Function 08 - Loopback Communications Test................................................................12 2.10 Exception Responses ..................................................................................................12
1 GENERAL
This document specifies a subset of the Modicon Modbus serial communications protocol implemented in the SATEC powermeters. The document describes the implementation of Modbus and provides the memory map information necessary to access the powermeter data registers. Information in this document covers the models RPM090, PM170/170E, PM270, PM290, and PM290H/HD powermeters. In the model PM295 powermeter, the setup access registers, relays setpoints setup, pulsing relays setup and analog outputs setup registers are nonexistent or mapped to different memory addresses. If necessary, refer to the PM295 Modbus Users Guide for the PM295 memory map. Additional information concerning communications operation, configuring the communications parameters and communications connections is found in your powermeter Users Guide. NOTE
Some of the parameters described in this document might not be relevant to your instrument and thus, may not be accessed via communications. Refer to your powermeter User's Guide to check parameters supported by your instrument.
IMPORTANT
w The voltage parameters throughout the protocol can represent line-to-neutral or line-to-line voltages depending on the wiring mode selected in the powermeter. When a 4L-N wiring mode is selected, they will be line-to-neutral voltages, and when another mode is selected, they will be line-to-line voltages. In 4-wire connections using either 4L-N or 4L-L wiring mode, voltage harmonics and captured waveforms will represent line-to-neutral voltages. In a 3-wire direct connection, voltage harmonics and captured waveforms will represent line-to-neutral voltages that arise on the powermeter's input transformers. In a 3-wire open delta connection, voltage harmonics and captured waveforms will comprise L12 and L23 line-to-line voltages. w In 3-wire connection schemes, the individual phase values for power factor, active power, apparent power and reactive power will be zeros, because they have no meaning. The only total three-phase power values can be used.
1 GENERAL
2 MODBUS FRAMING
2.1 Transmission Mode
The powermeter Modbus protocol implementation uses the RTU transmission mode. In RTU mode, data is sent in 8-bit binary characters. The 8 bit even parity or 8 bit no parity data format must be selected when configuring the powermeter communications.
The maximum query and response message length is 256 bytes including check characters.
2 MODBUS FRAMING
For detailed information about CRC calculation, refer to the Modbus Protocol Reference Guide.
2 MODBUS FRAMING
Suppose, you have read a value of 5000 from register 256 that contains a voltage reading (see Table 5-1 ). If you have the instrument with the 144V input option, and use potential transformers with the ratings of 22,000V : 110V = 200, then the voltage high scale is HI = 144200 = 28,800, and in accordance with the above formula, the voltage reading in engineering units will be as follows: 5000 (28800 - 0)/9999 + 0 = 14401V When a value is written to the powermeter, the conversion is carried out in reverse to produce the written value in the range of 0 - 9999: X = 9999 (Y - LO) / (HI - LO) Transmitting fractional numbers When a value is a fractional number, it can be transmitted by using a LIN3 conversion method with fractional limits, or being multiplied by a scale factor (modulus) of 10 or 100 depending on the number of digits in the fractional part. When using a modulus method, to process a value received from the powermeter in this format, the value must be multiplied by the modulus. To write such a number into the powermeter register, the number should be divided by the modulus. Transmitting long numbers The energy values are kept in the powermeter in unsigned long integer format. They are accessed in two contiguous registers. To transmit such numbers, the powermeter splits the value into two words with the range of 0 to 9999. The number is divided by 10,000 and represented in the next manner: the low word contains a fractional part of the value up to 9999 in unit-hours (for instance, in kWh), and the high word contains
2 MODBUS FRAMING
the integer part of the value in units of 10,000 unit-hours. To process this type of numbers, the value in the high word must be multiplied by 10,000 and added to the value in the low word.
EXAMPLE
Suppose, the kWh import value being read in two contiguous registers 40288 and 40289 is represented as follows: 40256 = 5100 40257 = 2 The actual energy value in kWh units is 2 10,000 + 5,100 = 25,100 kWh
When a conversion from one addressing mode to another is needed, use the following: When register addresses are defined for your instrument in a relative form, you can calculate the register absolute address as table number 256 + register offset. To get the register relative address from the absolute address, calculate the table (file) number as register absolute address/256, and the register offset in the table as register absolute address mod 256.
2 MODBUS FRAMING
2 bytes
2 bytes
Address of the first register to be read The number of contiguous words to be read
Response:
Powermeter Address 1 byte Function (03) 1 byte Byte Count 1 byte Data Word 1 2 bytes ... Data Word N 2 bytes Error Check 2 bytes
...
2 bytes
2 bytes
Address of the first register to be read The number of contiguous words to be read
Response:
Powermeter Address 1 byte Function (04) 1 byte Byte Count 1 byte Data Word 1 2 bytes ... Data Word N 2 bytes Error Check 2 bytes
...
2 MODBUS FRAMING
Request: Powermeter Address 1 byte Function ( 20 ) 1 byte Byte Count 1 byte Subrequest 1 7 bytes ... ... SubError request N Check 7 bytes 2 bytes
Sub-request Format Reference Type (06) 1 byte Table No 2 bytes Starting Address 2 bytes Word Count 2 bytes
Byte Count Reference type Table No Starting Address Word Count Response Powermeter Address 1 byte
Total number of binary bytes in the message, excluding the powermeter address, function code, byte count, and error check fields Fixed field. Must be 06 The powermeters Modbus table number Relative address of the first register to be read in the table (file) The number of contiguous words to be read Byte Count 1 byte Sub... Response ... ... SubError Response Check ... 2 bytes
Sub - response Sub-response byte count 1 byte Reference Type (06) 1 byte Data Word ... 1 2 bytes ... Data Word N 2 bytes
The sub-response byte count contains the number of binary bytes in each separate sub-response. Data Word 1 ... Data Word N - the data from contiguous registers being read.
10
2 MODBUS FRAMING
Address of the first register to be written The number of contiguous words to be written The number of bytes to be written
Response:
Powermeter Address 1 byte Function (16) 1 byte Starting Address 2 bytes Word Count 1 word Error Check 2 bytes
...
Total number of binary bytes in the message, excluding the powermeter address, function code, byte count, and error check fields Fixed field. Must be 06 The powermeters Modbus table number Relative address of the first register to be written in the table (file) The number of contiguous words to be written Data to be written
11
2 bytes
Diagnostic Code Designates action to be taken in Loopback test. The protocol supports only Diagnostic Code 0 - return query data. Data Query data. The data passed in this field will be returned to the master through the powermeter. The entire message returned will be identical to the message transmitted by the master, field-per-field.
Response:
Powermeter Address 1 byte Function (08) 1 byte Diagnostic Code (0) 2 bytes Data Error Check 2 bytes
2 bytes
NOTE
When the character framing, parity, or redundancy check error is detected, processing of the master's request stops. The powermeter will not act on or respond to the message.
12
2 MODBUS FRAMING
Register offset 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 32 33 34 35 36
Register address 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
Modbus address 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293
Direction R R R R R R R R R R R R R R R R R R R R R R R R R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W
kW kvar kVA A (mA) Hz kW kW kW kVA kVA A A kWh kWh kWh kWh kvarh kvarh
Low scale 0 0 0 0 0 0 -Pmax -Pmax -Pmax -Pmax -Pmax -Pmax -Pmax -Pmax -Pmax -1.00 -1.00 -1.00 -1.00 -Pmax -Pmax -Pmax 0 45.0 -Pmax -Pmax -Pmax -Pmax 0 0 0 0 0 0 0 0 0
High scale Vmax Vmax Vmax Imax Imax Imax Pmax Pmax Pmax Pmax Pmax Pmax Pmax Pmax Pmax 1.00 1.00 1.00 1.00 Pmax Pmax Pmax Imax (Iaux max) 65.0 Pmax Pmax Pmax Pmax Imax Imax Imax 9999 999 9999 999 9999 999
Conversion LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 LIN3 NONE x104 NONE x104 NONE x104
13
The parameters' limits are as follows: Vmax (660 V input option) = 660 [V] @ PT Ratio = 1.0 Vmax (660 V input option) = 144 PT Ratio [V] @ PT ratio > 1.0 Vmax (120 V input option) = 144 PT Ratio [V] Imax = 1.2 CT primary current [A] @ current overrange = 20% Imax = 2 CT primary current [A] @ current overrange = 100% Iaux max = 1.2 Auxiliary CT primary current [mA] Pmax = (Imax Vmax 3)/1000 [kW] @ wiring mode 4L-N Pmax = (Imax Vmax 2)/1000 [kW] @ wiring mode 4L-L, 3-OP, or 3DIR Positive readings of kvarh net Negative readings of kvarh net For instruments with the L option
NOTES
1. To reset maximum demands, write zero into one of registers 40281 through 40287. To reset accumulated energies, write zero into one of the energy keeping registers as follows: kW import kW export kvarh net register 40288 or 40289 register 40290 or 40291 registers 40292 through 40295
2. For instruments that provide measuring kWh qualified as net, i.e., energy measurements represent the
difference between energy imported and exported, registers 40288/40289 w ill show positive energy readings, and registers 40290/40291 will show negative energy readings. 3. All electrical parameters are averaged values over the specified number of the real-time measurements (see the averaging buffer size in Table 3-13).
14
15
Operate limit Operate delay Release limit Release delay Low Operate limit voltage Operate delay Release limit Release delay High Operate limit current Operate delay Release limit Release delay High Operate limit unbalanced Operate delay (or auxiliary Release limit ) current Release delay High Operate limit accumulated Operate delay kW demand Release limit Release delay High kvar Operate limit (positive) Operate delay Release limit Release delay High Operate limit kVA Operate delay Release limit Release delay Low power Operate limit factor (lag) Operate delay Release limit Release delay High Operate limit THD Operate delay Release limit Release delay
16
Operate limit Operate delay Release limit Release delay Low Operate limit voltage Operate delay Release limit Release delay High Operate limit current Operate delay Release limit Release delay High Operate limit unbalanced Operate delay (or auxiliary Release limit ) current Release delay High Operate limit accumulated Operate delay kW demand Release limit Release delay High kvar Operate limit (positive) Operate delay Release limit Release delay High Operate limit kVA Operate delay Release limit Release delay Low power Operate limit factor (lag) Operate delay Release limit Release delay High Operate limit THD Operate delay Release limit Release delay
17
Operate limit Operate delay Release limit Release delay Low Operate limit voltage Operate delay Release limit Release delay High Operate limit current Operate delay Release limit Release delay High Operate limit unbalanced Operate delay (or auxiliary Release limit ) current Release delay High Operate limit accumulated Operate delay kW demand Release limit Release delay High kvar Operate limit (positive) Operate delay Release limit Release delay High Operate limit kVA Operate delay Release limit Release delay Low power Operate limit factor (lag) Operate delay Release limit Release delay High Operate limit THD Operate delay Release limit Release delay
18
For the parameters' limits, see note to Table 3.1 The operate delay is specified in 0.1 second units using modulus 10-1. A value of 10 corresponds to a 1 sec delay, and a value of 999 corresponds to a 99.9 sec delay. The release delay is specified in 1 second units. The delay value of 65535 designates that a setpoint is disabled. To disable a setpoint, write 65535 into the operate delay register. In the instruments with the L option that have an additional current input, this setpoint will refer to auxiliary (ground leakage) current. For the setpoint high scale, refer to Iaux max in note to Table 3.1.
NOTES
1. The setpoint operate limit and operate delay should be written before you set the setpoint release parameters. 2. If a relay has been allocated to output energy pulses, an attempt to re-allocate it for a setpoint will result in a negative response.
3 POWERMETER DATA MAP
19
The pulsing output setup value specifies the number of unit-hours between pulses. A value of 65535
designates that a pulsing output is disabled. To disable a pulsing output, write 65535 into the pulsing output register.
NOTE
Allocating a relay for pulsing will unconditionally disable all setpoints associated with this relay.
The analog output setup value assigns the analog output for each output parameter as follows:
0 = the parameter is allocated to the internal analog output 1-14 = the parameter is allocated to the analog expander AX-7 analog channel (channels 1 to 7 correspond to the first analog expander, and channels 8 to 14 correspond to the second one). 65535 = output is disabled. To disable an analog output parameter, write 65535, except of the reserved location.
NOTES
1. Addressing of a reserved item will result in a negative response. 2. Allocating the same analog output for two or more output parameters will unconditionally disable all output parameters previously associated with this output. 20
3 POWERMETER DATA MAP
PT RATIO CT PRIMARY CURRENT Power demand period Ampere demand period Averaging buffer size Reset enable/disable Auxiliary CT PRIMARY CURRENT (L option)
PT RATIO is specified in 0.1 units using modulus 10-1. A value of 10 corresponds to PT RATIO = 1.0,
Powermeter reset register Keypad status Relay status DIP switch status Status inputs Firmware version number
21
Bit meaning: 0 = relay operated, 1 = relay released Table 3-17 DIP switch status
Bit number 6 7 Description Switch #10 status (Switch #4 in the PM290H/HD) Switch #9 status (Switch #3 in the PM290H/HD)
Phase voltage will be line-to-line voltage in a 3-wire open delta connection, and line-to-neutral voltage in other configurations.
22
Phase voltage will be line-to-line voltage in a 3-wire open delta connection, and line-to-neutral voltage in other configurations. Table 3-21 L3 voltage harmonics (Modbus Table #13)
Parameter Phase voltage (RMS) Fundamental frequency %THD Harmonic H01(reference) Harmonic H02 Harmonic H03 ... Harmonic H31 Register Register Modbus offset address address 0 3328 43329 1 2 3 4 5 33 3329 3330 3331 3332 3333 3361 43330 43331 43332 43333 43334 43362 Direc- Unit Low tion scale R V 0 R R R R R R Hz % % % % % 0 0 0 0 0 0 High scale Conversion Vmax (see note to LIN3 Table 3.1) 100.0 LIN3 100.0 LIN3 100.00 LIN3 100.00 100.00 100.00 LIN3 LIN3 LIN3
23
24
Each waveform sample is represented by a value in the range of 0 to 1023. A value of 0 corresponds to the highest negative amplitude of the measured signal, and a value of 1023 corresponds to the highest positive amplitude.
Table 3-26 L1/L12 voltage waveform header (Modbus Table #18)
Parameter Capture code Second Minute Hour Day of month Month Year Phase voltage (RMS) Fundamental frequency %THD Register offset 0 1 2 3 4 5 6 7 8 9 Register address 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 Modbus address 44609 44610 44611 44612 44613 44614 44615 44616 44617 44618 Direc- Unit Low tion scale R 0 R 0 R 0 R 0 R 1 R 1 R 0 R V 0 R R Hz % 0 0 High scale Conversion 0 NONE 59 NONE 59 NONE 23 NONE 31 NONE 12 NONE 99 NONE Vmax (see note to LIN3 Table 3.1) 100.0 LIN3 100.0 LIN3
Phase voltage will be line-to-line voltage in a 3-wire open delta connection, and line-to-neutral voltage in other configurations. Table 3-27 L2/L23 voltage waveform header (Modbus Table #19)
Parameter Capture code Second Minute Hour Day of month Month Year Phase voltage (RMS) Register offset 0 1 2 3 4 5 6 7 Register address 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 Modbus address 44865 44866 44867 44868 44869 44870 44871 44872 44873 44674 Direc- Unit Low tion scale R 0 R 0 R 0 R 0 R 1 R 1 R 0 R V 0 R R Hz % 0 0 High scale Conversion 0 NONE 59 NONE 59 NONE 23 NONE 31 NONE 12 NONE 99 NONE Vmax (see note to LIN3 Table 3.1) 100.0 LIN3 100.0 LIN3
Phase voltage will be line-to-line voltage in a 3-wire open delta connection, and line-to-neutral voltage in other configurations. Table 3-28 L3 voltage waveform header (Modbus Table #20)
Parameter Capture code Second Minute Hour Day of month Month Year Phase voltage (RMS) Fundamental frequency %THD Register offset 0 1 2 3 4 5 6 7 8 9 Register address 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 Modbus address 45121 45122 45123 45124 45125 45126 45127 45128 45129 45130 Direc- Unit Low tion scale R 0 R 0 R 0 R 0 R 1 R 1 R 0 R V 0 R R Hz % 0 0 High scale Conversion 0 NONE 59 NONE 59 NONE 23 NONE 31 NONE 12 NONE 99 NONE Vmax (see note to LIN3 Table 3.1) 100.0 LIN3 100.0 LIN3
25
26
27
NOTES
28