Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

Motion Control Quick Start (16-2) | EtherCAT Servo Drive Parameters Configuration

Welcome back.

Zmotion shared the first part  knowledge on EtherCAT bus motion control, here, let's continue,   "How to Initialize EtherCAT Bus Controller" .

Let's begin.


Here, take WIN10 as the example.

control panel -- Internet -- Internet & Share Center -- Ethernet -- "Property"

Then, in property window, find Internet protocol version 4 (TCP/IPv4), now, it can be configured freely. When it is modified, remember to click "OK".

Then, open ZDevelop -- Connect to Controller window, select correct IP to connect again.


3
EtherCAT Servo Drive Parameters Configuration

(1) Communication Period



Generally, EtherCAT servo drive supports different cycles, 250us, 500us, 1ms, 2ms and 4ms . When connecting, it automatically matches the controller cycle. And it is necessary to ensure that the controller and the servo cycle are consistent. When auto-matching fails, which means they can not communicate, please upgrade controller firmware to modify controller cycle.

Usually, controller default cycle is 1ms. And specific controller period can be read by "SERVO_PERIOD".

The smaller the servo period, the finer the position control and the faster the response.


(2) Drive PDO Setting



The full name of PDO is Process Data Object , which refers to periodical data interaction between the master station and the slave station in the EtherCAT bus network. It can be regarded as an array, different function codes are saved in each array element, then PDO executes corresponding operations in one cycle. Then these function codes are called as data dictionaries that are represented by 4-digit hexadecimal.

9.png

PxPDO: data is transferred to slave station from master station.

TxPDO: data is transferred to master station from slave station.

For EtherCAT, controller is the master station, the servo driver is the slave station.

For example, 6040h control word (used to control servo axis, such as, enable, on, off, alarm, reset, etc.), and each data dictionary Index includes 32 Sub-Index. For functions and initial values of data dictionary, please refer to drive manual.

10.png

Actually, data dictionary No. and functions are determined. And all standard EtherCAT devices use the same data dictionary, only "bit" needs to be set.

And during the EtherCAT initialization, drive PDO configuration must be done.

There are more than 20 kinds of settings for drive PDO, for Zmotion EtherCAT controller, use "DRIVE_PROFILE"instruction. Please refer to "ZBasic Program Manual".

11.png

DRIVE_PROFILE=-1 indicates driver's inner default PDO list, and specific data dictionaries of inner PDO can be obtained from driver manual.

If the existing configuration of DRIVE_PROFILE cannot meet the requirements, customize the PDO, that is, use SDO related commands to operate the data dictionary to set required PDO. Including corresponding parameters modification, SD0 instruction can read it then configure, or through drive software.

SDO command:

-- data dictionary reading --

SDO_READ (slot No., device No., data dictionary No., data dictionary subNo., data type, data position in TABLE)

SDO_READ_AXIS (axis No., data dictionary No., data dictionary subNo., data type, data position in TABLE)

-- Data dictionary writing --

SDO_WRITE (slot No., device No., data dictionary No., data dictionary subNo., data type, data value to be written)

SDO_WRITE_AXIS (axis No., data dictionary No., data dictionary subNo., data type, data value to be written)

If you want to know how to customize PDO, please contact us.


(3) Drive Parameters Setting



How to set / modify driver's parameters?

--steps--

a. connect to the driver through USB cable or WLAN, here, connect PC USB to driver X1

b. power ondriver

c. open Panasonic driver software PANATERM

d. a window pops up, select "communicate with driver through USB", drive information will be obtained and displayed in the window automatically, then click "OK".

e. it is time to set parameters for the drive: click "D display" -- "Object Editor", find required data dictionary, then directly modify in "Setting Value".

f. when modified, transfer parameter to driver, and write it into driver EEPROM.

g. power on driver again, parameter takes effect.

--an example: set UNITS pulse amount--

UNITS means pulse amount, that is, how many pulses are sent when motor rotates one circle.

And other basic parameters, SPEED, ACCEL, DECEL and motion commands all take "UNITS" as basic unit.

From below, set electronic cam ratio through data dictionary 6091h, set the molecular through 6091h-01h, and set denominator through 6091h-02h. Now, the electronic cam gear is 1/1, 6092h-01h sets as 10000, which means 10000 pulses sent by motor in one revolution, then corresponding UNITS is 10000. And MOVE(2) means 20000 pulses, motor will rotate 2 circles.

12.png

--another method--

Use SDO command:

SDO_(Bus_Slot, iNode, $6091, 1, 7, 1)        'electronic gear ratio numerator

SDO_(Bus_Slot, iNode, $6091, 2, 7, 1)        'electronic gear ratio denominator

SDO_(Bus_Slot, iNode, $6092, 1, 7, 10000)    'the number of pulses of motor in one round

When modified, use drive software to read 6092h-01h value, and it will be 10000.


(4) Driver IO Signals



Drive has own IN signals for protection, and they are ON by default. If no external signals are connected, driver will alarm. Therefore, it is more convenient to debug when they are OFF, setting as 0 to close them. And please note it needs to map IO No. before using, then connect to actual signals.

--how to set / modify IO signal--

Click "Parameter" in PANATERM main interface, select needed IO signal, then modify directly in "Setting Value".

--how to map drive IO--

It needs PDO that includes data dictionary 60FDh, then use DRIVE_IO command to set drive IO address.

DRIVE_IO (axis No.) = IO starting No.

For example:

DRIVE_PROFILE (iAxis) = 5          'set PDO mode that is with IO map

DRIVE_IO (iAxis) = i_IoNum        'set drive input / output IO starting number

Note: drive mapping IO No. range and other bus devices' IO No. can't repeat.


(5) Write Parameters into Drive



As mentioned above, when parameters are set, click "transfer" firstly, then click "EEPROM".

When power on again, values take effect, and modifies are recorded.


(6) Map Drive Axis No.



For drives connected on EtherCAT bus, it needs AXIS_ADDRESS command to map drive axis No.

Generally, device No. of connected devices on EtherCAT bus are numbered automatically from 0 according to connection sequence, drive No. is the same.

When mapped, use BASE command to select drive axis No. and send pulses to control motions of connected motors.

This axis mapping operation is edited in the bus initialization program, that is, after the bus scanning and before the bus opening.

--how to use AXIS_ADDRESS--

AXIS_ADDRESS (axis No.) = (slot No. <<16) + drive No. + 1

a. axis No, means the target axis No. to be mapped, while mapping, each drive's axis No. are not the same.

b. EtherCAT bus slot No. is 0

c. example:

AXIS_ADDRESS (6) = (0<<16) + 0 + 1      'the first ECAT drive, drive No. is 0, bind as axis 6

AXIS_ADDRESS (7) = (0<<16) + 1 + 1      'the second ECAT drive, drive No. is 1, bind as axis 7

AXIS_ADDRESS (8) = (0<<16) + 2 + 1      'the third ECAT drive, drive No. is 2, bind as axis 8

ATYPE (6) = 65          'set as ECAT axis type, 65 - position, 66 - speed, 67 - torque

ATYPE (7) = 65

ATYPE (8) = 65


(7) Drive Control Mode



There are 3 control modes for EtherCAT driver, CSP period position mode, CSV cycle velocity mode and CST cycle torque mode.

Mode is set by ATYPE value. Please refer to below ATYPE value form.

13.png

Before that, it needs to set PDO firstly. When there is PDO and it includes below data dictionary, modes can be switched directly through modifying ATYPE.

a. when PDO includes 607Ah, set ATYPE as 65 to switch to CSP mode , then motor motion can be controlled by motion command.

b. when PDO includes 60FFh, set ATYPE as 66 to switch to CSV mode , then motor will run at set speed through DAC command. For speed unit, pulses/S or R/MIN, this is determined by driver. It is recommended to set a smaller value at first, then make it bigger when needed.

c. when PDO includes 6071h, set ATYPE as 67 to switch to CST mode , then motor will run at set torque through DAC command. DAC can be set as 0-1000, which corresponds to 0-100% 6071 setting values, for example, DAC is 10, motor torque = 1% 6071h value.

Note: when switching speed mode and torque mode, firstly set DAC as 0, then modify ATYPE.

Then, let's see one by one.

--CSP position mode: ATYPE = 65--

Configure DRIVE_PROFILE as mode 1 that is with speed, ATYPE = 65 . And set running parameters for axis after initialized. Then send pulses to control motion through command, while running, please do not set a large value for SPEED.

This mode is used widely, running effect can be viewed in end of this article.

--CSV velocity mode: ATYPE = 66--

Configure DRIVE_PROFILE as mode 22 that is with speed, ATYPE = 66. Then, send DAC command to control motor operation after initialized. For example, DAC=5000 means that motor runs continuously at the speed of 5000pulses/s. Sometimes small DAC may be hard to overcome friction, then cause the motor can't work normally, at this time, it only needs to set a bigger DAC to enhance the running speed. But for safety, please a small value first, according to specific needs, then adjust DAC.

If you need to stop motion, send DAC = 0, or press emergency stop button in ZDevelop.

--CST torque mode: ATYPE = 67--

Configure DRIVE_PROFILE as mode 30 that is with torque, ATYPE = 67. The same as CSV mode, send DAC command to control motor operation after initialized. For example, DAC=30 means that the current drive is 3% torque, DAC=1000 means 100% torque. Also, please attention DAC value setting. And DAC = 0 and emergency stop button can stop motion.


(8) Drive Alarm



If there is an error, it will report an error message on drive LED plane and show error code.

--how to check--

There are two ways to find errors and solve them.

a. according to drive manual, find one by one

14.png

b. open "alarm" window in drive software, current alarms and history alarms both are shown

--how to correct--

a. In the initialization process, clear drive errors according to axis No.

b. If there are multiple drive errors, call DRIVE_CLEAR command in cycle.

DRIVE_CLEAR (mode value)

mode value 0: clear current alarm

mode value 1: clear history alarm

mode value 2: clear external input alarm

For example:

BASE (i)

DRIVE_CLEAR (0)       'clear drive errors

DELAY 50

DATUM (0)                 'clear controller axis status errors

DELAY 100


(9) Drive Homing



For EtherCAT bus homing, through controller mode DATUM (mode) or drive mode.

Controller homing mode uses DATUM (mode) command, please refer to ZBasic programming manual.

Drive homing mode uses DATUM (21, mode 2) command, please refer to drive manual data dictionary 6098h - below figure. Fill corresponding Value for mode 2, the default value is 0. Please attention current origin position limit and other signals are connected to drive, which means drive IP mapping is needed while drive homing.

15.png

For Example: run drive homing program after initialization

BASE (iAxis)         'homing axis No. by axis No.

AXIS_STOPREASON = 0

SPEED = 100       'homing speed

CREEP = 10         'reverse speed

ACCEL = 1000

DATUM (21, 2)     'drive homing mode value = 2

WAIT IDLE

IF AXIS_STOPREASON = 0 THEN

    ?"homing succeeds"

ELSE

    ?"homing fails", "stop reason: ", AXIS_STOPREASON, "status word 0x", HEX(DRIVE_STATUS)

ENDIF




2013-2024 版权所有 Zmotion Corp. Copyright Reserved 粤ICP备13037187号-1