Model: PM-2160-A
Doc. Ref. no. : m20Aom201
Issue no. 02
User’s Manual
Page 32 of 36
Example
Query Message
SLAVE
ADDR
FUNCTION
CODE
H.O
START
ADDR
L.O
START
ADDR
H.O NO
OF REG
L.O NO
OF REG
ERROR
CHECK
FIELD
ERROR
CHECK
FIELD
0x0A
0x01
0x00
0x24
0x00
0x02
0xFC
0xBB
The query requests the status of input 0036 in slave no. 10. Since the function is an invalid function
for 2160-A, so the following error response will be generated.
Response Message
SLAVE
ADDR
FUNCTION
CODE
EXCEPTION
CODE
ERROR
CHECK
ERROR
CHECK
0x0A
0x81
0x01
0xF0
0x52
The function field is the original function code with the high order bit set and exception code 01
indicates an illegal function field.
When slave device that is Multifunction meter is in the PROGRAM mode, a busy state is
transmitted indicating that slave device is busy and the master should retransmit the message
later when the slave is free. So here exception code 0x06 is transmitted. Response message is
shown below.
Response Message
SLAVE
ADDR
FUNCTION
CODE
EXCEPTION
CODE
ERROR
CHECK
ERROR
CHECK
Device ID
Fun. Code
+ 0x80
0x06
0xC3
0x02
7.4.1 Read Holding Register (Function Code 03)
To get value of configuration parameters (CT Ratio, PT Ratio, Pls/KWh, Baud, Slave address etc.),
you have to use function code
03.
Here the addressing allows up to Maximum
24
registers (Words) to
be obtained at each request.
7.4.2 Preset Single Register (Function Code 06)
Function (06) will overwrite controller memory.
Function (06) allows the user to modify the contents of a holding register for configuration parameter.
The values are provided in binary, up to the maximum capacity of the controller and unused higher
bits must be set to zero.
Example
This example will set the CT Ratio value in slave number 17. Here CT Ratio and PT ratio requires 2
integer register for each. So you should write higher integer and lower integer value to get whole
Ratio value. Suppose you want to write CT RATIO = 5,then you have to take 5000 to write because in
unit side this 5000 will be divided by 1000 i.e. you will get 5.Now Hex value of 5000 is 0x1388,so you
will take 0x00 for higher integer register and 0x1388 for lower integer register. The address of CT
Higher integer is 0x6D and value to be programmed is 0x0000.
Similarly you can do for lower integer and also for PT RATIO. The normal response to a preset single
register request is to transmit the query message after the register has been altered,
If the value is an illegal value then the response message will be an exception response (Error
Message). For the details of maximum and minimum values of any parameter refer to manual.