轴电机运动管理命令
- ENABLE &DISABLE
Enable命令激活一个或多个电机和轴
Disable命令关闭一个或多个电机轴。
错误码存储在MERR中,可以用FCLEAR来清除
只要是电机是使能的,控制器器提供下面工作:
1)保持ENA电机在激活状态
2)计算PE(非关键性的位置错误)
3)执行闭环控制(对于伺服电机)
4)检查PE的条件和其它错误,在需要的时候,将相应的错误位置1
下面的变量/位能够改变Enable命令的执行行为
ENTIME | Defines the time (or maximum time) of ENABLE execution |
MFLAGS.#ENMOD | Defines the mode of ENABLE execution |
FMASK.#DRIVE | Defines if the drive alarm fault is processed |
SAFINI.#DRIVE | Defines an active level of the drive alarm safety signal |
当MFLAGS.#ENMOD位是1时候
ENTIME 值定义了enable执行的时间。当执行Enable命令,ACSPL+程序总是等待ENTIME毫秒,然后查看驱动报警错误码是否是0,如果是0,认为Enable命令执行成功,否则Enable命令执行失败。
当 MFLAGS.#ENMOD位是0时候
ENTIME 值定义了enable执行的最大时间。执行Enable命令时候,一个ACSPL+程序监控驱动警告信号输入。只有驱动的警告信号不再激活,就认为Enable命令执行完成。如果在ENTIME毫秒内,驱动的ALARM信号一直在激活状态,说明ENABLE命令执行失败。
语法:
ENALBE axis_specification
DISABLE axis_specification[,reason]
例子,
ENABLE 0 Enable axis 0
ENABLE (2,3) Enable axes 2 and 3
DISABLE 2,5011 Disable axis 2, store 5011 as a disable reason. Code 5011 corresponds to left limit error, therefore the 2 axis motor will be
reported as disabled due to fault involving left limit.
DISABLE (2,3) Disable motors of axes 2 and 3
- COMMUT
COMMUT执行自动换向功能,在下面条件成立时候,才生效:
a)电机是直流无刷电机或交流伺服电机
b)电机是使能的
c)电机处于Idle,也就是不在移动状态
语法:
COMMUTaxis, [excitation_current,] [settle_time,] [slope_time][gantry_commut_delay]
参数
axis | Specifies the motor to start commutation. |
excitation_current | Specifies the motor current used during autocommutation. The current is specified in a percentage of the maximal value. The controller restricts the actual current value by the XCURI value. The argument can be omitted in which case the default value is 0.98*XRMS. You may wish to specify a greater value if the axis static friction is high, or a lower value if the axis static friction is low. |
settle_time | Specifies the settling time in the autocommutation process in milliseconds. The argument can be omitted in which case the default value is 500 milliseconds. You may wish to specify a greater value in case of low-bandwidth or slow damping systems. |
slope_time | Specifies the time that the excitation current rises from zero to the desired value. The argument can be omitted in which case the default value is 0 providing an immediate build-up of the excitation current. Slope time is required only in special cases and it is usually recommended to omit this argument in which case the excitation current is built instantly. |
gantry_commut_delay | Optional – can be used only in Gantry mode. It defines the delay time in milliseconds after the commutation of the primary axis is completed and before the commutation of the complimentary axis begins. The default value is 500 msec. |
如果是空气轴承系统,EXCITATION_CURRENT设置低一些
如果是摩擦阻力大的系统,EXCITATION_CURRENT设置高一些
- KILL 和
KILL命令将终止一个或多个轴的停止,减速度由KDEC设定
KILLALL命令终止所有轴的动作。
语法:
KILL axis_specification [,cause]
KILLALL [,cause]
下面例子演示了不同情况下的KILL执行。
a) KILL命令,电机状态Idle
假设当前运动没有不包含2轴电机。
KILL 2不会影响任何运动
KILL 2, 6100也不会影响电机运动,但会存储6100错误码到MERR(2)中
b)KILL命令,单轴运动,默认connection
假设当前电机轴1执行运动PTP/V 1, 6000,
KILL 1,命令执行的话,电机开始从当前速度开始减速,减速度放在KDEC(1)中,减速时间=V1/KDEC(1)
c)KILL命令,多个单轴运动,默认connection
假设轴0,2,4执行独立的单轴运动。
KILL (0,2,4), 6088 效果等同于KILL 0,6088;KILL 2,6088; KILL 4, 6088
他们执行是独立的,根据各轴的即时速度,与减速度不一样,时间也可能不一样。
d)KILL命令,多轴运动,默认connection
假定运动MPTP(0,1,4)在执行
KILL 1, KILL (1,4), KILL(0,1,4)都会将三轴停下来。
e)KILL命令,非默认connection
CONNECT RPOS(2) = APOS(0) + APOS(2) - APOS(4)
DEPENDS 2,(0,2,4)
在这种情况下,KILL 2 将停下0,2,4三轴。
- FCLEAR
FLCEAR命令清除当前故障和先前存在MERR中的故障码,
语法:
FCLEAR[axis_specification]
如果轴指定了,则清除当前轴的错误码,FAULT和MERR
如果指定关键字ALL,则清除所有轴的错误
如果省略指定轴,则清除系统故障
- SET
语法:
SET axis_VAR =expression
FPOS | Feedback Position |
F2POS | Secondary Feedback Position |
RPOS | Reference Position |
APOS | Axis Reference Position |
SET FPOS(0) = 0
一般情况下,FPOS = RPOS,但有不是0误差的情况,比如
?RPOS(0), FPOS(0) Query RPOS and FPOS for the 0 axis
6000 The RPOS and FPOS differ by 2 counts due to, for instance, the bias in the amplifier
6002
SET RPOS(0) = 0 Set RPOS to 0 for the 0 axis
?RPOS(0), FPOS(0) Query RPOS and FPOS for the 0 axis
0 RPOS is set to exact zero
2 FPOS is set to 2 in the current point in order to retain the offset between RPOS and FPOS
SET FPOS(0) = 0 Set FPOS to 0 for the 0 axis
?FPOS(0), RPOS(0) Query RPOS and FPOS for the 0 axis
0 FPOS is set to zero in the current point
-2 RPOS is set to -2 in order to retain the offset between RPOS and FPOS
SET F2POS(0) = 0
- GROUP,SPLIT和SPLITALL
GROUP,SPLIT和SPLITALL管理多轴运动中的轴,将这些轴组合在同一个坐标系统。用SPLIT, 与SLITALL命令将它们在解组分开。
语法:
GROUP axes_specification
SPLIT axes_specificaiton
SPLITALL
例子,
GROUP (0,2,3)
创建了一个轴的群组,里面包含轴0,2,和3
- GO
GO命令启动一个运动,创建时用/w开关,如果创建运动时没有/w,就会自动启动,不需要GO命令
语法:
GO axes_specification
例子,
a)启动单轴运动
PTP/w 0, 1000 Create the motion, but do not start it
GO 0 Start the motion
b)启动一般运动
PTP/w 0, 1000 Create the motion, but do not start it
TILL IN0.1 Wait until input 1 is activated
GO 0 Start the motion
c) 同步几个运动的启动
PTP/w (0,1), 1000,1000 Create the motion, but do not start it
PTP/w 2, 8000 Create the motion, but do not start it
GO (0,1) Start both motions synchronously
- HALT
停止一个运动
语法:
HALT axes_specification
可以停止:单轴运动,组群轴的运动,多个运动
- BREAK
BREAK命令常用在停止一个运动转到另一个运动情形下。
语法:
BREAK axes_specification
可以终止:单轴运动,多轴运动,多个运动。
- IMM
IMM命令可以提供一个在线飞行的运动参数改变:速度,加速度,减速度,抖动,杀死减速度。
语法:
IMM motion_Var = command
VEL | Velocity |
ACC | Acceleration |
DEC | Deceleration |
JERK | Jerk |
KDEC | Kill deceleration |
与赋值命令ASSIGNMENT不同的是,它是即时改变运动状态。
IMM命令必须改变的是一个单轴运动的轴变量或轴群组的首轴的参数。
- 点到点运动
- PTP
- SPTP
- Move和Settle时间的计算
- MPTP,POINT,MPOINT 和ENDS
- GRTIME变量
- 模态轴
- 运动增强
- Jog命令
- Track命令
- 分段运动
- 扩展分段运动
- 混合分段运动
- 两轴例子
- 主从运动
- 路径Path命令
- 样条运动
- 多轴点到点运动
- 光滑曲线路径
- NURBS
- 开环操作(扭矩控制)
- 步长速度规划
- 局部坐标系统
标签:RPOS,编程,FPOS,ACS,命令,ACSPL,KILL,运动,axis From: https://blog.51cto.com/u_14596820/7799077