ATC/MQXM2110
2021 年 11 月 3 日
禾川自动化中心 ATC
2
目录
轴管理功能块 .................................................................................................................................................................................................. 5
MC_Power(FB) .................................................................................................................................................................................. 5
SMC_SetControllerMode(FB ............................................................................................................................................................... 7
MC_SetPosition(FB ............................................................................................................................................................................... 9
MC_Reset(FB ....................................................................................................................................................................................... 10
MC_TouchProbe(FB ........................................................................................................................................................................... 12
MC_AbortTrigger(FB ........................................................................................................................................................................... 15
MC_ReadStatus(FB ............................................................................................................................................................................. 16
MC_ReadActualPosition(FB ............................................................................................................................................................... 18
MC_ReadActualVelocity(FB ............................................................................................................................................................... 19
MC_ReadActualTorque(FB ................................................................................................................................................................. 21
MC_ReadAxisError(FB ........................................................................................................................................................................ 22
MC_ReadParameter(FB) ................................................................................................................................................................. 24
MC_ReadBoolParameter(FB) ......................................................................................................................................................... 25
MC_WriteParameter(FB) ................................................................................................................................................................ 27
MC_WriteBoolParameter(FB) ........................................................................................................................................................ 28
SMC_CheckAxisCommunication(FB) ............................................................................................................................................ 30
SMC_ReadFBError(FB ........................................................................................................................................................................ 31
SMC_ClearFBError(FUN) ................................................................................................................................................................ 33
SMC3_PersistPosition(FB) ............................................................................................................................................................. 34
SMC3_PersistPositionSingleturn(FB) ........................................................................................................................................... 36
SMC_ChangeGearingRatio(FB) ...................................................................................................................................................... 37
3
SMC3_ReInitDrive(FB) .................................................................................................................................................................... 39
SMC3_ETC_WriteParameter_CoE(FB) .......................................................................................................................................... 40
SMC3_ETC_ReadParameter_CoE(FB) ........................................................................................................................................... 42
ETC_CO_SdoWrite(FB) ................................................................................................................................................................... 43
ETC_CO_SdoRead(FB) ................................................................................................................................................................... 45
单轴运动控制 ................................................................................................................................................................................................ 48
MC_Home(FB) ................................................................................................................................................................................. 48
SMC_Homing(FB) ........................................................................................................................................................................... 49
MC_Stop(FB) .................................................................................................................................................................................. 52
MC_Halt(FB) .................................................................................................................................................................................... 53
MC_Jog(FB) ..................................................................................................................................................................................... 54
MC_MoveAbsolute(FB) ................................................................................................................................................................... 56
MC_MoveRelative(FB) .................................................................................................................................................................... 57
MC_MoveVelocity(FB) ..................................................................................................................................................................... 59
SMC_SetTorque(FB ............................................................................................................................................................................ 61
MC_MoveSuperImposed(FB) ......................................................................................................................................................... 62
MC_MoveAdditive(FB) .................................................................................................................................................................... 64
多轴运动控制 ................................................................................................................................................................................................ 66
MC_GearIn(FB) ................................................................................................................................................................................ 66
MC_GearOut(FB) ............................................................................................................................................................................. 68
MC_GearInPos(FB) .......................................................................................................................................................................... 69
MC_Phasing(FB) .............................................................................................................................................................................. 71
MC_CamIn(FB ..................................................................................................................................................................................... 72
4
MC_CamOut(FB) ............................................................................................................................................................................. 75
MC_CamTableSelect(FB) ................................................................................................................................................................ 76
SMC_GetCamSlaveSetPosition(FB) .............................................................................................................................................. 78
SMC_FollowPosition(FB) ............................................................................................................................................................... 80
SMC_FollowPositionVelocity(FB) .................................................................................................................................................. 81
SMC_FollowVelocity(FB) ................................................................................................................................................................ 83
SMC_FollowSetValues(FB) ............................................................................................................................................................. 84
SMC_GetTappetValue(FB) .............................................................................................................................................................. 86
参考 ............................................................................................................................................................................................................... 87
MC_Direction(ENUM)...................................................................................................................................................................... 87
SMC_Controller_Mode(ENUM) ...................................................................................................................................................... 87
SMC_Homing_Mode(ENUM ............................................................................................................................................................... 87
SMC_CommunicationState(ENUM) ................................................................................................................................................... 88
MC_StartMode(ENUM ........................................................................................................................................................................ 88
TRIGGER_REF(STRUCT) ................................................................................................................................................................. 88
SMC3_PersistPositionDiag (ENUM .................................................................................................................................................... 89
轴状态转移说明(ENUM)................................................................................................................................................................... 89
SMC_Error(ENUM ............................................................................................................................................................................... 90
5
轴管理功能块
MC_Power(FB)
将轴进行使能。
名称 MC_Power(轴使能)
支持的模式 CSP CSV CST
图形表现 ST 表现
MC_Power(
Axis:= ,
Enable:= ,
bRegulatorOn:= ,
bDriveStart:= ,
Status=> ,
bRegulatorRealState=> ,
bDriveStartRealState=> ,
Busy=> ,
Error=> ,
ErrorID=> ;
变量
(1) 输入输出变量。
输入输出变量 名称 数据类型 内容
Axis 轴 AXIS_REF_SM3 指定轴,即 AXIS_REF_SM3 的一个实例
(2) 输入变量
输入变量 名称 数据类型 有效范围 初始值 内容
Enable 有效 BOOL TRUE、FALSE FALSE
TRUE:启用功能块
FALSE:关闭功能块
bRegulatorOn 使能 BOOL TRUE、FALSE FALSE
TRUE:打开轴使能
FALSE:关闭轴使能
bDriveStart
驱动开
启
BOOL TRUE、FALSE FALSE
TRUE:允许轴运动
FALSE:禁止轴运动
(3) 输出变量