[go: up one dir, main page]

0% found this document useful (0 votes)
39 views23 pages

LC Drive MODBUS User Guide

The document UM_MODBUS_v1.0 provides a comprehensive guide on MODBUS communications for stepper motor drive configuration and control, detailing function codes for reading and writing parameters. It includes information on single and multiple register commands, error handling, and specific parameters such as slave address, microstep settings, and current. Additionally, it outlines commands for connecting/disconnecting devices and changing slave addresses, along with default values and response formats.

Uploaded by

Bhushan PAwar
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)
39 views23 pages

LC Drive MODBUS User Guide

The document UM_MODBUS_v1.0 provides a comprehensive guide on MODBUS communications for stepper motor drive configuration and control, detailing function codes for reading and writing parameters. It includes information on single and multiple register commands, error handling, and specific parameters such as slave address, microstep settings, and current. Additionally, it outlines commands for connecting/disconnecting devices and changing slave addresses, along with default values and response formats.

Uploaded by

Bhushan PAwar
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/ 23

UM_MODBUS_v1.

0 Dated: 020719
UM_MODBUS_v1.0 Dated: 020719

Contents
MODBUS Communications: .................................................................................................................... 3
Modbus Protocol Overview: ............................................................................................................... 3
Read Parameter: ............................................................................................................................. 3
Write Parameter (Single Register): ................................................................................................. 3
Write Parameter (Multiple Register): ............................................................................................. 4
Read Single Bit Parameter (Coil): .................................................................................................... 4
Write Single Bit Parameter (Relay): ................................................................................................ 4
Single Register Parameters: .................................................................................................................... 5
CONNECT/DISCONNECT COMMAND : ................................................................................................ 6
SLAVE ADDRESS: ................................................................................................................................. 7
MICROSTEP ......................................................................................................................................... 7
PITCH ................................................................................................................................................... 8
CURRENT ............................................................................................................................................. 8
ACC: ..................................................................................................................................................... 9
DCC:................................................................................................................................................... 10
BAUDRATE:........................................................................................................................................ 11
Single register Commands: ................................................................................................................... 12
SET_HOME_POSITION:...................................................................................................................... 12
START: Start ...................................................................................................................................... 13
HOLD: Hold........................................................................................................................................ 13
RELEASE: Release .............................................................................................................................. 14
SET_DEFAULT_CODE: ........................................................................................................................ 14
Multiple register Write (commands): ................................................................................................... 15
RUN: .................................................................................................................................................. 15
MOVE: ............................................................................................................................................... 16
GO_HOME: ........................................................................................................................................ 17
Auto cycle programming: ...................................................................................................................... 17
AUTO_CYCLE: .................................................................................................................................... 20
Single Bit value Write registers : ........................................................................................................... 23
UM_MODBUS_v1.0 Dated: 020719

MODBUS Communications:
Modbus Protocol Overview:
Stepper Motor Drive Configuration and Control can also be done from remote
location via MODBUS communication. Following sub-sections describe the MODBUS function
codes used and, addresses for each parameter for display and configuration.
The Configured parameters can only be read from the PC application using function code
0x03, and modified using function code 0x06 for single 16 bit register value and for Modify/Write
more than one register Multiple register value using function code 0x10 .
When Motor drive run in Auto cycle Mode Input relays are used to control cycle start stop
these are single bit values. So that to modify switch status function code 0x05. For each cycle state
(start at and stop at) output coils status is read by using function code 0x01.

By Default Values:
Slave ID=0x01
Baud rate= 19200 bits/sec
Parity bit= none
Stop bit=1

Read Parameter:
Function Code 0x03(Read Holding Registers)
Request
Function code 1 Byte 0x03
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 1 to 125

Response
Function code 1 Byte 0x03
Byte count 1 Byte 2 x N*
Register value *N x 2 Bytes N Data
*N = Quantity of Registers

Error
Error code 1 Byte 0x86
Exception code 1 Byte 01 or 02 or 03 or 04
For configuration parameters exception code 03 indicate that the data send is out of the
boundary limit.

Write Parameter (Single Register):


Function Code 0x06(Write Holding Registers)
Request
Function code 1 Byte 0x06
Starting Address 2 Bytes 0x0000 to 0xFFFF
Register Value (Data) 2 Bytes 0x0000 to 0xFFFF

Response
Function code 1 Byte 0x06
Starting Address 2 Bytes 0x0000 to 0xFFFF
Register Value (Data) 2 Bytes 0x0000 to 0xFFFF
UM_MODBUS_v1.0 Dated: 020719

Error
Error code 1 Byte 0x86
Exception code 1 Byte 01 or 02 or 03 or 04
For configuration parameters exception code 03 indicate that the data send is out of the
boundary limit.

Write Parameter (Multiple Register):


Function Code 0x10 (Write Holding Registers)
Request
Function code 1 Byte 0x10
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 0x0001 to 0x007B
Byte Count 1 Byte 2 x N*
Registers Value N* x 2 Bytes Data
*N = Quantity of Registers

Response
Function code 1 Byte 0x10
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 1 to 123 (0x7B)

Error
Error code 1 Byte 0x90
Exception code 1 Byte 01 or 02 or 03 or 04
Here is an example of a request to write two registers starting at 2 to 00 0A and 01 02 hex:

Read Single Bit Parameter (Coil):


Function Code 0x01
Request
Function code 1 Byte 0x01
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Coils 2 Bytes 1 to 2000 (0x7D0)

Response
Function code 1 Byte 0x01
Byte count 1 Byte 2 x N*
Coil Status n Byte n = N or N+1
*N = Quantity of Outputs / 8, if the remainder is different of 0 => N = N+1

Error
Error code 1 Byte Function code + 0x80
Exception code 1 Byte 01 or 02 or 03 or 04
Write Single Bit Parameter (Relay):
Function Code 0x05
Request
Function code 1 Byte 0x05
Starting Address 2 Bytes 0x0000 to 0xFFFF
Output Value 2 Bytes 0x0000 or 0xFF00
UM_MODBUS_v1.0 Dated: 020719

Response
Function code 1 Byte 0x05
Starting Address 2 Bytes 0x0000 to 0xFFFF
Output Value 2 Bytes 0x0000 or 0xFF00

Error
Error code 1 Byte 0x85
Exception code 1 Byte 01 or 02 or 03 or 04

Single Register Parameters:

Parameter Addre Register Number of Default Range in Value of Register for


Name ss(1 Register Value Decimal configuration
Byte) (each (hex)
(hex)( Register is
0 to 16 bit)
FF)
0x01 - LC Drive 2 A
Device MB_DEVICE_ 0x02 - LC Drive 4.5 A
0x00
Name NAME (R) 1 0x00 1 to 5 0x03 - LC Drive 6 A
0x04 - LC Drive 8 A
Baud Rate
BR_300
((uint8_t)0x00)
BR_600
((uint8_t)0x01)
BR_1200
((uint8_t)0x02)
BR_1800
((uint8_t)0x03)
BR_2400
((uint8_t)0x04)
BR_4800
((uint8_t)0x05)
BR_7200
MB_BR
Baud Rate 0x01 1 0x00 0 to 13 ((uint8_t)0x06)
(W)
BR_9600
((uint8_t)0x07)
BR_19200
((uint8_t)0x08)
BR_38400
((uint8_t)0x09)
BR_57600
((uint8_t)0x0A)
BR_72000
((uint8_t)0x0B)
BR_115200
((uint8_t)0x0C)
BR_128000
((uint8_t)0x0D)
MB_Parity 0x00:NONE
Parity Bit 0x02 1 0x00 0 to 2
(W) 0x01:EVEN
UM_MODBUS_v1.0 Dated: 020719

0x02:ODD
0x00: 1 stop bit
MB_Stop_Bit
Stop Bit 0x03 1 0x00 0 to 2 0x01: 2 Stop bit
(W)
0x02: 1.5 Stop bit

MB_SLAVE_I 0: Reserved for Broadcast


Slave ID 0x04 1 0x01 2 to 247
D User can give Slave ID
(W) from 2 to 247
Set Acceleration
MB_ACC
Acceleration 0x0C 1 0x8A 0 to 4095 Range – 0.0 to 9.9 sec
(WR)
(Value multiply by 10)
Set Deceleration
MB_DEC
Deceleration 0x0D 1 0x8A 0 to 4095 Range – 0.0 to 9.9 sec
(WR)
(Value multiply by 10)

MB_TVAL_RU
Current 0x12 1 0x29 0 to 127
N
(WR) Used to set Current.
MB_STEP_MO Set Micro steps Full step,
Microstep 0x1A DE 1 0x07 1,2,4,8,16 Half steps, 1/4th steps,
(WR) 1/16th steps.
Pitch Value is always
MB_PITCH
Pitch 0x22 1 0x0000 100*100 multiplied by 100 to give
(WR)
value in integer format
Primary MB_PRIMARY If Motor has gear box set
0x23 1 0x0001
Gears _GEAR(WR) 1 to 500 gear ratio (Primary value)
MB_SECOND If Motor has gear box set
Secondary
0x24 ARY_GEAR(W 1 0x0001 1 to 500 gear ratio (Secondary
Gears
R) Value)
Auto Cycle 0x01B OUTPUT 1 0x00 0 : OFF Bit 0: O/P1
Outputs B STATUS 1 : ON Bit 1: O/P2
(R) Bit 2: O/P3
Bit 3: O/P4
Bit 4: O/P5
Bit 5: O/P6
Bit 6: O/P7
Bit 7: O/P8
Note : R- Read Only, W- Write Only, WR- Write read Both.

CONNECT/DISCONNECT COMMAND :
This command is used to connect device to Modbus. For 0x00 disconnect and for 0x01 connect.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x0000 0x00 or 0x01

Command: 01, 06, 00,00,00,01


01 -> Slave Address
06* -> Function Code
00* -> Holding Register Address(LSB)
00* -> Holding Register Address(MSB)
00, 01 -> Connect to device op-code
(* indicates these values are fixed)
UM_MODBUS_v1.0 Dated: 020719

Response: 01, 06, 00,00,00,01

SLAVE ADDRESS:
The following command is used to change the slave address (Device ID).
In this for Broadcast id 0 (Zero) used to send command to all devices connected over
MODBUS. It has limitation that for broadcast address there will be no any response. So PC
application does get any information about device that device is connected or not.
In broadcast mode we can’t send some parameter, which are definite for particular
device like Micro-steps, current, Gear ratio etc.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x0004 ADDR

ADDR: 1 to 247 VALUES.


Command: 01, 06, 00,04,00,07
01 -> Slave Address
06* -> Function Code
00* -> Holding Register Address (LSB)
04* -> Holding Register Address (MSB)
00, 02 -> new slave name or address
(* indicates these values are fixed)

Response: 01, 06, 00,04,00,07

MICROSTEP
This command is used to set micro-steps. Micro-steps can be read by using function code 0x03.
And to write micro-step function code is 0x06.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x001A MICROSTEP

Micro step value


MICROSTEP VALUE
0x01 Full Step
0x02 Half Step
0x04 ¼ step
0x08 1/8 Step
0x16 1/16 Step
0x32 1/32 Step
0x64 1/64 Step
0x128 1/128 Step
0x256 1/256 Step
0x05 1/5 Step
0x10 1/10 Step
0x25 1/25 Step
0x50 1/50 Step
0x125 1/125 Step
0x250 1/250 Step
Note: Red Coloured values are not applicable.
UM_MODBUS_v1.0 Dated: 020719

Command: 01, 06, 00, 1A, 00, 04


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
1A* -> MSB Address of Holding Register
00, 04 -> set ¼ Th micro step
(* indicates these values are fixed)

Response: 01, 06, 00, 1A, 00, 04

PITCH
This command is used to set Pitch value. Pitch value can be read by using function code
0x03. And write by using 0x06.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x0022 Pitch

Pitch Value Range: 0.5 to 100 mm/sec


Command: 01, 06, 00, 12,00,01
01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
22* -> MSB Address of Holding Register
00,01 -> pitch value in linear mode
(* indicates these values are fixed)

Response: 01, 06, 00, 12,00,01

CURRENT
This command is used to set Current. Current can be read by using function code
0x03. And write by using 0x06. The current value is Hex code value not current in ampere
selected from application drop down current list.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x0012 CURRENT

Current value: Depending on the Drive used

2Amp Drive:
Current in Ampere Hex Code
0.25 0x07
0.40 0x0C
0.50 0x0F
0.60 0x13
0.75 0x17
0.85 0x1B
1.00 0x1F
UM_MODBUS_v1.0 Dated: 020719

1.20 0x26
1.33 0x2A
1.50 0x2F
1.70 0x36
1.80 0x39
2.00 0x3F

4.5Amp Drive:
Current in Ampere Hex Code
0.50 0x06
1.00 0x0C
1.50 0x13
1.70 0x15
2.00 0x19
3.00 0x26
3.20 0x29
3.50 0x2C
4.00 0x33
4.50 0x39

6Amp Drive:
Current in Ampere Hex Code
2.00 0x19
2.50 0x20
3.00 0x26
3.50 0x2C
4.00 0x33
4.50 0x39
5.00 0x40
5.50 0x46
6.00 0x4D
6.50 0x53

Command: 01, 06, 00, 12,00,0?


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
12* -> MSB Address of Holding Register
Value-> Current Hex code Value
(* indicates these values are fixed)

Response: 01, 06, 00, 12,00,0?

ACC:
This command is used to set Acceleration. Acceleration can be read by using function
code 0x03. And write by using 0x06. Acceleration value is multiplied by 10 as float value
required more number of bytes.
UM_MODBUS_v1.0 Dated: 020719

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x000C ACC

ACC value (2 Byte): Acceleration ranging from 0x0000 to 0x0FFF.


i.e. 14.55 to 59590 step/s2 with resolution of 14.55 step/s2

E.g: Suppose, for speed 100 rpm with ACC of 0.1 sec with 2 microstep

ACC (step/sec2) = Speed(rpm) * 200 * microstep = 100*200*2 = 6666.66 step / sec2


60 * ACC(sec) 60*0.1

Range of acceleration is 14.55 to 59590 step/s2 with resolution of 14.55 step/s2 for
LC- Drive. If the for combination of speed, Micro-step and acceleration time will set
acceleration to maximum value 0x0FFF.
But we give acceleration in terms Time to reach desired speed from zero speed. Unit
of time is second. The range of values of acceleration in Time is 0 to 9.9 sec.

Note:
Command: 01, 06, 00, 0C, 00, 01
01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
0C* -> MSB Address of Holding Register
00, 01-> ACC value
(* indicates these values are fixed)

Response: 01, 06, 00, 0C, 00, 01

DCC:
This command is used to set deceleration. Deceleration can be read by using function
code 0x03. And write by using 0x06. Deceleration value is multiplied by 10 as float value
required more number of bytes.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x000D DCC

DCC value (2 Byte): Deceleration ranging from 0x0000 to 0x0FFF.


i.e. 14.55 to 59590 step/s2 with resolution of 14.55 step/s2
E.g: Suppose, for speed 100 rpm with DEC of 0.1 sec with 2 microstep

DEC (step/sec2) = Speed(rpm) * 200 * microstep = 100*200*2 = 6666.66 step / sec2


60 * DECsec) 60*0.1

Range of a Deceleration is 14.55 to 59590 step/s2 with resolution of 14.55 step/s2


for LC- Drive. If the for combination of speed, Micro-step and deceleration time will set
deceleration to maximum value 0x0FFF.
But we give deceleration in terms Time from reach desired speed to zero speed. Unit
of time is second. The range of values of deceleration in Time is 0 to 9.9 sec.
UM_MODBUS_v1.0 Dated: 020719

Command: 01, 06, 00, 0D, 00, 01


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
0D* -> MSB Address of Holding Register
00, 01 -> DEC value
(* indicates these values are fixed)

Response: 01, 06, 00, 0D, 00, 01

BAUDRATE:
This command is used to set or to Change Baud rate.

Slave Address Function Code Holding ADDR Data


0x01 0x06 0x0001 BR

BR :
BR VALUE (BPS)
0x00 1200
0x01 1800
0x02 2400
0x03 4800
0x04 7200
0x05 9600
0x06 19200
0x07 38400
0x08 57600
0x09 72000
0x0A 115200
0x0B 128000

Command: 01, 06, 00,01,00,07


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
01* -> MSB Address of Holding Register
00, 07 -> Baud rate (38400) value to be set for communication
(* indicates these values are fixed)

Response: 01, 06, 00,01,00,07


UM_MODBUS_v1.0 Dated: 020719

Single register Commands:

Parameter Address Register Number Default Range in Value of Register


Name (1 Byte) of Value Decimal for configuration
(hex)(0 Register (hex)
to FF) (each
Register
is 16 bit)
Set Home 0x25 5 Set the Home
Position MB_SET_HOME_CMD 0x0000 1 position(Absolute
Position)
Start/Stop 0x25 MB_START_STOP_CM 5 1: START Start and Stop the
0x00
D 0:STOP motor movement
Set Default 0x25 5 Used to Set
MB_SET_DEFAULT_CO
Code -- -- Default Auto
DE
Program in Flash
Hold/Relea 0x25 5 1: HOLD Hold and
MB_HOLD_RELEASE_C
se 0x00 0: RELEASE the
MD
RELEASE motor

OPCODE: OPCODE gives types of operation have to perform on the drive. Following table
specifies values of OPCODE.

Command OPCODE
RUN 0x01
MOVE 0x02
GO_HOME 0x03
SET HOME 0x04
START 0x05
STOP 0x06
HOLD 0x07
RELEASE 0x08
SET_DEFAULT_CODE 0x0A

SET_HOME_POSITION:
This is command to drive to set home position. For command holding register address
is same. But command op-code for set home position is 0x04.
Slave Address Function Code Holding ADDR Op-Code
0x01 0x06 0x0025 0x0004
Command: 01, 06, 00,25,00,04
01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 04* -> Op-code for SET_HOME position
(* indicates these values are fixed)

Response: 01, 06, 00,25,00,04


UM_MODBUS_v1.0 Dated: 020719

START: Start
This is command to drive to start Motor. For command holding register address is
same. But command op-code for motor start is 0x05.
Slave Address Function Code Holding ADDR Op-Code
0x01 0x06 0x0025 0x0005

Command: 01, 06, 00,25,00,05


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 05* -> Op-code for START the motor
(* indicates these values are fixed)

Response: 01, 06, 00,25,00,05

STOP: Stop
This is command to drive to staop Motor. For command holding register address is
same. But command op-code for motor stop is 0x06.
Slave Address Function Code Holding ADDR Op-Code
0x01 0x06 0x0025 0x0006

Command: 01, 06, 00,25,00,06


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 06* -> Op-code for STOP the motor
(* indicates these values are fixed)
Response: 01, 06, 00,25,00,06

HOLD: Hold
This is command to drive to Hold Motor. For command holding register address is
same. But command op-code for motor hold is 0x07.
Slave Address Function Code Holding ADDR Op-Code
0x01 0x06 0x0025 0x0007

Command: 01, 06, 00,25,00,07


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 07* -> Op-code for HOLD the motor
(* indicates these values are fixed)

Response: 01, 06, 00,25,00,07


UM_MODBUS_v1.0 Dated: 020719

RELEASE: Release
This is command to drive to Release Motor. For command holding register address is
same. But command op-code for motor release is 0x08.
Slave Address Function Code Holding ADDR Op-Code
0x01 0x06 0x0025 0x0008

Command: 01, 06, 00,25,00,08


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 08* -> Op-code for RELEASE the motor
(* indicates these values are fixed)

Response: 01, 06, 00,25,00,08

SET_DEFAULT_CODE:
This command is used in Auto cycle programming. When program is send to device
then by sending this command we can set sent auto cycle program as default program for device.
Holding register address is same. But command op-code for motor start is 0x0A.

Slave Address Function Code Holding ADDR Op-Code


0x01 0x06 0x0025 0x000A

Command: 01, 06, 00, 25, 00,0A


01 -> Slave Address
06* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 0A* -> Op-code for SET_DEFAULT_PROGRAM
(* indicates these values are fixed)

Response: 01, 06, 00, 25, 00,0A


UM_MODBUS_v1.0 Dated: 020719

Multiple register Write (commands):


These commands are used in Manual Mode.
Parameter Address Register Number Default Range in Value of Register
Name (1 Byte) of Value Decimal for configuration
(hex)(0 Register (hex)
to FF) (each
Register
is 16 bit)
RUN 0x25 MB_RUN_CMD 5 Speed: 20
bit value
0x0000 DIR: 1=
FW,0=RE Speed unit:
V step/tick
MOVE 0x25 5 No of Step:
22 bit,
Speed:20
MB_MOVE_CMD 0x0000 bit
DIR:
1FW,0=RE Speed unit:
V step/tick
GO Home 0x25 5 Speed:20 Speed unit:
MB_GO_HOME_CMD 0x0000
bit step/tick

Operational Commands:

RUN:
Parameters Passed: unit of speed, Speed, Direction.
Slave Function Holding QTY of Byte Op-Code Data
Address Code ADDR Register Count
0x01 0x10 0x0025 0x0003 0x06 0x01 DIR Unit of Speed
Speed
Note:
 Unit of Speed:
Unit of Speed VALUE
0x00 RPM
0x01 RPH
0x02 MM_PER_SEC
 SPEED: Ranges from 5 to 4780 RPM.(Rotary Mode)
Ranges from 5 to 4780 RPM.(Linear Mode)
 DIR :
DIR VALUE
0x00 Clockwise
0x01 Counter clockwise
Example:
Command : 01,10,00,25,00,03,06,01,00,00,00,00,C8
01 -> Slave Address
10* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 03* -> Quantity of registers to be write in holding register
UM_MODBUS_v1.0 Dated: 020719

06* -> Total Byte count to be write in run command


01* -> Op-Code for RUN command
01 -> Counter clockwise direction
00 -> Speed is in RPM
00, 00, C8 -> total Speed value that is 200 rpm
(* indicates these values are fixed)

Response: 01,10,00,25,00,03

MOVE:
Parameters Passed: unit of speed, Speed, Direction, Movement type, Number of steps.
Slave Function Holding QTY of Byte Op-Code Data
Address Code ADDR Register Count
0x01 0x10 0x0025 0x0005 0x0A 0x02 DIR and Unit of Speed No. of
Movement Speed Steps
Type
Note:
 No. of Steps: 0 to 4194303 value
 Unit of Speed:
Unit of Speed VALUE
0x00 RPM
0x01 RPH
0x02 MM_PER_SEC
 SPEED: Ranges from 5 to 4780 RPM.(Rotary Mode)
Ranges from 5 to 4780 RPM.(Linear Mode)
 DIR :
DIR VALUE
0x00 Clockwise
0x01 Counter clockwise
Example:
Command : 01,10,00,25,00,05,0A,02,0C,00,00,00,C8,00,00,01,90
01 -> Slave Address
10* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 05* -> Quantity of registers to be write in holding register
0A* -> Total Byte count to be write in move command
02* -> Op-Code for MOVE command
0C -> Counter clockwise direction with movement type of Step input
00 -> Speed is in RPM
00, 00, C8 -> total Speed value that is 200 rpm
00,00,01,90 -> No. of steps (400 steps)
(* indicates these values are fixed)

Response: 01,10,00,25,00,05
UM_MODBUS_v1.0 Dated: 020719

GO_HOME:
Parameters Passed: unit of speed, Speed
Slave Function Holding QTY of Byte Op-Code Data
Address Code ADDR Register Count
0x01 0x10 0x0025 0x0003 0x06 0x03 n0x00 Unit of Speed
Speed
Note:
 Unit of Speed:
Unit of Speed VALUE
0x00 RPM
0x01 RPH
0x02 MM_PER_SEC

 SPEED: Ranges from 5 to 4780 RPM.(Rotary Mode)


Ranges from 5 to 4780 RPM.(Linear Mode)

Example:
Command : 01,10,00,25,00,03,06,03,00,00,00,C8
01 -> Slave Address
10* -> Function Code
00* -> LSB Address of Holding Register
25* -> MSB Address of Holding Register
00, 03* -> Quantity of registers to be write in holding register
06* -> Total Byte count to be write in run command
03* -> Op-Code for GO_HOME command
00 -> Speed is in RPM
00, 00, C8 -> total Speed value that is 200 rpm
(* indicates these values are fixed)

Response: 01,10,00,25,00,03

Auto cycle programming:


Following Section describe how to load program into LC Drive.
1. Each program can have 50 cycles.
2. Cycle type: RUN Cycle.
Delay Cycle.
Go Home Cycle.

The following table give the message format for auto cycle programming. This
message used to send one auto cycle program. We can send one by one cycle program to
device.
UM_MODBUS_v1.0 Dated: 020719

Parameter Add Register Number Defaul Range in Value of Register for


Name ress( of t Decimal configuration
1 Register Value
Byte (each (hex)
) Register
(hex) is 16 bit)
(0 to
FF)
Microstep Byte0: Next Cycle number.
and 0: Stop
Current 1 to 50 Next Cycle Number
values Byte 1:
will be bit: 1 0 Cycle Type
Send by 0 0 : RUN
Respectiv 0 1 : Delay
e 1 0 : Go_Home
command 1 1 : Reserved
through bit: 2 DIR
MODBU 0 CCW
S 1 CW
bit: 5 4 3 Movement Type with
Parameter Type
x 0 0 Linear Mode
0 0 1 Rotary Gear Mode with
Angle Input
0 1 0 Rotary Gear Mode with
Time Input
0 1 1 Rotary Gear Mode with
Step Input
1 0 1 Rotary Non-Gear Mode
with Angle Input
Auto Cycle 2A MB_AUTO_C1 8 1 1 0 Rotary Non-Gear Mode
with Time Input
1 1 1 Rotary Non-Gear Mode
with Step Input
bit : 7 Full step
0 More than 1 Microsteps.
1 Full step (Microstep - 1)
Byte 2: ACC: 1byte - Sec
Byte 3: DEC: 1byte - Sec
Byte 4, 5, 6 & 7:
Byte 4 - Unit of Speed
Bit 1 0
0 0 rpm
0 1 rph
1 0 mm/sec
1 1 reserved
RUN : 3 Byte Speed
Delay : 3 Bytes delay millisecond
Go-Home : 3 Byte Speed
Byte 8, 9, 10 & 11:
RUN: 4Byte - Linear - Distance
- Rotary -
Angle/Time/steps.
Delay: Ignore
UM_MODBUS_v1.0 Dated: 020719

Go-Home : Ignore
Byte 12 : Stop At Relay
bit 0 :
0 Direct
1 Relay
bit 1 - 3 : Relay No.
000 : SW1
001 : SW2
010 : SW3
011 : SW4
100 : SW5
101 : SW6
110 : SW7
111 : SW8
bit 4 : Relay Status
0 : OFF (stop when OFF)
1 : ON (stop when ON)
Byte 13 : Start At Relay
bit 0 :
0 Direct
1 Relay
bit 1 - 3 : Relay No.
000 : SW1
001 : SW2
010 : SW3
011 : SW4
100 : SW5
101 : SW6
110 : SW7
111 : SW8
bit 4 : Relay Status
0 : OFF (stop when OFF)
1 : ON (stop when ON)
Byte 14 : Output Coil Status
After Stop
bit 0 : OP1
bit 1 : OP2
bit 2 : OP3
bit 3 : OP4
bit 4 : OP5
bit 5 : OP6
bit 6 : OP7
bit 7 : OP8
0 : Low ,1 : High.
Byte 15 : Output Coil Status
After Start
bit 0 : OP1
bit 1 : OP2
bit 2 : OP3
bit 3 : OP4
bit 4 : OP5
bit 5 : OP6
bit 6 : OP7
bit 7 : OP8
0 : OFF ,1 : ON.
UM_MODBUS_v1.0 Dated: 020719

AUTO_CYCLE:
The below table contains message format used in Auto cycle programming.

Auto cycle message format:


Slave Address Function Code Holding QTY Byte Data
ADDR of Register Count
0x01 0x10 0x0025 0x0008 0x10 ------

Data Field:
Data

Next DIR & A D unit Speed No. of Start stop Start stop
Cycle Cycle Type & C E Of speed Steps At At At at
No. Movement type C C switch Switch o/p o/p

 DIR & Cycle Type :


DIR & VALUE
Cycle Type & Movement Type
Move Command Description
0x30 Clockwise move with steps
0x34 Counter Clockwise move with steps
0x10 Clockwise move with time
0x14 Counter Clockwise move with time
0x08 Clockwise move with Angle
0x0C Counter Clockwise move with Angle
0x00 Clockwise move with Linear
0x04 Counter Clockwise move with Linear
Delay command Description
01 delay
Go Home command Description
02 Go Home
Run Command Description
03 Run

 Next Cycle No : 2 to 50 Cycles (1 is default)


 ACC : 0.0 to 9.9 Second
 DEC : 0.0 to 9.9 Second
 Unit of Speed:
Unit of Speed VALUE
0x00 RPM
0x01 RPH
0x02 MM_PER_SEC
 Speed: Ranges from 5 to 4780 RPM.(Rotary Mode)
Ranges from 5 to 4780 RPM.(Linear Mode)

 No. of Steps: 0 to 4194303 values


 Start at switch / Stop at Switch :
Low polarity and high polarity values should be used in the command as shown in example.
UM_MODBUS_v1.0 Dated: 020719

Switch Start at switch


No Direct Switch
Low High
1 00 01 11
2 02 03 13
3 04 05 15
4 06 07 17
5 08 09 19
6 0A 0B 1A
7 0C 0D 1D
8 0E 0F 1F
 Output Status :
Start and stop Status of current cycle

Outputs Switch
Low High
1 00 1
2 00 2
3 00 4
4 00 8
5 00 10
6 00 20
7 00 40
8 00 80
Example:
Command for Cycle 1 for Move:
01,10,00,2A,00,08,10,02,30,02,02,00,00,00,64,00,00,01,90,11,13,00,00
01 -> Slave Address
10* -> Function Code
00* -> LSB Address of Holding Register for Cycle 1
2A* -> MSB Address of Holding Register for Cycle 1
00, 08* -> Quantity of registers to be write in holding register
10* -> Total Byte count to be write in AUTO command
02 -> Next Cycle No.
30 -> Move the motor with provided steps in clockwise direction
02 -> Acceleration
02 -> Deceleration
00 -> Speed in RPM
00, 00, 64 -> 100 Rpm in hexadecimal
00,00,01,90 -> 400 steps in hexadecimal value
11 -> Start the cycle at switch 1 high
13 - > Stop the cycle at switch 2 high.
00 -> No output
00-> No output
(* indicates these values are fixed)

Response: 01,10,00,2A,00,08
UM_MODBUS_v1.0 Dated: 020719

(********--------------------------------Instructions----------------------------------------********
The Holding Register address of next cycle number use following formula
Holding Register address = Holding Address of Cycle 1 + (Next Cycle No - 1)*8
Example:
Next Cycle No is 2
So,
Holding Register address for Cycle 2 = 2A + (2-1)*8
= 2A +8
= 32

Holding Register address for Cycle 47 = 2A + (47-1)*8


= 2A + 170
= 19A
*******-----------------------------------------------------------------------------------------********)
Command for Cycle 2 for Delay:
Delay is provided in millisecond
01,10, 00,32,00,08,10,03,01,00,00,00,00,07,D0,00,00,00,00,00,00,00,00
01 -> Slave Address
10* -> Function Code
00* -> LSB Address of Holding Register for Cycle 1
32* -> MSB Address of Holding Register for Cycle 2
00, 08* -> Quantity of registers to be write in holding register
10* -> Total Byte count to be write in AUTO command
03 -> Next Cycle No.
02 -> Delay Cycle
00 -> NA
00 -> NA
00 -> NA
00, 07, D0 -> 2000 (millisecond) in hexadecimal that is 2 Sec delay
00,00,00,00 -> NA
00-> Start cycle direct
00 -> Stop cycle direct.
00 -> No output
00-> No output
(* indicates these values are fixed)

Response: 01,10, 00,32,00,08

Command for Cycle 3 for GO_HOME:


01,10,00,3A,00,08,10,01,02,02,02,00,00,00,64,00,00,00,00,00,00,00,00
01 -> Slave Address
10* -> Function Code
00* -> LSB Address of Holding Register for Cycle 1
32* -> MSB Address of Holding Register for Cycle 2
00, 08* -> Quantity of registers to be write in holding register
10* -> Total Byte count to be write in AUTO command
01 -> Next Cycle No
02 -> GO_HOME Cycle
00 -> NA
UM_MODBUS_v1.0 Dated: 020719

00 -> NA
00 -> Speed unit in RPM
00, 00, 64-> 200 (RPM) in hexadecimal
00,00,00,00 -> NA
00-> Start cycle direct.
00 -> Stop cycle direct.
00 -> No output
00-> No output
(* indicates these values are fixed)

Response: 01,10,00,3A,00,08

Single Bit value Write registers :

Paramete Address(1 Register Number Default Range in Value of Register for


r Name Byte) of Value Decimal configuration
(hex)(0 to Register (hex)
FF) (each
Register
is 16 bit)
Bit 0: SW1
Bit 1: SW2
Bit 2: SW3
Relay RELAY Bit 3: SW4
0x01BA 1 0x00
Input STATUS Bit 4: SW5
Bit 5: SW6
0 : OFF Bit 6: SW7
1 : ON Bit 7: SW8

Function code Bit Address Relay State(OFF/ON)


0x05 0x0001 to 0x0007 0x0000 or 0xFF00

Example: SW1 is Made ON


Command : 01,05,00,01,FF,00
01 -> Slave Address
05* -> Function Code
00* -> LSB Address of Holding Register (Bit Address)
01* -> MSB Address of Holding Register (Bit Address)
FF,00 -> Value(State Of switch)

Response: 01,05,00,01,FF,00

Points to remember:
 All the Above values are in hexadecimal format.
 Speed can be in mm/sec in linear mode give specific unit.

You might also like