165
OPERATION WITH MODBUS RTU
Commissioning manual Powerdrive MD2/FX
4617 en - 2017.09 / e
6.4.2 - Description of exchanges
Exchanges are initiated by the master, which sends its request:
if the slave concerned has understood it, it sends its response.
Each frame (question or response) contains four types of data:
- The address of the slave concerned which receives the
question frame (master request) or the address of the slave
which sends the response frame (encoded in one byte)
- The function code which selects a command (read or write
words, bits etc) for question and response frames (encoded in
one byte)
- The data field containing the parameters relating to the
command (encoded in «n» bytes)
- The frame CRC, calculated over sixteen bits, which is used to
detect transmission errors.
The frame is terminated with a minimum silence period,
equivalent to the transmission time for 3.5 characters (e.g. at
19200 baud, the silence period must be at least 1/19200 x 11
bits x 3.5, i.e. 2 ms). This silence period indicates the end of the
message, and the slave can start to process the transmitted
data.
All data is encoded in hexadecimal format.
Slave
address
Function
code
Message data
CRC
Silence
interval
16 bits
All master requests will lead to a response from a single slave.
The slave will respond within the maximum allotted time (the
minimum response time is never less than the silence period).
See diagram below.
Request from Master
Request from Master
Frame detection
Frame processed
by the slave
Minimum silence period
Slave response time
Slave response
Minimum silence period
Request from Master
Request from Master
Frame detection
Frame processed
by the slave
Minimum silence period
Slave response time
Slave response
Minimum silence period
6.4.3 - Parameter mapping
POWERDRIVE
drives are configured using a
menu.
parameter
notation.
The «menu» and «parameter» indices can take the values 0
to 99. Menu.parameter is assigned to a MODBUS RTU register
menu x 100 + 16-bit parameters
for 16-bit parameters. For
32-bit parameter addressing, add 0x4000 to the address,
giving 16384, and read or write 2 words. As Modbus only uses
16-bit registers, 8-bit parameters should be addressed in the
same way as 16-bit.
In order to map the parameters correctly, the slave
increments (+1) the address of the received register.
Example: X = menu; Y = paramete
Drive parameter
Register address
(protocol level)
(X x 100) + Y -1
X.Y in 32-bit
16384 + (X x 100) + Y - 1
Examples
01.01 (32-bit)
16484
01.09 (8-bit but treated
as 16-bit
108
07.03 (16-bit)
X.Y in 16-bit
6.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:
1
st
2
nd
…
16 – bits 0x1234
would be:
0x12 0x34
6.4.5 - Function codes
The function code determines the context and format of the
message data.
Function code
Description
Decimal Hexadecimal
3
0x03
Read multiple 16-bit registers or
words
6
0x06
Write single 16-bit register or
word
16
0x10
Write multiple 16-bit registers or
words
23
0x17
Read and write multiple 16-bit
registers or words
• 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:
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 n
Command (03)
Start word address
Number of words
CRC
1 hexadecimal
byte
2 hexadecimal
bytes
Содержание LEROY-SOMER Powerdrive FX
Страница 1: ...4647 en 2017 09 e Powerdrive MD2 FX Commissioning manual R f rence...
Страница 41: ...41 QUICK SETUP MODE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e Notes...
Страница 49: ...49 ADVANCED PARAMETER SETTING MODE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e Notes...
Страница 95: ...95 ADVANCED PARAMETER SETTING MODE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e Notes...
Страница 131: ...131 ADVANCED PARAMETER SETTING MODE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e 5 14 MENU 13 Reserved...
Страница 137: ...137 ADVANCED PARAMETER SETTING MODE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e Notes...
Страница 174: ...174 MAINTENANCE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e Notes...
Страница 175: ...175 MAINTENANCE Commissioning manual Powerdrive MD2 FX 4617 en 2017 09 e Notes...