• 沒有找到結果。

回零模式的控制字

在文檔中 EtherCAT 使用手册 (頁 26-0)

4 基于分布时钟的网络同步

5.5 回零模式(HOMING MODE)

5.5.1 回零模式的控制字

15 ~ 9 8 7 ~ 5 4 3 ~ 0

* Halt * home_start_operation *

【备注】:* 参考前面章节

Name Value Description

Homing operation start

0 Homing mode inactive 0 → 1 Start homing mode 1 Homing mode active 1 → 0 Interrupt homing mode Halt 0 Execute the instruction of bit 4

1 Stop axle with homing acceleration 5.5.2 回零模式的状态字

15 ~ 14 13 12 11 10 9 ~ 0

* homing_error homing_attained * target_reached *

*: 参考前面章节

长沙工控帮教育科技有限公司

Name Value Description

Target reached 0 Halt = 0: Home position not reached

Halt = 1: Axle decelerates 1 Halt = 0: Home position reached

Halt = 1: Axle has velocity 0 Homing attained 0 Homing mode not yet completed

1 Homing mode carried out successfully Homing error 0 No homing error

1 Homing error occurred;

Homing mode carried out not successfully;

The error cause is found by reading the error code

5.5.3 回零模式相关参数

Index Object Name Type Attr.

607C h VAR home_offset INT32 RW

6098 h VAR homing_method INT8 RW

6099 h ARRAY homing_speeds UINT32 RW 609A h VAR homing_acceleration INT32 RW

home_offset

home_offset参数确定了参考点位置与零位之间的距离。

图5-2 回零模式示意图 Index 607C h

Name home_offset Object Code VAR Data Type INT32

Access RW

PDO Mapping YES Units position units Value Range --

Default Value 0

长沙工控帮教育科技有限公司

homing_method

有 4 种信号可作为回零信号:正限位开关、负限位开关、参考点开关和 C 脉冲。

Index 6098 h

Name homing_method Object Code VAR

Data Type INT8

Access RW

PDO Mapping YES

Units --

Value Range 1,2,3,4,17,18,19,20 Default Value 1

回零方式表格

方式 方向 目标位置 参考点位置 DS402

1 负 NOT C脉冲 1

2 正 POT C脉冲 2

3 负 参考点开关 C脉冲 3

4 正 参考点开关 C脉冲 4

17 负 NOT NOT 17

18 正 POT POT 18

19 负 参考点开关 参考点开关 19

20 正 参考点开关 参考点开关 20

35 -- 当前位置 当前位置 35

homing_speeds

找参考点需要 2 种速度:找参考点速度和找零位速度。

Index 6099 h

Name homing_speeds

Object Code ARRAY

No. of Elements 2

Data Type INT32

长沙工控帮教育科技有限公司

Sub-Index 01 h

Name speed_during_search_for_switch

Object Code VAR

Data Type INT32

Access RW

PDO Mapping YES

Units speed units

Value Range --

Default Value 0

Sub-Index 02 h

Name speed_during_search_for_zero

Object Code VAR

Data Type INT32

Access RW

PDO Mapping YES

Units speed units

Value Range --

Default Value 0

homing_acceleration

回零期间的加速度和减速度,均是 homing_acceleration。

Index 609A h

Name homing_acceleration

Object Code VAR

Data Type INT32

Access RW

PDO Mapping YES

Units acceleration units

Value Range --

Default Value 0

长沙工控帮教育科技有限公司

5.5.4 回零方法

方法 1:使用 C 脉冲和负限位开关

驱动器首先较快的向负方向移动,到达负限位开关(N-OT)才减速停止;然 后驱动器慢速返回,寻找目标零位位置。本回零方法的目标零位位置是离开限 位开关后编码器的第一个 C 脉冲位置。

方法 2:使用 C 脉冲和正限位开关

驱动器首先较快的向正方向移动,到达正限位开关(P-OT)才减速停止;然 后驱动器慢速返回,寻找目标零位位置。本回零方法的目标零位位置是离开限 位开关后编码器的第一个 C 脉冲位置。

方法 3 和 4:使用 C 脉冲和参考点开关

驱动器初始方向移动依赖于参考点开关状态。目标零位位置是参考点开关左边 或右边的第一个 C 脉冲位置。

长沙工控帮教育科技有限公司

方法 17 ~ 20:不使用 C 脉冲

这 4 种回零方法分别类似方法 1~4,只是目标零位位置不再使用 C 脉冲,而 依赖限位开关或参考点开关的变化。例,如下图所示方法 19 和 20 回零方法 分别类似方法 3~4。

方法 35 :当前位置为零点 当前位置即为系统零点。

长沙工控帮教育科技有限公司

5.6 速度控制模式(PROFILE VELOCITY MODE)

5.6.1 速度模式的控制字

15 ~ 9 8 7 ~ 4 3 ~ 0

* Halt * *

*: 参考前面章节

Name Value Description Halt 0 Execute the motion

1 Stop axle

5.6.2 速度模式的状态字

15 ~ 14 13 12 11 10 9 ~ 0

* MaxSlippageError Speed * Target reached *

*: 参考前面章节

Name Value Description

Target reached 0 Halt = 0: Target position not reached

Halt = 1: Axle decelerates 1 Halt = 0: Target velocity reached

Halt = 1: Axle has velocity 0 Speed 0 Speed is not equal 0

1 Speed is equal 0

Max slippage error 0 Maximum slippage not reached 1 Maximum slippage reached

5.6.3 速度控制模式相关参数

Index Object Name Type Attr.

6069 h VAR velocity_sensor_actual_value INT32 RO 606B h VAR velocity_demand_value INT32 RO 606C h VAR velocity_actual_value INT32 RO

长沙工控帮教育科技有限公司

609D h VAR velocity_window UINT16 RW 606E h VAR velocity_window_time UINT16 RW 606F h VAR velocity_threshold UINT16 RW 6070 h VAR velocity_threshold_time UINT16 RW 60FF h VAR target_velocity INT32 RW

velocity_sensor_actual_value

主站可以通过读 velocity_sensor_actual_value 参数确定电机当前转速,该参数单 位是内部速度单位。

Index 6069 h

Name velocity_sensor_actual_value

Object Code VAR

Data Type INT32

Access RW

PDO Mapping YES

Units 0.1rmps (1R/10min)

Value Range --

Default Value --

velocity_demand_value

主站可以通过读 velocity_demand_value 参数确定驱动器当前给定速度值,该参数 单位是用户速度单位。

Index 606B h

Name velocity_demand_value Object Code VAR

Data Type INT32

Access RO

PDO Mapping YES Units speed units Value Range --

Default Value --

velocity_actual_value

主站可以通过读 velocity_ actual _value 参数确定电机当前转速,该参数单位是用 户速度单位。

长沙工控帮教育科技有限公司

Index 606C h

Name velocity_actual_value

Object Code VAR

Data Type INT32

Access RO

PDO Mapping YES

Units speed units

Value Range --

Default Value --

velocity_window

velocity_actual_value(606C h)和 target_velocity(60FF h)的差值被定义为实 际速度误差窗口。如果实际速度误差窗口在 velocity_window_time(606E h)参数设置 的时间内一直比 velocity_window(606D h)小,那么 statusword 的 bit10

(target_reached)将被置位,表示设定速度到达。

Index 606D h

Name velocity_window Object Code VAR

Data Type UINT16

Access RW

PDO Mapping YES Units speed units Value Range --

Default Value 20 R/10min

velocity_window_time

velocity_window_time参数和 velocity_window 参数一起组成速度窗口比较器。

长沙工控帮教育科技有限公司

Index 606E h

Name velocity_window_time

Object Code VAR

Data Type UINT16

Access RW

PDO Mapping YES

Units ms

Value Range --

Default Value 0

velocity_threshold

velocity_threshold(阀值速度)指接近零速度的一个范围,用以判断电机是否停止.。

Index 606F h

Name velocity_threshold

Object Code VAR

Data Type UINT16

Access RW

PDO Mapping YES

Units speed units

Value Range --

Default Value 10 R/10min

velocity_threshold_time

velocity_threshold_time(阀值速度时间)设置电机在低于阀值速度时的最短时间,

单位:ms。当电机速度低于阀值速度的时间超过阀值速度时间时,状态字 bit12(速度 为零)将被置 1。

长沙工控帮教育科技有限公司

Index 6070 h

Name velocity_threshold_time

Object Code VAR

Data Type UINT16

Access RW

PDO Mapping YES

Units ms

Value Range --

Default Value 0

target_velocity

target_velocity是给定目标速度。

Index 60FF h

Name target_velocity

Object Code VAR

Data Type INT32

Access RW

PDO Mapping YES

Units speed units

Value Range --

Default Value 0

5.7 位置控制模式(PROFILE POSITION MODE)

5.7.1 位置模式的控制字

15 ~ 9 8 7 6 5 4 3 ~ 0

* Halt * abs / rel change set immediately

New

set-point *

*: 参考前面章节

长沙工控帮教育科技有限公司

Name Value Description

New Set-point 0 Does not assume target position 1 Assume target position

Change set immediately

0 Finish the actual positioning and then start the next positioning

1 Interrupt the actual positioning and start the next positioning

Abs/rel 0 Target position is an absolute value 1 Target position is a relative value Halt 0 Execute positioning

1 Stop axle with profile deceleration (if not supported with profile acceleration)

5.7.2 位置模式的状态字

15 ~ 14 13 12 11 10 9 ~ 0

* Following error

Set_point

acknowledge * Target reached *

*: 参考前面章节

Name Value Description

Target reached 0 Halt = 0: Target position not reached

Halt = 1: Axle decelerates 1 Halt = 0: Target position reached

Halt = 1: Velocity of axle is 0 Set-point

acknowledge

0 Trajectory generator has not assumed the positioning values (yet)

1 Trajectory generator has assumed the positioning values

Following error 0 No following error 1 Following error

5.7.3 位置控制相关参数

Index Name Type Attr. PDO

Mapping M/O

Index Name Type Attr. PDO Mapping

M/O

6084 h profile_deceleration UINT32 RW YES O 6085 h quick_stop_deceleration UINT32 RW YES O 6086 h motion_profile_type INT16 RW YES M

target_position

target_position是给定目标位置,该位置可以是相对值,也可以是绝对值,取决于 controlword的 bit6。

Index 607A h

Name target_ position

Object Code VAR

Data Type INT32

Access RW

PDO Mapping YES

Units position units

Value Range --

Default Value 0

profile_velocity

profile_velocity是指位置启动后,完成加速后最终到达的速度。

Index 6081 h

Name profile_velocity

Object Code VAR

Data Type UINT32

Access RW

PDO Mapping YES

Units speed units

Value Range --

Default Value 0

end_velocity

end_velocity是到达给定位置(target_ position)时的速度。通常为了在到达给定 位置时停止驱动器,该参数设置为 0;但在连续多点位置时,该值可以设置成非零值。

长沙工控帮教育科技有限公司

Index 6082 h

Name end_velocity

Object Code VAR Data Type UINT32

Access RW

PDO Mapping YES

Units speed units

Value Range -- Default Value 0

profile_acceleration

profile_acceleration是到达给定位置期间的加速度。

Index 6083 h

Name profile_acceleration

Object Code VAR

Data Type UINT32

Access RW

PDO Mapping YES

Units acceleration units

Value Range --

Default Value 100000 R/10min/s

profile_deceleration

profile_deceleration是到达给定位置期间的加速度。

长沙工控帮教育科技有限公司

Index 6084 h

Name profile_deceleration

Object Code VAR

Data Type UINT32

Access RW

PDO Mapping YES

Units acceleration units

Value Range --

Default Value 100000 R/10min/s

quick_stop_deceleration

quick_stop_deceleration是急停(Quick Stop)的减速度。

Index 6085 h

Name quick_stop_deceleration

Object Code VAR

Data Type UINT32

Access RW

PDO Mapping YES

Units acceleration units

Value Range --

Default Value 200000 R/10min/s

motion_profile_type

motion_profile_type被用来选择何种速度曲线。目前位置下只支持梯形速度曲线。

长沙工控帮教育科技有限公司

Index 6086 h

Name motion_profile_type

Object Code VAR

Data Type INT16

Access RW

PDO Mapping YES

Units --

Value Range 0

Default Value 0

5.7.4 功能描述

给定目标位置有两种方法:

单步设定

电机到达目标位置后,驱动器通知主机“目标位置到达”,然后获取新的目标 位置并开始运动。在获取新的目标位置前,电机速度通常为零。

连续设定

电机到达目标位置后,立即继续朝下一个事先设置好的目标位置运动。这样可 达到无停顿的连续运动效果,在两个目标位置之间,电机可以无需减速到零。

以上两种方法都可被控制字(controlword)的 bit4、bit5 和状态字 statusword 的 bit12(set_point_acknowledge)实时改变。通过握手机制,可中断正在执行中的位置 控制,利用这几个字位重设目标位置并启动执行。

单步设定方法的步骤:

1 首先设置网络管理状态为“操作(Operational)”,并且设置控制模式参数(6060

h)为 1。

2 根据实际需要设置给定目标位置(target_ position :607A h)等参数;

3 将控制字 controlword 的 bit4(new_set_point)设为“1”;bit5

(change_set_immediately)设为“0”;bit6(绝对/相对)则由目标位置类 型(绝对或相对)而定;

4 在状态字 statusword 的 bit12(set_point_acknowledge)设置好驱动器应答,

然后开始执行位置控制;

5 到达目标位置后,驱动器通过状态字 statusword 的 bit10(target_reached)

应答。然后依照程序继续运动或接受新的目标位置。

长沙工控帮教育科技有限公司

连续设定方法的步骤:

1 首先设置网络状态为“操作(Operational)”,并且设置控制模式参数(6060

h)为 1。

根据实际需要设置第 1 个给定目标位置(target_ position :607A h)、目标 速度、加/减速等相关参数;

2 将控制字 controlword 的 bit4(new_set_point)设为“1”;bit5

(change_set_immediately)设为“0”;bit6(绝对/相对)则由目标位置类 型(绝对或相对)而定;

3 在状态字 statusword 的 bit12(set_point_acknowledge)设置好驱动器应答,

然后开始执行位置控制;

4 设置第 2 个给定目标位置(target_ position :607A h)、目标速度、加/减速 等相关参数;

5 将控制字 controlword 的 bit4(new_set_point)设为“1”;bit5

(change_set_immediately)设为“0”;bit6(绝对/相对)则由目标位置类 型(绝对或相对)而定;

6 到达第 1 个目标位置后,驱动器不停机,继续走第 2 个目标位置控制;当到达 第 2 个目标位置后,驱动器通过状态字 statusword 的 bit10(target_reached)

应答。然后依照程序继续运动或接受新的目标位置。

长沙工控帮教育科技有限公司

5.8 位置插补控制模式(INTERPOLATION POSITION MODE)

位置插补模式用在多轴协调控制或单轴位置插补运算控制中。该种模式利用时间同 步机制作为相互运动关联的伺服单元的时间轴,实现多轴协调同步运动。插补数据随着 插补周期更新。内部插补依据该插补周期进行。插补数据为绝对位置值,插补周期与同 步信号周期相同。

5.8.1 位置插补模式的控制字

15 ~ 9 8 7 6 5 4 3 ~ 0

* Halt * * * Enable ip mode *

*: 参考前面章节

Name Value Description

Enable ip mode 0 Interpolated position mode inactive 1 Interpolated position mode active Halt 0 Execute the instruction of bit 4

1 Stop axle

5.8.2 位置插补模式的状态字

15 ~ 14 13 12 11 10 9 ~ 0

* * ip mode active * Target reached *

*: 参考前面章节

Name Value Description

Target reached

0 Halt = 0: Target position not (yet) reached

Halt = 1: Axle decelerates 1 Halt = 0: Target position reached

Halt = 1: Velocity of axle is 0 ip mode active 0 Interpolated position mode inactive

1 Interpolated position mode active

5.8.3 位置插补控制相关参数

Index Object Name Type Attr.

60C0 h VAR Interpolation sub mode select INT16 RW 60C1 h ARRAY Interpolation data record INT32 RW 60C2 h RECORD Interpolation time period RW

Interpolation sub mode select

Interpolation sub mode select是IP控制下的插补方式选择,EDC的插补方式只提供 线性插补。

长沙工控帮教育科技有限公司

Index 60C0h

Name Interpolation sub mode select Object Code VAR

Data Type INT16

Access RW

PDO Mapping NO Value Range 0 Default Value 0

Comment

0: Linear interpolation

Interpolation data record

Interpolation data record存放插补位置数据,本伺服驱动器的插补指令使用第一个 数据,即 subindex 为 1 的数据。

Index 60C1h

Subindex 0

Object Code ARRAY

Data Type INT32

Access RO

PDO Mapping YES

Value Range INT8

Default Value 2

Comment number of entries

长沙工控帮教育科技有限公司

Index 60C1h

Subindex 1

Object Code ARRAY

Data Type INT32

Access RW

PDO Mapping YES

Value Range INT32

Default Value 0

Comment the first parameter of ip function

Index 60C1h

Subindex 2

Object Code ARRAY

Data Type INT32

Access RW

PDO Mapping YES

Value Range INT32

Default Value 0

Comment The second parameter of ip function

Comment The second parameter of ip function

在文檔中 EtherCAT 使用手册 (頁 26-0)

相關文件