135
ADVANCED USER GUIDE
IP66/Nema 4X variable speed drive
OPERATION WITH MODBUS RTU
CONTROL TECHNIQUES
3854 en - 03.2008 / b
21.4.3 - Parameter mapping
Commander SX drives are configured using a
menu.parameter notation.
The "menu" and "param" indices can take the values 0 to 99.
The menu.param is mapped into a MODBUS RTU register
menu x 100 + parameter.
In order to map the parameters correctly, the slave
increments (+1) the address of the received register.
Example: X = menu; Y = parameter
21.4.4 - Data encoding
MODBUS RTU uses a "big-endian" representation for the
addresses and data items (except for the CRC which is "little-
endian"). This means that, when a numerical quantity "bigger"
than one byte is transmitted, the most significant byte is sent
first.
For example:
21.4.5 - Function codes
The function code determines the context and format of the
message data.
• Function code 3: Read multiple
Reads a contiguous array of registers. The slave imposes an
upper limit on the number of registers which can be read. If
the limit is exceeded, the slave does not respond.
Note: 99 parameters maximum can be read.
Frame sent by the Master:
Frame returned by the slave:
Where n = 3 + number of bytes to be read.
• Function code 6: Write single register
Writing of a value to a single 16-bit register. The normal
response is an echo of the request, returned after the register
contents have been written.
Frame sent by the master:
Frame sent by the slave:
Drive parameter
Register address
(protocol level)
X.Y
(X x 100) + (Y – 1)
Examples:
1.02
101
1.00
99
0.01
0
12.33
1232
1
st
2
nd
…
16 – bits 0x1234
would be:
0x12 0x34
Function code
Description
Decimal Hexadecimal
3
03
Read multiple 16-bit registers or
words
6
06
Write single 16-bit register or word
16
10
Write multiple 16-bit registers or
words
23
17
Read and write multiple 16-bit
registers or words
Bytes
Description
0
Slave address (1 to 247)
1
Function code 0x03
2
Start word address MS byte
3
Start word address LS byte
4
Number of words to be read MS byte
5
Number of words to be read LS byte
6
CRC LS byte
7
CRC MS byte
Slave no.
Command (03)
Address of 1st word
Number of words
CRC
1 hexadecimal
byte
2 hexadecimal
bytes
Bytes
Description
0
Slave address
1
Function code 0x03
2
Number of bytes to be read
3
Word 0 MS byte
4
Word 0 LS byte
5
Word 1 MS byte
6
Word 1 LS byte
...
…
n
CRC LS byte
n + 1
CRC MS byte
Bytes
Description
0
Slave address (0 to 247)
1
Function code 0x06
2
Register address MS byte
3
Register address LS byte
4
Register value MS byte
5
Register value LS byte
6
CRC LS byte
7
CRC MS byte
Bytes
Description
0
Slave address
1
Function code 0x06
2
Register address MS byte
3
Register address LS byte
4
Register value MS byte
5
Register value LS byte
6
CRC LS byte
7
CRC MS byte
CRC
Slave no.
Command (03)
No. of bytes
Word number 0
Word number 1
…
1 hexadecimal
byte
2 hexadecimal
bytes
CRC
Slave no.
Command (06)
Register address
Register value
1 hexadecimal
byte
2 hexadecimal
bytes