<

Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

Four Things For ZMotion EtherCAT Bus Motion Controller Application (2)

Happy new year, and have a nice day.

Before, we learn “Four Things For ZMotion EtherCAT Bus Motion Controller Application (1)".

Now, let’s continue to learn together.





EtherCAT Servo Drive Parameters Configuration


01
electronic gear ratio application

The electronic gear ratio of the servo motor is that the servo amplifies or reduces the received controller pulse frequency, one of which is the numerator and the other is the denominator.When the ratio of numerator to denominator is greater than 1, it is zooming in, and if the ratio is less than 1, it is zooming out. When the ratio is equal to 1, the number of pulses received by the motor is equal to the number of pulses sent by the controller.

Calculation formula: The actual number of pulses received by the motor = the number of pulses sent by the controller * electronic gear ratio

For example: the controller sends out 10,000 pulses, the numerator of the electronic gear ratio is set to 1, the denominator is set to 2, and the electronic gear ratio is 0.5, then the actual operation of the servo is carried out according to 5,000 pulses. If the numerator of the electronic gear ratio is set to 2, the denominator is set to 1, and the electronic gear ratio is 2, then the actual operation of the servo is carried out according to 20,000 pulses.

The electronic gear ratio of the Panasonic driver is valid in the range of 1000-1/1000.

And the electronic gear ratio is set through the ratio of the sub-dictionary 01h and 02h of the data dictionary 6091h. 6091h-01h sets the numerator of the electronic gear ratio, and 6091h-02h sets the denominator of the electronic gear ratio.

image 15.png

The sub-dictionary 01h of the data dictionary 6092h is used to set the number of pulses required for one rotation of the motor. Generally, it is set according to the resolution of the encoder. The default value of the sub-dictionary 02h of the 6092h is 1.

image 16.png

The relevant parameters of the drive such as the electronic gear ratio can be modified directly through the drive software, or using the SDO command to read and write the corresponding data dictionary for configuration.

--through drive software--

To modify the driver parameters, firstly, connect to the drive through a USB cable or WLAN. For USB cable, which is used to connect the computer to the X1 port of the drive, power on the drive, then open the Panasonic drive software PANATERM, "choose to communicate with the driver" window will pop up. At this time, choose to communicate with the drive after connecting via USB, the drive information is automatically obtained and displayed in the window, click OK to connect successfully, and the drive can be set.

image 17.png

Click "Display" → "Object Editor" in the menu bar to open the following window, find the data dictionary that needs to be set, and directly modify the content of the data dictionary in the "Setting Value" column.

After the modification is completed, the parameters will be sent to the drive and written into the EEPROM of the drive. The parameters will take effect after the drive is powered on again.

In the figure, the electronic gear ratio is 1:1, and the number of pulses per revolution of the motor is 10,000.

image 18.png

--through SDO instruction--

The SDO command includes data dictionary reading SDO_READ, SDO_READ_AXIS and data dictionary writing SDO_WRITE, SDO_WRITE_AXIS.

data dictionary reading grammar:

SDO_READ (slot number, device number, data dictionary number, data dictionary subnumber, data type, read data storage TABLE position)

SDO_READ_AXIS (axis number, data dictionary number, data dictionary subnumber, data type, read data storage TABLE position)

data dictionary writing grammar:

SDO_WRITE (slot number, device number, data dictionary number, data dictionary subnumber, data type, write data value)

SDO_WRITE_AXIS (axis number, data dictionary number, data dictionary subnumber, data type, write data value)

image 19.png

When instruction is modified, check drive parameters:

image 20.png







02
Read multi-turn encoder value

When the drive has a multi-turn absolute value encoder, the original value of the encoder hardware register can be read through "ENCODER" instruction, which is the multi-turn absolute value. And this parameter is a read-only type. It can only be read when configured as an ATYPE that requires the use of an encoder.

Clear the ENCORDE value to zero after the drive restarts.

?*ENCODER    'print the encoder value of each axis, the initial value is 0 when the drive is powered on

?ENCODER(0)    'print single axis encoder value

?ENCODER AXIS(0)    'print single axis encoder value

As shown in the figure below, use the EtherCAT drive with encoder feedback, control axis 0 to move forward continuously to MOVE (500), and at this time, the total number of pulses sent = UNITS*DPOS=100*500=50000.

image 21.png

The ENCORDE command reads the value of the multi-turn absolute encoder of the drive, which is equal to the total number of received pulses detected by the encoder 50000.

At this time, if DPOS and MPOS are changed, the value of ENCORDE will not change, because the motor will not move when coordinate is changed, and the number of pulses received by the encoder will not change.

image 22.png

Because the absolute value of multi-turn is read, the ENCORDE value decreases for negative direction movement and increases for positive movement ENCORDE value.

image 23.png

Through Panasonic drive software, absolute encoder can be set.

Set it through parameter Pr0.15.

image 24.png

Pr0.15 parameter selection description:

3 set values are described followingly, and the default value of the above example is 1, which is used as incremental encoder.

image 25.png






03
Driver IO operation

Read drive input "IN" and output "OP".

Use the DRIVE_IO command to map the starting IO numbers of 60FDh driver IO input and 60FEh driver IO output in the driver object dictionary.

After the driver maps the IO signal, it can control the IO signal of the driver according to the number, and the IO signal output can be controlled by the OP command.

image 26.png

The value of the Bit is set to 1 for ON, and 0 for OFF.

Driver IO mapping example: mapping positive and negative limit signals

The input can be mapped normally only after the correct DRIVE_PROFILEE or PDO is set, that is, the DRIVE_PROFILE drive PDO configuration mode contains two data dictionaries, 60FDh and 60FEh.

image 27.png

In drive "parameter" window, find parameter sort 4, then operate IO signals of driver, see below image:

image 28.png






04
Driver homing

The EtherCAT bus can use the homing method DATUM (mode) provided by the controller. For the mode value selection, refer to the DATUM command in the ZBasic programming manual. Also, the EtherCAT bus can use the homing mode of the drive itself.

The drive itself uses the DATUM(21, mode2) command to return to zero. For the mode value of mode 2, you need to check the data dictionary 6098h in the drive manual. Please note that the origin limit and other signals should be connected to the driver at this time, so when using the driver to return to zero, it is necessary to map the IO of the driver.

image 29.png

For example:

After the initialization is completed, run the zero return program of the drive. According to the example in the previous section, map the limit signal and origin signal of the drive to the IO of the controller, and then run the following zero return program.

image 30.png






05
Real-time read torque

When the PDO contains the data dictionary 6071h (target torque), ATYPE can be set to 67, cycle torque mode, at this time, use the DAC command to control the motor to run at the torque of the set value, and the DAC value range is 0-1000, corresponding to 0-100% of the DAC, for example, the value of DAC=10, now, the motor torque=1% of the torque value.

In torque control, the unit of DAC is one thousandth, and when it is equal to 1000, which means 100% torque, and the value at this time is equal to the value of data dictionary 6072h (set maximum torque).

Note that when switching between speed mode and torque mode, first set DAC=0, and then modify ATYPE to prevent accidents.

The value of the SDO read data dictionary 6071h is the value of the target torque, that is, the value of the currently sent DAC. When no DAC command is sent, the value of 6071h is 0. Generally, the value range of current torque 6071h is the setting value of 0-6072h.

image 31.png

For example: ATYPE = 67 torque mode

DAC=40

SDO_READ(0,0,$6071,0,3,0)  'read the target torque of axis 0, the value of TABLE(0) becomes 40

image 32.png

The drive torque can be read when the configured DRIVE_PROFILE contains the data dictionary 6077h, using the DRIVE_TORQUE command to read the torque of the current axis, or using the SDO_READ command to directly read the value of the data dictionary 6077h to obtain the current torque, there may be fluctuations with the value of the target torque, and what is read is the size of the real-time value.

Example:

?DRIVE_TORQUE(0)     'print the torque of axis 0

The data dictionary 6077h is used to read the value of the current moment.

SDO_READ(Bus_Slot,iNode,$6077,0,3,0)    'read the current torque and save it to TABLE(0)

image 33.png






06
Applications of torque limitation

Torque control is used in printing machines, winding machines, injection molding machines, etc. When using the EtherCAT bus, the torque output by the motor is proportional to the value input by the DAC command.

In order to protect the machine, the output torque can be limited. The maximum torque of the motor is set by 6072h, and the factory default value is 10.

image 34.png

During torque control, the torque output of the motor is controlled by the DAC command, but the speed of the motor is not controlled. Therefore, under light load, overspeed may occur. In order to protect the machine, the speed must be limited.

The data dictionary 6072h is used to set the maximum torque of the motor. The value of 6072h is set to 1000, which means 100% of the rated torque, if set to 500, it means 50% of the rated torque. And it is supported in several different modes of EtherCAT. For example, in the position mode, the maximum allowable torque can be set, and the motor is controlled by using motion commands such as MOVE. At this time, the motor moves at the speed of "SPEED". If the target position is set larger, when encountered an obstacle, the speed is limited, and only the set maximum torque can be issued.

SDO instruction reading example:

SDO_READ(0,0,$6072,0,3,0)    'save the read data to TABLE(0), the value is 5000

image 35.png







Copyright © 2013-2024 Shenzhen Zmotion Technology Co.,Ltd Design by Zmotion    粤ICP备13037187号 Motion Controller-Motion Control Card

Contact Us-Youtube