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;
-
焊接
+關注
關注
38文章
3063瀏覽量
59598 -
伺服
+關注
關注
16文章
645瀏覽量
40900 -
KUKA
+關注
關注
3文章
217瀏覽量
16490
原文標題:KUKA電伺服焊鉗USER程序SPOT 焊接點時序編程分析
文章出處:【微信號:gh_a8b121171b08,微信公眾號:機器人及PLC自動化應用】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
評論