SPOT(MoveType, POINT_DATA, SGEQ_ParamData, SGRS_ParamData) 焊接控制时序
DEF SPOT (MoveType:IN, PointData:IN, SGEQ_ParamData:IN, SGRS_ParamData:OUT )
MoveType:移动类型 PTP
PointData: 焊点的数据:
SG_POINT_Default={Name[]"SG1",GNumber 1,Thickness 0.0,ThicknessTol 0.0,ForceProfile[]"none",ForceMode #SINGLE,Force 0.0,WeldTime 0.0,Force2 0.0,Comp#NO,Path 2.30000,PrNumber 1,MoveApprox TRUE,MaxRestart 5,Cont#NO,KeepForceAtWelding FALSE}
SGEQ_ParamData: 平衡控制的数据
CASE #MEDIUM
EEQ_PAct.MODE = EQMode
EEQ_PAct.TimeExpectedFactor = 75
EEQ_PAct.Push_ThresholdFactor = 100
EEQ_PAct.Push_ReduceTorqueFactor = 100
SGEQ_StartForceFactor =100
SGRS_ParamData: 暂时不用
SPOT准备点:
retry = FALSE 初始化变量重试功能
IF(SG_MaxRestart== 0)THEN SG_MaxRestart=3
SG_MaxRestart = ServoGun[1].MaxRestart=3重复次数
RetryMaxReached = TRUE 重试达到的最大
ELSE
RetryMaxReached = FALSE
ENDIF
NewStart = FALSE
SpotSteps=checkwear 检查磨损步
REPEAT 开始执行循环
IF((retry) AND (SpotSteps == endSpot))THEN
重试功能被激活, SpotSteps == endSpot在结束步
RetryMaxReached = SpotCountRetry()重复计数重试>3重试达到的最大
SpotSteps = checkwear 去检查磨损步
retry = FALSE 关闭重试
ENDIF
SWITCH SpotSteps
CASE checkwear 检查磨损
SGL_HandleCheckWear(SGL_CheckWear(), SpotSteps, checkNoPartIn, checkNoPartIn, 0, endspot, errorRetry, RetryMaxReached)
检查电极是否满足要求,正常情况去下一步checkNoPartIn
IF(SpotSteps == errorRetry)THEN 如果需要去错误重试步
retry = TRUE 激活重试
ENDIF
CASE checkNoPartIn 检查没有零件
IF(ServoGun[SG_ActiveGunNumber].CompType == #AIR)THEN
设置规定CompType #EQUALIZING平衡技术,因此这段程序不执行
SG_DECL_COMP_INTERRUPT (PointData.Comp,PointData.Cont)
ENDIF
IF(SGL_ReadIn(SG_NoPart,FALSE))THEN
SG_NoPart=0, 读入E0=0,检验位SGL_ReadIn反馈false
SG_NoPart_ER = TRUE
SG_MainErrorHandlTyp = #MainWithNotify
returnUnused = SGE_MainAndSubmitMsg_ER (FALSE)
SpotSteps = reposition 去返回原位
ELSESGL_ReadIn反馈false执行下一步检查枪力
SpotSteps = checkGunForceLim 执行下一步检查枪力
ENDIF
CASE checkGunForceLim 检查枪力极最小限值
CONTINUE
IF(NOT ((SG_GunForce)<=$FORCE_LIM[(6+SG_ExtaxActive)]))THEN
SG_ExtaxActive=1 激活的外部轴1$FORCE_LIM 力最小极限值,这段的意思是给入的力值不能小于系统极限值.
SpotSteps = checkGunForceMax去检查力是否超出最大值
ELSE 如果小于最小值
SG_ForceLowerFlim_ER=TRUE 小于最小值故障报警
SG_MainErrorHandlTyp = #MainWithDlg
SpotSteps =SGL_DlgAnsOrMsgLineSel(FALSE, reposition,,RetryMaxReached) 需要跳到回到原位步
ENDIF
CASE checkGunForceMax 检查枪力是否超出最大值
CONTINUE
IF(NOT ((SG_GunForce)>$FORCE_MAX[(6+SG_ExtaxActive)]))THEN
SG_ExtaxActive=1 激活的外部轴1$FORCE_MAX 力最大极限值,这段的意思是给入的力值不能大于系统极限值.
SpotSteps = checkSpinTime 去检查旋转时间步
ELSE 否则
SG_ForceHigherFmax_ER=TRUE大于最大值故障报警
SG_MainErrorHandlTyp = #MainWithDlg
SpotSteps = SGL_DlgAnsOrMsgLineSel (FALSE, reposition,,RetryMaxReached)需要跳到故障复位步
ENDIF
CASE checkSpinTime ;检查旋转时间-机器人旋转选项已启用(机器人没有使用此功能)
IF(SG_RobospinInstalled) AND SGRS_Active AND NOT (SGRS_ParamData.SpinTyp== #OFF)THEN
SG_RobospinInstalled=FALSE 控制器没有安装机器人旋转.因此以下程序很多将不执行.
IF(SGRS_ParamData.SpinAngle == 0)THEN
SGRS_ParamData.SpinTyp = #OFF
SGRS_AngleZero_ER = TRUE
SG_MainErrorHandlTyp = #MainWithNotify
returnUnused =SGE_MainAndSubmitMsg_ER (FALSE)
ENDIF
IF((SGRS_ParamData.SpinTimeSource == #WELDTIMER) AND (SGRS_ParamData.SpinTyp== #DURING))THEN
SGRS_ParamData.SpinTime = 0
FOR i = 1 TO(SG_ForceCountMax-1);多力验证
IF(SG_PointForcesTime[i] < 10)THEN;检查时间是以秒还是毫秒为单位 SG_PointForcesTime[i] =SG_PointForcesTime[i] * 1000
ENDIF
SGRS_ParamData.SpinTime =SGRS_ParamData.SpinTime + SG_PointForcesTime[i]
ENDFOR
SGRS_ParamData.SpinTime =SGRS_ParamData.SpinTime + SGRS_ParamData.TimeOffset
IF NOT (SGRS_ParamData.SpinTime < 0 )THEN
SpotSteps =ActivateTorqSafety
ELSE
SGRS_TimeToLow_ER=TRUE
SG_MainErrorHandlTyp = #MainWithDlg
SpotSteps =SGL_DlgAnsOrMsgLineSel (FALSE, reposition,,RetryMaxReached)
ENDIF
ELSE
SpotSteps =ActivateTorqSafety
ENDIF
ELSE 如果没有使用运转功能就去下一步“启动焊接安全”
SpotSteps = ActivateTorqSafety
ENDIF
CASE ActivateTorqSafety 启动焊接安全
SGL_TorqueOn () 扭矩检查扭矩,用以保护枪设置极限机器人扭矩值
SpotSteps = resetCompensation 去重置补偿步
CASE resetCompensation 重置补偿,跳过
IF(ServoGun[SG_ActiveGunNumber].CompType== #AIR)THEN
SGL_SetCompOut(TRUE,PointData.Comp) CompType=#EQUALIZING平衡技术
ENDIF
SpotSteps = PrepareMoveToForce 去准备移至力值步
CASE PrepareMoveToForce 准备移至力值
CONTINUE
INTERRUPTDECL SG_Interrupt21 WHEN $SG_PART_DETECTED[6+SG_ExtaxActive] == TRUE DO SG_SetPartDetected()
激活中断零件检测, $SG_PART_DETECTED[7]外部轴7轴的零件检测,被认为检测到零件
SG_PartDetected= FALSE零件检测
SGL_SaveSetSoftend (SG_PartThickness-SG_PartThicknessTol)
SG_ConstSpeed=SGL_SPEED_CALC(SG_GunForce,MoveType,TRUE)
速度计算(焊钳给入力值,运动类型PTP, 激活)
SGM_CALCULATE_POINTS(SG_GunForce,#WELD) 点计算和设定最大扭矩
IF SG_DEBUG_MeasureForce THEN
returnUnused = SGL_ForceMeanVal(TRUE)
ENDIF
SpotSteps = MoveToForce
CASE MoveToForce 移动到力量
IF(SG_ForceTraceEnable)THEN强制跟踪没有启用SG_ForceTraceEnable=FALSE
SG_StartForceTrace(SG_ActiveGunNumber)启动力追踪
ENDIF
SG_StopReaction = FALSE 停止反应
-------开启中断----------
INTERRUPTON SG_Interrupt1 ; 禁止重新定位
INTERRUPTON SG_Interrupt9 ; 停止按钮
INTERRUPTON SG_Interrupt21 ; 检测分割
SG_ReposActive = FALSE 重复定位不启动
SGM_MOVE_TO_FORCE(SG_GunForce, MoveType, #WELD, SGEQ_ParamData, SGRS_ParamData) 移动到焊接轨迹点并带力移动进行夹紧
SGL_MaintenanceCounter(SG_ActiveGunNumber)维护计数器
SpotSteps = WaitPartDetected 等待零件检测到给到下一步
SGL_TimerControl(SG_TimerFCTRL,#TRestart) 开启时间监控
CASE WaitPartDetected 等待零件检测到
IF((SGEQ_ParamData.MODE<>#OFF) AND (SGEQ_Active==TRUE) AND SGEQ_ActivePointCond)THEN
SGEQ_ParamData.MODE = EQMode,平衡控制激活,活动点号SGEQ_ActivePointCond=FALSE
IF(($TIMER[SGEQ_TimerFixPos] * 0.001)> SGEQ_CurrentParameters.TIME_EXPECTED)THEN
SGEQ_StartFreeze = TRUE 开始冻结
ENDIF
ENDIF
IF(SG_PartDetected)THEN 如果检测到零件,通过中断程序检测零件
SpotSteps = ContPosChckFandThick 去检查厚度步
ELSE 如果没有检测到零件
CONTINUE
IF(($MODE_OP == #T1) OR ($OV_PRO < 50))THEN
TimeResult =SG_TimeoutTimePartDetec * 5.0
SG_TimeoutTimePartDetec 1750.0
ELSE 如果不是T1模式,速度没有小与50
TimeResult =SG_TimeoutTimePartDetec
ENDIF
---超时报警-----
IF($Timer[SG_TimerFCTRL] >= TimeResult)THEN
如果T33>=1750.0/875
SG_NoPartDetected_ER = TRUE 没有找到零件故障
SG_MainErrorHandlTyp = #MainWithDlg 手动复位报警提示
$FORCE[(6+SG_ExtaxActive)] = 0 ;力控制关闭
SGEQ_StartFreeze = TRUE
SGEQ_Stop()焊钳移动关闭
IF(NOT RetryMaxReached)THEN 如果没有达到最大重复次数
SWITCH( SGE_MainAndSubmitMsg_ER(RetryMaxReached))
CASE 1 通过提示信息反馈,是要重焊,还是去下一点
是->重试最后一点
SpotSteps = errorRetry 去错误重试步
retry = TRUE
CASE 2; 不->继续开枪->下一点
SpotSteps = disableForceMode 去关闭力模式
ENDSWITCH
ELSE 如果没有到达最大重复步,就去
SpotSteps = SGL_DlgAnsOrMsgLineSel (false, disableForceMode,,RetryMaxReached)监控计算步
ENDIF
ELSE如果没有超时就再去等待零件检测步
SpotSteps = WaitPartDetected
ENDIF
ENDIF
CASE FastVectorMoveOff 快速矢量移动关闭步
ActivateFastVMVOff() 确认焊接快速夹紧
SpotSteps = ContPosChckFandThick 连续位置检查零件厚度
CASE ContPosChckFandThick 连续位置检查零件厚度
SG_TriggerEnd=FALSE 触发结束
IF(SGM_ChkForcePartThick(SGEQ_ParamData,TRUE,RetryMaxReached))THEN 如果计算零件厚度正确
SpotSteps = ForceReached 去力达到
ELSE 如果厚度不正确
SG_MainErrorHandlTyp = #MainWithDlg 需要手动复位
CONTINUE
IF(($MODE_OP == #T1) OR ($MODE_OP == #T2))THEN
CONTINUE
$FORCE[(6+SG_ExtaxActive)] = 0 ;关力控制
ENDIF
IF(NOT RetryMaxReached)THEN 如果没有到达力重复最大值
SWITCH( SGE_MainAndSubmitMsg_ER(RetryMaxReached))
主要并提交故障信息
CASE 1 ; 是->重试最后一点
SpotSteps = errorRetry
retry = TRUE
CASE 2 ;否->继续开枪->下一点
SpotSteps = disableForceMode去关闭力模式步
ENDSWITCH
ELSE 如果可以计算步信息
SpotSteps = SGL_DlgAnsOrMsgLineSel (false, disableForceMode,,RetryMaxReached)
ENDIF
ENDIF
CASE ForceReached力达到
IF SG_DEBUG_MeasureForce THEN 测量力诊断暂时不用
returnUnused = SGL_ForceMeanVal(FALSE)
ENDIF
IF( SGW_PrepAndStartWeld(#WaitForReady,NewStart)== 1 )THEN
开始焊接 ,焊接结束后
SpotSteps = detectWeldEnd检测焊接结束
ELSE 如果焊接不合格
SG_TimerErrorHandlTyp = #TimerWithDlg 故障报警类型
CONTINUE
IF(($MODE_OP == #T1) OR ($MODE_OP == #T2))THEN
如果是在T1模式或者T2模式
CONTINUE
$FORCE[(6+SG_ExtaxActive)] = 0 ;关力控制
ENDIF
SGEQ_Stop() 关闭焊钳平衡移动
;水位检查
error_Water =SGE_WaterguardChecker()流量检测
IF(NOT RetryMaxReached)THEN 如果没有重试达到的最大值
IF error_Water THEN 水错误
Result =SGE_MainAndSubmitMsg_ER(RetryMaxReached)
进入机器人故障提示对话框报错: 重试达到的最大
ELSE
Result =SGE_WeldTimerMsg_ER(RetryMaxReached)
ENDIF
SWITCH Result
CASE 1 ; yes -->重试
returnUnused = SG_ResetError_IWT(#ResetDefault)恢复默认
SpotSteps = errorRetry 去故障重试步
retry = TRUE
CASE 2; no -->继续开枪->下一点
returnUnused = SG_ResetError_IWT(#ResetDefault)恢复默认
SpotSteps = disableForceMode
ENDSWITCH
ELSE
SpotSteps = SGL_DlgAnsOrMsgLineSel ((NOT error_Water), disableForceMode,,RetryMaxReached)
ENDIF
ENDIF
CASE detectWeldEnd 检测焊接结束
SG_WriteLogbook(SG_ProgramNumber, FALSE, SGEQ_ParamData)写日志书
IF(SG_RobospinInstalled AND (SGRS_ParamData.SpinTyp==#DURING) AND SGRS_Active)THEN;SG_RobospinInstalled=false机器人运行, SpinTyp= #OFF SGRS_Active=TRUE 不使用机器人旋转
IF SGEQ_ActivePointCond THEN
IF $VMSTATE.ACTIVE THEN
SGEQ_STOP()
WAIT FOR ($VMSTATE.ACTIVE ==FALSE)
ENDIF
ENDIF
SGRS_RoboSpinTurn($POS_ACT_MES,MoveType, PointData, SGRS_ParamData) ;开始机器人旋转的转弯运动
TimerResult = SGg_ResultWeldEnd
NewStart = SGg_NewStart
ELSE 不使用机器人旋转就执行下面的程序
TimerResult = SGW_GetWeldEndSignal(NewStart)E785焊接完成FK
获取焊接结束信号(重新开始)
ENDIF
IF( TimerResult == 1)THEN ;焊接控制器无错误
RoboSpinBySPS = FALSE 机器人旋转
RoboSpinBySPS = SGL_ReadIn(SG_StartRoboSpin,TRUE)
SG_StartRoboSpin=0 ,没有使用机器人旋转
IF(SG_RobospinInstalled AND (SGRS_ParamData.SpinTyp==#AFTER) ANDSGRS_Active AND RoboSpinBySPS)THEN(不使用)
-焊接后机器人旋转-SG_RobospinInstalled=FALSE SpinTyp= #OFF ,SGRS_Active=TRUE,RoboSpinBySPS = FALSE
IF(SGRS_AktCounter[SG_ActiveGunNumber] <= SGRS_TurnCount)THEN
SGRS_HelpGunForce =((100-SGRS_ParamData.PercentForce)/100)* SG_GunForce
SGRS_GunForce =SGRS_HelpGunForce
IF(SGRS_GunForce < $Force_LIM[6+SG_ExtaxActive])THEN
;目标力小于力的极限值
SGRS_GunForce = $Force_LIM[6+SG_ExtaxActive]+1
SGRS_ForceLim_ER = TRUE
returnUnused = SGE_MainAndSubmitMsg_ER (FALSE)
ENDIF
$FORCE[(6+SG_ExtaxActive)] = SGRS_GunForce 旋转力760
PTP $POS_ACT 执行当前位置
waitfor TRUE
IF SGEQ_ActivePointCond THEN
IF $VMSTATE.ACTIVE THEN
SGEQ_STOP()
WAITFOR($VMSTATE.ACTIVE == FALSE)
ENDIF
ENDIF
SGRS_RoboSpinTurn($POS_ACT_MES,MoveType, PointData, SGRS_ParamData);开始RoboSpin的转弯运动
SGRS_RoboSpinSetOpenPos()
IF($MODE_OP == #AUT) OR ($MODE_OP== #EX)THEN
SGRS_AktCounter[SG_ActiveGunNumber] = SGRS_AktCounter[SG_ActiveGunNumber] + 1
ENDIF
ENDIF
ENDIF
焊接合格后:去禁用力模式步
SpotSteps = disableForceMode, disableForceMode=140去禁用力模式步
IF(SG_RobospinInstalled AND (SGRS_ParamData.SpinTyp==#DURING) AND SGRS_Active)THENSpinTyp=OFF 机器人旋转暂时没有使用
; 焊接计时器没有错误,将新的起点设置为打开喷枪
SGRS_RoboSpinSetOpenPos()
ENDIF
ELSE焊接控制器错误,焊接不合格
SG_TimerErrorHandlTyp = #TimerWithDlg
SGEQ_Stop() 关闭平衡控制
IF(NOT RetryMaxReached)THEN
SWITCH( SGE_WeldTimerMsg_ER(RetryMaxReached))
CASE 1 ; 是,重试地点,并带有新的枪口关闭功能
SpotSteps = errorRetry 去错误重试步
retry = TRUE
returnUnused = SG_ResetError_IWT(#ResetDefault)
CASE 2 ; 不->继续开枪->下一点
returnUnused = SG_ResetError_IWT(#ResetDefault)
SpotSteps = errorRetry
retry = FALSE
CASE 3 仅重试焊缝而无需打开和关闭
returnUnused = SG_ResetError_IWT(#ResetWithRetry)
SpotSteps = ForceReached
DEFAULT
REPEAT
MsgNotify("Unexpectedanswer from weld timer, program running must be stopped.")焊接计时器的意外应答,必须停止程序运行
HALT
UNTIL FALSE
ENDSWITCH
ELSE
SpotSteps =SGL_DlgAnsOrMsgLineSel (TRUE, disableForceMode,,RetryMaxReached) ---计算步去力关闭步
ENDIF
ENDIF
CASE disableForceMode 关闭力模式
IF(SG_PointDataAct.KeepForceAtWelding)THEN
KeepForceAtWelding=FALSE保持焊接力
RESET_TORQUE_LIMITS(6+SG_ExtaxActive)复位扭矩极限E1焊钳
waitsec 0.0
ENDIF
CONTINUE
$FORCE[(6+SG_ExtaxActive)] = 0 ;关断力控制
CONTINUE
;$APO.CPTP=1
INTERRUPTOFF SG_Interrupt1 ; 禁用抑制重新定位
INTERRUPTOFF SG_Interrupt9 ; 停止按钮
INTERRUPTOFF SG_Interrupt21
SpotSteps = reposition 去回到原位步
CASE errorRetry 错误重试
INTERRUPTOFF SG_Interrupt1 ; 禁用抑制重新定位
INTERRUPTOFF SG_Interrupt9 ; 停止按钮
INTERRUPTOFF SG_Interrupt21
$FORCE[(6+SG_ExtaxActive)] = 0 ;关断力控制
IF(SG_PointDataAct.KeepForceAtWelding)THEN
保持焊接力KeepForceAtWelding =false
RESET_TORQUE_LIMITS(6+SG_ExtaxActive)重置扭矩极限
waitsec 0.0
ENDIF
TRIGGERWHENDISTANCE= 1 DELAY= 0 DO SGL_ResetSoftEnd(SG_ActiveGunNumber)PRIO=-1
因为有焊接故障,重新移动到打开位置
IF((ServoGun[SG_ActiveGunNumber].CompType==#EQUALIZING) AND (SGEQ_ParamData.Mode<>#OFF) AND (SGEQ_Active==TRUE))THEN
CompType=#EQUALIZING使用平衡控制. MODE = EQMode,平衡控制激活
SGEQ_Stop();如果上次尝试仍将其关闭,请关闭矢量移
SGL_MoveToPos(SGEQ_StartPoint,SGEQ_StartPoint,#NO,#SG_LIN)
ELSE
SGL_MoveToPos(P_APPROX,P_APPROX,#NO,MoveType)
ENDIF
----X轴没有补偿
IF ServoGun[SG_ActiveGunNumber].XCompActive THEN XCompActive=FALSE
SWITCH MoveType
CASE #SG_PTP, #SG_LIN ,#SG_CIRC
SGL_MoveToPos(SG_Startpoint,SG_Startpoint,#NO,#SG_LIN)
CASE #SG_SPTP, #SG_SLIN ,#SG_SCIRC
SGL_MoveToPos(SG_Startpoint,SG_Startpoint,#NO,#SG_SLIN)
ENDSWITCH
ENDIF
SpotSteps = reposition 去回到原位
CASE reposition 回到原位
SGL_TorqueOff() 转矩控制关闭
IF((ServoGun[SG_ActiveGunNumber].CompType==#EQUALIZING) AND (SGEQ_ParamData.Mode<>#OFF) AND (SGEQ_Active==TRUE))THEN
SGEQ_Stop();停止焊枪平衡控制.如果上次尝试仍将其关闭,请关闭向量移动
ENDIF
IF(ServoGun[SG_ActiveGunNumber].CompType == #AIR)THEN
焊钳平衡控制不使用空气控制 CompType==#EQUALIZING
SWITCH SG_ExtaxActive
CASE 1
IF(SG_ClosingAxDir<0)THEN
IF($AXIS_ACT.E1>=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ELSE
IF($AXIS_ACT.E1<=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ENDIF
CASE 2
IF(SG_ClosingAxDir<0)THEN
IF($AXIS_ACT.E2>=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ELSE
IF($AXIS_ACT.E2<=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ENDIF
CASE 3
IF(SG_ClosingAxDir<0)THEN
IF($AXIS_ACT.E3>=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ELSE
IF($AXIS_ACT.E3<=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ENDIF
CASE 4
IF(SG_ClosingAxDir<0)THEN
IF($AXIS_ACT.E4>=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ELSE
IF($AXIS_ACT.E4<=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ENDIF
CASE 5
IF(SG_ClosingAxDir<0)THEN
IF($AXIS_ACT.E5>=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ELSE
IF($AXIS_ACT.E5<=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ENDIF
CASE 6
IF(SG_ClosingAxDir<0)THEN
IF($AXIS_ACT.E6>=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ELSE
IF($AXIS_ACT.E6<=SG_TriggerCompPos)THEN
SGL_COMPENSATOR()
ELSE
INTERRUPTON SG_Interrupt11
ENDIF
ENDIF
ENDSWITCH
ENDIF
SpotSteps = endSpot 步结束
ENDSWITCH
UNTIL((SpotSteps == endSpot) AND ((retry == FALSE) OR (RetryMaxReached)))
结束循环控制的条件: 在结束步并且没有重复,或者重复次数达到最大值
END;
全部0条评论
快来发表一下你的评论吧 !