1.4: Function Codes

A packet’s Function Code tells the addressed Slave what action to perform. EPM devices support the following Modbus Function Codes:

 

 

Table 1.1: Function Codes

Function Code

Description

Hex

Dec

 

03H

3

Read Holding Registers

06H

6

Preset Single Register

10H

16

Preset Multiple Registers

1.4.1: Function Code 03—Read Holding Registers

This function allows a Master station to read one or more parameter values (data registers) from an EPM Slave. The data registers are 16-bit (two byte) values transmitted in “Big Endian” format: high-ordered byte first, low-ordered byte second.

The Master device sends a packet defining a start register for the Slave and the number of registers to read. The Slave responds with a packet containing the requested parameter values within the range specified in the request.

In the following example, a Master device requests an EPM Slave at address 01H to transmit two values beginning at Register 00001. The Slave replies with values 3031H and 3037H from Registers 00001 and 00002.

Table 1.2: Function Code 03 Example

 

Master Packet

 

Slave Packet

Slave Address

01H

Slave Address

01H

Function Code

03H

Function Code

03H

Data Starting Address-Hi

00H

Byte Count

04H

Data Starting Address-Lo

00H

Data 1-Hi

30H

Number of Registers-Hi

00H

Data 1-Lo

31H

Number of Registers-Lo

02H

Data 2-Hi

30H

CRC-Lo

C4H

Data 2-Lo

37H

CRC-Hi

0BH

CRC-Lo

F1H

 

 

CRC-Hi

2AH

1-2

Page 18
Image 18
GE EPM 9650/9800 manual Function Codes, Function Code Description Hex Dec, Function Code 03-Read Holding Registers