0% found this document useful (0 votes)
2 views18 pages

TH Modbus English Manual

The document describes the TH servo's Modbus communication functions, including wiring diagrams and communication parameters for RS-485 serial communication. It outlines the configuration settings for communication ID, baud rate, and data mode, as well as the structure of MODBUS communication frames in RTU mode. Additionally, it details the function codes for reading and writing parameters, monitoring status quantities, and handling exceptions during communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views18 pages

TH Modbus English Manual

The document describes the TH servo's Modbus communication functions, including wiring diagrams and communication parameters for RS-485 serial communication. It outlines the configuration settings for communication ID, baud rate, and data mode, as well as the structure of MODBUS communication frames in RTU mode. Additionally, it details the function codes for reading and writing parameters, monitoring status quantities, and handling exceptions during communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

TH servo -Modbus communication function description V3.

1 Functional overview and wiring diagram

Servo driver has RS-485 serial communication interface, which can control servo system, change
parameters and monitor servo system status through MODBUS protocol. Wiring instructions of
communication port CN3 are as follows:
The communication port of L20/L30 driver uses three-digit terminals, and the shape and pin

distribution are as follows:


The communication ports of drivers of other specifications use double-row DB9 sockets, and the shape

and pin distribution are as follows:

Special note: RS485 communication port can also be connected through CN1 40/41/42. See the

product manual for details.

2 Communication parameters
Default
Range Unit
P-181 Communication ID number of drive value
-1~32 -1
When using RS-485 communication, the upper controller is the master and the servo driver is the
slave. The communication address of servo driver needs to be set to different communication station
numbers by this parameter. The setting range of station number address is -1 ~ 32. The default value is-1,
which means that the communication function is closed, and the setting value greater than 0 means that
the communication function is open. Before using the communication function, this parameter must be
set to the required station number, which represents the absolute address of this driver in the
communication network. Only one station number can be set for a group of servo drivers. If the station
number is set repeatedly, normal communication will be impossible.

Default
Range Unit
P-182 MODBUS Communication baud rate value
0~3 2
Select the baud rate of RS-485 communication through this parameter. Different values correspond
to different baud rates. The selected baud rate should be consistent with that of the upper controller. The
specific setting values are as follows:
1
Parameter meaning:
0:Baud rate is 4800bps
1:Baud rate is 9600bps
2:Baud rate is 19200bps
3:Baud rate is 38400bps
MODBUS Communication data Default
Range Unit
P-183 mode selection (RTU data format is value
only supported for the time being) 0~5 1

Select the data mode of RS-485 communication through this parameter, and
the selected data mode should be consistent with the communication
protocol of the upper controller. The specific parameter values have the
following meanings:
0:Data bits -8 bits Parity bit-none Stop bit -1 bit
1:Data bits -8 bits Parity bit-even check(Even)Stop bit -1 bit
2:Data bits -8 bits Parity bit-odd check(Odd) Stop bit -1 bit
3:Data bits -8 bits Parity bit-none Stop bit -2 bit
4:Data bits -8 bits Parity bit-even check(Even)Stop bit -2 bit
5:Data bits -8 bits Parity bit-odd check(Odd) Stop bit -2 bit

3 MODBUS Communication protocol


When using RS-485 serial communication, each servo driver must set its communication station
number on parameter P-181 in advance, and the computer or upper controller controls the
corresponding servo driver according to the station number; The baud rate needs to refer to the
communication mode of the upper controller to set the parameter P-182; The MODBUS
communication protocol only supports RTU(Remote Terminal Unit) mode for the time being, and
the user can set the required communication data mode on the parameter P-183 according to the
requirements of the upper controller. After the above parameter setting is completed, it will not
take effect until the parameter saving operation is performed and the drive is powered off and
restarted. The following describes the specific content of MODBUS communication.

Communication data structure:

 RTU Mode:

MODBUSThe application layer protocol defines a simple protocol data unit


(PDU), which is independent of the underlying communication layer as shown
in the figure below。
Address field function Data field Check code
code

MODBUS takes the address field as the beginning of the frame, and the content of the address field
is the effective address value (0 ~ 247). The master sets the slave address value in the address field of

2
the request information to determine the receiver of the request information. After the qualified slave
receives the information and completes the corresponding processing, it sets its own address value in
the address field of the response information, so that the master knows which slave sent the response .
The address field is followed by a function code, which indicates what operation the slave will

complete. The function code is followed by a data field, which contains the parameters of request

and response. The format, length and meaning of the data field are different according to the

different function codes.

Check codes are used to verify the validity of information and ensure the reliability of information

transmission. 16-bit CRC(Cyclical Redundancy Check) is used in RTU mode.

In RTU mode, every 8 bits of data in an information frame are sent according to two 4-bit
hexadecimal codes, for example, 1byte data 64H。
RTU mode is a bit-oriented transmission mode, which starts with an idle time of not less than 3.5
characters, and then sends an address field. the network equipment monitors the communication bus.
after continuously monitoring the idle time of 3.5 characters, it can receive address field information.
when it is judged that the received address field information is valid, it continues to receive subsequent
information, and then performs corresponding operations according to function codes and additional
information. if response information is required, it encapsulates the response information and sends it to
the host. The last byte sent indicates the end of the information frame after an idle time of about 3.5
characters, and a new information frame can be sent. RTU mode keeps frame synchronization by
simulating synchronization information, and the whole information frame must be transmitted as a
continuous data stream at one time. If a continuous data stream is transmitted, the receiving device
detects that there are more than 1.5 character intervals, then it is considered that one frame of data has
been received, and the next received character is taken as the beginning of the next frame. Under normal
circumstances, the interval time between information frames is at least 3.5 characters, that is, after one
frame of data has been sent, it will take at least 3.5 characters of idle time to send the next frame of data.

3
The format of information frame in RTU mode is:
START Address function Data field(DATA) Check code END
field code (CRC)
(ADR) (CMD)
T1-T2-T3-T4 8 bits 8 bits n*8 bits 16 bits T1-T2-T3-T4

Note: T1-T2-T3-T4 indicates that the minimum time interval with the previous frame is 3.5
characters。

In RTU mode, the format of sending each byte is:

Start bit Data bit (lower bit first) parity Stop bit
1 bit 8 bits 1 bit or no bit 1 bit or 2 bits

character structure:

10bits character box (used for 8bits characters without

verification)
(8 bit data+no check +1 stop bit)
11bits character box (for 8bit character plus

check)
(8-bit data+even check +1 stop

bit)
(8-bit data+odd check +1 stop bit)

Communication information frame format:

The entries in the format box of communication information frame are described as follows:
 START(communication start)
RTU mode: the minimum time interval from the previous frame is 3.5 characters。
 ADR(Mailing address)

The legal communication address ranges from 1 to 32, as shown below: communicate with the servo

driver with station number 16 (hexadecimal 10H)



RTU Mode:ADR = 10H
CMD (function code) and DATA (data field)
4
The format of data characters depends on the function code. Commonly used function codes are
described as follows:
Command code 03H: read the parameter value of the drive

Command code 04H: read the running state of the driver (such as the variable values of motor

speed, position, current and torque)


Command code 06H: write the parameters of the drive (single write)
Command code 41H: write drive parameters into EEPROM (save parameters)
 CRC(RTU mode) frame check calculation:
RTU mode:

RTU mode adopts CRC(Cyclical Redundancy Check) frame check, and the calculation of

CRC frame check is explained by the following steps:


Step 1: Initialize a 16bits register with FFFFH content, which is called CRC register.
Step 2: XOR the first byte of the command information with the low byte of the 16-bitsCRC
register, and save the result back to the CRC register.
Step 3: Check the least significant bit (LSB) of CRC register. If this bit is 0, it will be shifted to
the right by one bit. If this bit is 1, the CRC register value is shifted to the right by one bit and
then XOR with A001H.
Step 4: Go back to Step 3 until Step 3 has been executed eight times, and then proceed to

Step 5 .

Step 5: Repeat Step 2 to Step 4 for the next byte of the command information until all bytes

have completed the above processing, at which time the content of CRC register is CRC frame check.
Note: After the CRC frame check is calculated, the low bit of CRC must be filled in the command
information first, and then the high bit of CRC. Please refer to the following example.
For example, read the 0-segment 05 parameter of servo driver with station number 01H. The
last content of CRC register calculated from ADR to the last byte of data is 3794H, so its command
information is as follows. It should be noted that byte 94H should be transmitted before byte 37H.
ADR 01H
CMD 03H
Start data 00H (High byte)
Position 05H (Low byte)
Number of 00H (High byte)
data 02H (Low byte)
CRC Low 94H (High byte)
CRC High 37H (Low byte)
 END(End of communication)

RTU mode: the minimum time interval with the next frame is 3.5 characters.

function code(CMD):

The function code is 1 byte(8bits), and its range is 1 ~ 255。


function code Specific meaning ModbusMeaning in the protocol

5
(HEX) specification
03H Read the parameter value of the drive Read Holding Register
(multiple parameters can be read
simultaneously)
04H Read Input Register
Read the running state of the driver

(such as motor speed, position,

current, torque and other variable

values, and read multiple states at the

same time)

06H Parameters written to the drive (single Write Single Register


write)
10H Parameters of the write drive (multiple Write Multiple Register
writes)
08h Diagnostic function Diagnostic
41H Write the parameters of the drive into
EEPROM (parameter saving)

Various exceptions and errors may occur during communication. In order to make these exceptions

and errors recognized by the host, the corresponding exception codes are defined, as shown in

the following table. When the slave receives the information from the host and finds an error

or fails to complete the normal response, the slave will send an error response frame to the host,

that is, the highest position of the function code byte is 1, and the corresponding exception

code is placed in the data field


(Exception Code)。
Exception Code(HEX) Mean
01h ILLEGAL FUNCTION
02h ILLEGAL DATA ADDRESS
03h ILLEGAL DATA VALUE
04h SLAVE DEVICE FAILURE
05h ACKNOWLEDGE
06h SLAVE DEVICE BUSY

4 Writing and reading of parameters

For details of all parameters of servo driver, please refer to the


parameter section of debugging manual, and the parameters are divided
6
according to parameter segments. Each parameter is represented by 16bits
of data, and the communication address of each parameter is determined
by the parameter serial number (range 0~249). For example, the
communication address of parameter P-005 is 005 (decimal), the
communication address of parameter P-108 is 108 (decimal), the
communication address of parameter P-204 is 204 (decimal), and so on

All the parameters described in the parameter section can be read through communication, but

only some parameters are open and allowed to be modified and written by users. The parameters

listed in the commissioning manual are allowed to be modified and written. Other unspecified

parameters are reserved parameters of servo drive (users cannot write reserved parameters,

otherwise it may cause abnormal operation of servo drive). If users need to modify other

parameters, please contact our technical personnel.

5 Reading instructions for monitoring status quantities

The state quantity inside the servo driver can be read through RS-485 communication port,

and the writing operation is invalid. The state quantity is stored as 16-bit data, and 40 state

variables from 0 to 39 are provided. The reading of the state quantity can be realized by the

following two function codes:

(1)Function code (04H), address range 0x0000~0x0027


(2)Function code (03H), address range 0x1000~0x1027
The function code (04H) reads the address (hexadecimal) of the status quantity as follows:
0x0000:Motor speed, in "r/min";
0x0001:Original position instruction (input pulse) is 16bit; lower;
0x0002:Original position instruction (input pulse) is 16bit; high;
0x0003:Position command (pulse) is 16bit; lower;
0x0004:Position instruction (pulse) is 16bit; high;
0x0005:Current motor position (pulse) is 16bit; lower;
0x0006:Current motor position (pulse) is 16bit; high;
0x0007:Position deviation (pulse) is 16bit; lower;
0x0008:Position deviation (pulse) is 16bit; high;
0x0009:Motor torque in "%"(percentage of rated torque);
0x000A:Peak torque in "%"(peak torque within %”(1s);<10>

7
0x000B:Instantaneous current of motor, in "0.1a" (12: real-time current of motor 1.2A);
0x000C:Peak current of motor, in "0.1a" (152: the maximum current in 1s is 15.2A);
0x000D:Pulse frequency of position instruction, in "0.1 kHz" (3000: 300kHz);
0x000E:Speed instruction in "r/min";
0x000F:Torque command in "%";<15>
0x0010:Speed analog command voltage, in "mV";
0x0011:Torque analog command voltage, in "mV";
0x0012:Input terminal DI status, [Note 1];
0x0013:Output terminal DO status, [note 2];
0x0014:The absolute position (pulse) of the motor encoder per turn is 16bit lower;<20>
0x0015:The absolute position (pulse) of motor encoder per turn is 16bit high;
0x0016 : Multi-turn position of motor encoder (when there is no multi-turn information, read 0
value);
0x0017:Regenerative braking load rate, unit "%";
0x0018:Average load rate in "%";
0x0019:Output voltage in "%";<25>
0x001A:Alarm code;
0x001B:Motor speed, in "0.1r/min";
0x001C:The second encoder position (pulse) is 16bit lower;
0x001D:The position (pulse) of the second encoder is 16bit high;
0x001E:Keep < 30 > DC bus voltage
0x001F : The absolute position of the motor is lower by 16 bits (32-bit absolute position of
multi-turn+single-turn data splicing)
0x0020 : The absolute position of the motor is 16 bits higher (32-bit absolute position of
multi-turn+single-turn data splicing)
0x0021:reserve
0x0022:reserve
0x0023:reserve <35>
0x0024:reserve
0x0025:reserve
0x0026:reserve
0x0027:reserve <39>

The function code (03H) reads the address (hexadecimal) of the status quantity as follows:
0x1000:Motor speed, in "r/min";
0x1001:Original position command (input pulse) is 16bit lower;
0x1002:Original position command (input pulse) is 16bit high;
0x1003:Position command (pulse) low 16bit;
0x1004:Position command (pulse) is 16bit high;
0x1005:Current motor position (pulse) is 16bit lower;
0x1006:Current motor position (pulse) is 16bit high;
0x1007:Position deviation (pulse) is 16bit low;
0x1008:Position deviation (pulse) is 16bit high;
0x1009:Motor torque in "%"(percentage of rated torque);

8
0x100A:Peak torque in "%"(peak torque within %”(1s);<10>
0x100B:Instantaneous current of motor, in "0.1a" (12: real-time current of motor 1.2A);
0x100C:Peak current of motor, in "0.1a" (152: the maximum current in 1s is 15.2A);
0x100D:Pulse frequency of position instruction, in "0.1 kHz" (3000: 300kHz);
0x100E:Speed command, in "r/min";
0x100F:Torque command in "%";<15>
0x1010:Speed analog command voltage, in "mV";
0x1011:Torque analog command voltage, in "mV";
0x1012:Input terminal DI status, [Note 1];
0x1013:Output terminal DO status, [note 2];
0x1014:The absolute position (pulse) of the motor encoder per turn is 16bit lower;<20>
0x1015:The absolute position (pulse) of motor encoder per turn is 16bit high;
0x1016 : Multi-turn position of motor encoder (when there is no multi-turn information, read 0
value);
0x1017:Regenerative braking load rate, unit "%";
0x1018:Average load rate in "%";
0x1019:Output voltage in "%";<25>
0x101A:Alarm code;
0x101B:Motor speed, in "0.1r/min";
0x101C:The second encoder position (pulse) is 16bit lower;
0x101D:The position (pulse) of the second encoder is 16bit high;
0x101E:Keep < 30 > DC bus voltage
0x101F : The absolute position of the motor is lower by 16 bits (32-bit absolute position of
multi-turn+single-turn data splicing)
0x1020 : The absolute position of the motor is 16 bits higher (32-bit absolute position of
multi-turn+single-turn data splicing)
0x1021:reserve
0x1022:reserve
0x1023:reserve <35>
0x1024:reserve
0x1025:reserve
0x1026:reserve
0x1027:reserve <39>

[Note 1]: The data read from this address is 16bit, in which bit5~bit0 correspond to the input states of
DI6 ~ DI1 respectively, "1" means input high level, and "0" means input low level; Bit15 ~ bit6 are
reserved bits.

[Note 2]: The data bits read at this address are 16bit, in which bit5~bit0 represent the output status of

DO6~DO1, "1" represents the output high level, and "0" represents the output low level; Bit15~bit6 are

reserved bits.

9
6 Communication instance

6.1 Read state quantity(CMD=04H)


Use the read status function code (04H) to read all monitoring status quantities in the servo driver. The
format of communication frame is as follows: Note: the maximum number of States to be read at a time is
8。
The request frame format is as follows:
Address function Start address value Number of read CRC Check code
field1 byte code1 2 bytes , High byte states2 bytes , High 2 bytes,Low byte first
byte first byte first
0x01 0x04 0x00,0x00 0x00,0x01(N) CRC_Lo, CRC_Hi
Normal response:
Address function Number of bytes state value , 2N CRC Check code
field 1 code1 occupied by status bytes,High byte first 2 bytes,Low byte first
byte byte 1byte
0x01 0x04 0x02(2N) 0xXX,0xXX,…… CRC_Lo, CRC_Hi
Abnormal response:
Address function Exception code1byte CRC Check code
field1 byte code1 2 bytes,Low byte first
byte
0x01 0x84 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

Examples are as follows:


Host sends frame:
ADDR CODE STADDR_H STADDR_L RNUM_H RNUM_L CRC_L CRC_H
0x01 0x04 0x00 0x01 0x00 0x02 0xXX 0xXX
Slave response frame:
ADDR CODE BYTE_NUM DATA1_H DATA1_L DATA2_H DATA2_L CRC_L CRC_H
0x01 0x04 0x04 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX

STADDR:Read status start address


RNUM:Number of States read

BYTE_NUM:Number of bytes occupied by read status (for example, RNUM is 2, that is, two 16-bit data,

then BYTE_NUM is 2*2 = 4 bytes)

DATAX: the status value read back, where x represents the serial number, DATA1 is the first data, and
DATA2 is the second data

10
In this example, STADDR = 0x0001 and RNUM = 0x02 in the transmission frame indicate that two status

data are read from the start address 0x0001 (i.e., two status values with addresses 0x0001 and 0x0002

are read, the specific meaning is described in the previous section)



BYTE_NUM = 0x04 in the response frame means that the two read status values occupy 4 bytes,
followed by DATA1 and DATA2, which are the status values with addresses 0x0001 and 0x0002.

11
6.2 Read parameter(CMD=03H)
All parameters in the drive can be read by using the read parameter function code (03H). The format of
communication frame is described as follows:
Note: the maximum number of parameters to be read at a time is 8。
The request frame format is as follows:
Address function Start address value2 Number of reading CRCCheck code
field1 byte code1 bytes,High byte first parameters 2 bytes, 2 bytes,Low byte first
byte high byte first
0x01 0x03 0x00,0x00 0x00,0x01(N) CRC_Lo, CRC_Hi
Normal response:
Address function Number of bytes Parameter value , 2N CRCCheck code
field1 byte code1 occupied by bytes,high byte first 2 bytes,Low byte first
byte parameters1byte
0x01 0x03 0x02(2N) 0xXX,0xXX,…… CRC_Lo, CRC_Hi
Abnormal response:
Address function Exception code1byte CRCCheck code
field1 byte code1 2 bytes,Low byte first
byte
0x01 0x83 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

Examples are as follows:


Host sends frame:
ADDR CODE STADDR_H STADDR_L RNUM_H RNUM_L CRC_L CRC_H
0x01 0x03 0x00 0x01 0x00 0x02 0xXX 0xXX
Slave response frame:
ADDR CODE BYTE_NUM DATA1_H DATA1_L DATA2_H DATA2_L CRC_L CRC_H
0x01 0x03 0x04 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX

STADDR:Read parameter start address


RNUM:Number of parameters read

BYTE_NUM:Number of bytes occupied by the read parameters (for example, RNUM is 2, that is, two
16-bit data, then BYTE_NUM is 2*2 = 4)

DATAX:The parameter value read back, x represents the serial number, DATA1 is the first parameter,
and DATA2 is the second parameter

In this example, STADDR = 0x01 and RNUM = 0x02 in the transmission frame indicate that two

parameters are read from the start address 1 (i.e., two parameters P-001 and P-002 with addresses 0x01

and 0x02 are read).

12
BYTE_NUM = 0x04 in the response frame means that the two parameter values read take up 4 bytes,
followed by DATA1 and DATA2, which are the parameter values with addresses 0x01 and 0x02.

13
6.3 Write a single parameter(CMD=06H)
The parameters listed in the debugging manual can be written by using the write parameter function code
(06H). The format of communication frame is described as follows:

Note: The function code 06H can only write one parameter at a time. Before writing the parameters,

please refer to the parameter specification to confirm the specific meaning of the parameters. Writing the

parameter values incorrectly may cause abnormal operation of the servo driver!
The request frame format is as follows:
Address function Parameter number2 Parameter values CRCCheck code
field1 byte code1 bytes,高字节在前 written2 bytes, High 2 bytes,Low byte first
byte byte first
0x01 0x06 0x00,0x00 0x00,0x64 CRC_Lo, CRC_Hi
Normal response:
Address function Parameter number 2 Parameter CRCCheck code
values
field 1 code 1 bytes,高字节在前 written 2 bytes,High 2 bytes,Low byte first
byte byte byte first
0x01 0x06 0x00,0x00 0x00,0x64 CRC_Lo, CRC_Hi
Abnormal response:
Address function Exception code1byte CRCCheck code
field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0x86 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

Examples are as follows:


Host sends frame:
ADDR CODE WADDR_H WADDR_L VALUE_H VALUE_L CRC_L CRC_H
0x01 0x06 0x00 0x01 0x01 0x02 0xXX 0xXX
Slave response frame:
ADDR CODE WADDR_H WADDR_L VALUE_H VALUE_L CRC_L CRC_H
0x01 0x06 0x00 0x01 0x01 0x02 0xXX 0xXX

WADDR:Write parameter address


VALUE:The value to write

In this example, ADDR = 0x01 and VALUE = 0x0102 in the sending frame indicate that the value 0x0102

is written into the parameter with address 0x01.


The response frame is the same as the transmission frame

14
6.4 Write multiple parameters(CMD=10H)
The parameters listed in the debugging manual can be written by using the write
parameter function code (10H). The format of communication frame is described as
follows:

Note: The function code 10H can write multiple parameters at a time (the maximum number of

parameters written at a time is 10). Before writing the parameters, please refer to the parameter

specification to confirm the specific meaning of the parameters. Writing the parameter values incorrectly

may cause abnormal operation of the servo driver!


The request frame format is as follows:
Address function Start address Number of write Number of Parameter CRCCheck
field1 code1 value, parameters , 2 bytes occupied value, code
byte byte 2 bytes, bytes, by 2N bytes, 2 bytes,
High byte first High byte first parameters , High byte first Low byte first
(1~122) 1byte
(0~255)
0x01 0x10 0x00,0x00 0x00,0x02 0x04 0xXX,0xXX, CRC_Lo,
(N) (2N) …… CRC_Hi
Normal response:
Address function Start address value, Number of write CRCCheck code
field 1 code 1 2 bytes, parameters , 2 2 bytes,Low byte first
byte byte High byte first bytes,
High byte first
0x01 0x10 0x00,0x00 0x00,0x02 CRC_Lo, CRC_Hi
(N)
Abnormal response:
Address function Exception code1byte CRCCheck code
field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0x90 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

Examples are as follows:


Host sends frame:
ADR CODE SADRH SADRL WNUMH WNUML WNUMB D1_H D1_L D2_H D2_L CRCL CRCH
0x01 0x10 0x00 0x01 0x00 0x02 0x04 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX
Slave response frame:
ADR CODE SADRH SADRL WNUMH WNUML CRCL CRCH
0x01 0x10 0x00 0x01 0x00 0x02 0xXX 0xXX

SADR:Write parameter start address SADRH (high byte) SADRL (low byte)
WNUM:Number of written parameters WNUMH (high byte) WNUML (low byte)
WNUMB:Number of bytes of written parameters (for example, WNUM is 2, that is, two 16-bit data, then
15
WNUMB is 2*2 = 4)
D1_H:The high byte value of the first parameter written
D1_L:The low byte value of the first parameter written
D2_H:The high byte value of the second parameter written
D2_L:The low byte value of the second parameter written

In this example, SADR = 0x01 and WNUM = 0x02 in the transmission frame
indicate that two parameters (i.e., two parameters P-001 and P-002 with
addresses 0x01 and 0x02) are written from the start address 1.

16
6.5 Diagnostic function(CMD=08H)
After the master sends a diagnostic frame, the slave (servo driver) will respond to the same data
Tip: the diagnostic function can be used to determine whether MODBUS communication is normal or not
Host sends frame:
ADDR CODE DATA_H DATA_L CRC_L CRC_H
0x01 0x08 0x12 0x34 0xXX 0xXX
Slave response frame:
ADDR CODE DATA_H DATA_L CRC_L CRC_H
0x01 0x08 0x12 0x34 0xXX 0xXX

The slave response frame data of the diagnostic command should be exactly the same as the frame data

sent by the master, so whether the communication is normal can be detected by the diagnostic command.

DATA can be arbitrary custom data. For example, if the master sends 0xABCD, the slave responds with

0xABCD.

6.6 Save parameters(CMD=41H)

The function code of saving parameters (41H) can be used to store the parameters of the drive into

EEPROM, and the format of communication frame is described as follows:

Note: After sending this command, the servo driver needs some time to save the parameters to

EEPROM It is suggested that after sending this command, wait for more than 5S before performing other

operations.

The request frame format is as follows:


Address function CRCCheck code
field1 code1 byte 2 bytes,Low byte first
byte
0x01 0x41 CRC_Lo, CRC_Hi
Normal response:
Address function CRCCheck code
field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0x41 CRC_Lo, CRC_Hi
Abnormal response:
Address function Exception code1byte CRCCheck code
field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0xC1 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

17
6.7 Servo enable/power off(CMD=42H)

Request/normal response:

Address function Enable power-down flag1byte CRCCheck code


field 1 code1 2 bytes,Low byte first
byte byte
0x01 0x42 0x55(Enable) or CRC_Lo, CRC_Hi
0xAA(shutoff)
Abnormal response:

Address function Exception code1byte CRCCheck code


field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0xC2 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

6.8 Alarm clearing(CMD=43H)

Request/normal response:
Address function CRCCheck code
field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0x43 CRC_Lo, CRC_Hi
Abnormal response:
1. Address function Exception code1byte CRCCheck code
field 1 code 1 2 bytes,Low byte first
byte byte
0x01 0xC3 0x01 or 02 or 03 or 04 CRC_Lo, CRC_Hi

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy