TwinCAT NC PTP 运动控制详解 V14_缩简版
第 2页 共 100 页 2010-6-25
本文纯属个人经验,非 Beckhoff 公司正式发行,如有疑问,请直接联系作者。
4 编写 NC 单轴控制的 PLC 程序...........................................................................................49
4.1 准备工作.....................................................................................................................49
4.1.1 引用引用 TcMc.lib .........................................................................................49
4.1.2 声明 PLC_TO_NC 及 NC_TO_PLC 类型的变量.........................................49
4.1.3 写 PLC 程序 ...................................................................................................50
4.2 轴的管理.....................................................................................................................51
4.2.1 使能 MC_Power ............................................................................................51
4.2.2 复位 MC_Reset..............................................................................................52
4.2.3 读取当前位置 MC_ReadActualPosition.......................................................52
4.2.4 设置当前位置 MC_SetActualPosition..........................................................52
4.3 轴的动作.....................................................................................................................53
4.3.1 匀速运动 MC_MoveVelocity.........................................................................53
4.3.2 绝对定位 MC_MoveAbsolute........................................................................53
4.3.3 相对定位 MC_MoveRelative.........................................................................53
4.3.4 点动 MC_Jog..................................................................................................54
4.3.5 停止 MC_Stop ................................................................................................54
4.3.6 模长内定位 MC_MoveModulo......................................................................56
4.4 寻参 MC_Home.........................................................................................................57
4.4.1 可选的寻参方式.............................................................................................57
4.4.2 寻参过程.........................................................................................................58
4.4.3 寻参方式: PLC CAM .....................................................................................60
4.4.4 寻参方式: Hardware Sync pulse.....................................................................60
4.4.5 寻参方式: Hardware Latch Pos......................................................................60
4.4.6 寻参方式: Hardware Latch Neg .....................................................................60
4.4.7 寻参方式: Software Sync pulse......................................................................60
4.4.8 寻参功能块 MC_Home..................................................................................61
4.4.9 寻参的速度.....................................................................................................62
4.4.10 参考点的位置.................................................................................................62
4.5 位置外部设定值发生器(External set value generation).......................................63
4.5.1 MC_ExtSetPointGenEnable............................................................................64
4.5.2 MC_ExtSetPointGenDisable...........................................................................64
4.5.3 MC_ExtSetPointGenFeed...............................................................................64
4.6
位置补偿.....................................................................................................................65
4.6.1 位置补偿原理.................................................................................................65
4.6.2 MC_MoveSuperImposedExt...........................................................................65
4.7 TwinCAT NC 全闭环控制..........................................................................................66
4.8 从 PLC 程序修改 NC 轴的参数设置 ........................................................................66
5 编写 NC 多轴联动程序 ........................................................................................................68
5.1 电子齿轮.....................................................................................................................68
5.2 电子凸轮.....................................................................................................................68
5.2.1 凸轮表 Cam Table .........................................................................................68
5.2.2 凸轮表的耦合与解耦.....................................................................................69
5.2.3 从文件装载凸轮表.........................................................................................71
5.2.4 修改凸轮表的关键点.....................................................................................71
评论0
最新资源