1轴组状态: AXIS_GROUP_REF_SM3 (FB)
2使能: MC_GroupEnable (使能)
默认在: MC_GroupDisable (轴组关闭)位置
1:用 MC_GroupEnable (使能)进入 GroupStandby (轴组待命)状态
2:另外 SMC_GroupPower (轴上电)是批量调用 MC_Power
enable不必再调用Power,但可以利用单一轴上电去激活轴组使能
2回零:MC_GroupReadStatus ()
可配置:移动,回零,错停,待命,停止,关闭
3定位:MC_COORD_REF 笛卡尔坐标
a:轴坐标,c:笛卡尔坐标,v:坐标数组
https://content.helpme-codesys.com/en/libs/SM3_Robotics/Current/SM3_Robotics/fld-SM3_Robotics.html
MC _ move circular absolute 绝对循环运动
MC _ movecircularlrelative 相对循环运动
MC_MoveDirectAbsolute 绝对定位
MC_MoveDirectRelative 相对定位
MC_MoveLinearAbsolute 线性绝对移动
MC_MoveLinearRelative 线性相对移动
SMC _ GroupEnableResumeAfterError 带故障恢复的运动
SMC_GroupUpdateContinueData 下一个坐标
SMC_GroupWait 运动间隔(秒)
点动: SMC_GroupJog2
保存轴位置: SMC_GroupSaveContinueData
继续: MC_GroupContinue
急停: MC_GroupHalt (突然停止)
暂停: MC_GroupInterrupt
MC_GroupInterrupt 运动中断(运动突然停止)
MC_GroupInterruptAt,在特定位置执行停止
停止: MC_GroupStop
脱机:
MC_GroupDisable
上电: SMC_GroupPower
使能: MC_GroupEnable
复位: MC_GroupReset
零点坐标设置: MC _ group set position
增一个轴: MC _ AddAxisToGroup
删一个轴: MC_RemoveAxisFromGroup
刀具偏移: SMC _ group read tool SMC_GroupSetTool
传送带工件: MC _ trackcelpetorbelt
转盘上工件: MC _ TrackRotaryTable
活动坐标工件: SMC_SetDynCoordTransformEx
附加轴: 获取附加轴坐标: SMC_POSINFO (STRUCT)
刀具修正:
CNC加工流程:
1 SMC_CNC_REF 实例对象
2 SMC_NCDecoder G代码解析(存储在SMC_OUTQUEUE)
3 SMC_Interpolator 插补器
xp:ARRAY[1..2] OF REAL:= [100,50];
yp:ARRAY[1..2] OF REAL:= [0,100];
PROGRAM Path
VAR
iState : INT;
QUEUE : SMC_OUTQUEUE;
BUF : ARRAY[0..49] OF SMC_GEOINFO;
// Memory allocation
GEO : SMC_GEOINFO:=(dT1:=0, dT2:=1, dToolRadius:=0, dVel:=100, dVel_End:=100, dAccel:=200, dDecel:=500, iObj_Nr:=0);
// Initial path element
n : INT := 0;
QUEUE.nSize := SIZEOF(BUF);
END_VAR
CASE iState OF
0:
QUEUE.pbyBuffer := ADR(BUF[0]);
// Initialize QUEUE
SMC_SetQueueCapacity(ADR(QUEUE), SIZEOF(BUF));
iState := iState + 1;
1:
// Fill QUEUE
WHILE NOT QUEUE.bFull DO
// When QUEUE is full, wait until it has been processed by the following FBs
n := n + 1;
GEO.iSourceLine_No := n;
GEO.piStartPos := GEO.piDestPos;
// Copying last destination
GEO.iMoveType := LIN;
// Generating linear movement
GEO.iObjNo := GEO.iObjNo + 1;
// Calculating number
GEO.piDestPos.dX := xp[n];
// Generatint position
GEO.piDestPos.dY := yp[n];
SMC_CalcLengthGeo(pg := ADR(GEO));
// Calculating length of object with the help of the standard function
SMC_AppendObj(poq:=ADR(QUEUE), pgi:=ADR(GEO));
// Appending object to QUEUE
IF n = SIZEOF(xp)/SIZEOF(xp[1]) THEN
// All target positions processed
QUEUE.bEndOfList := TRUE;
n := 0;
iState := 2;
EXIT;
END_IF
END_WHILE
2:
//Done
;
END_CASE
CheckVel(bExecute:=TRUE , poqDataIn:=ADR(queue)); // Preprocessing