Skip to main content

4.2. 将工具数据的坐标系方向登记在传感器中

4.2. 将工具数据的坐标系方向登记在传感器中

 

首先通过使用传感器登记正常的工具数据的工具坐标系。

 

'-- Vector-run extern without signal reflection

'-----------------------------------------------

'-----------------------------------------------

'-- Initial parameter setting

CALL 1020_INIT_SET

 

'-- Calculate Circle Pose

CALL 1021_CALC_C1

 

'-- Activate configuration mode -

gyConfigMode=1

WAIT gxConfModeAct

 

'-- Activate Vector run extern --

gyVectRunExt=1

WAIT gxVecRunExAct

 

'-- Set Program Number 1 --

gyPrgNrBit1=1

gyPrgNrBit2=0

gyPrgNrBit3=0

gyPrgNrBit4=0

gyPrgNrBit5=0

 

'-- Set to Program No.set --

gyPgNrSRIdxSe=1

 

'-- Wait for confirmation of program number --

WAIT gxPgNrSRIdxRd OR gxError

 

'-- Vector-run only if input gxPgNrSRIdxRd is set --

IF gxPgNrSRIdxRd=1 THEN

 

'-- Reset Program Number 1 --

gyPrgNrBit1=0

gyPrgNrBit2=0

gyPrgNrBit3=0

gyPrgNrBit4=0

gyPrgNrBit5=0

 

gyPgNrSRIdxSe=0

 

'-- Wait until ready --

WAIT gxReadyForMes

 

 

'-- Reset tool data --

Tool[giToolNrCorr]=Tool[giToolNrOrig]

 

'-- Double-circle 1 with Tool_corrected --

S1   MOVE L,gpCirPose1,S=50%,A=0,T=giToolNrCorr              '-- Move to starting point

S2   MOVE C,gpCirPose2,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 1st quarter circle movement

S3   MOVE C,gpCirPose3,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 2nd quarter circle movement

S4   MOVE C,gpCirPose4,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 3rd quarter circle movement

S5   MOVE C,gpCirPose1,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 4th quarter circle movement

S6   MOVE C,gpCirPose2,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 1st quarter circle movement

S7   MOVE C,gpCirPose3,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 2nd quarter circle movement

S8   MOVE C,gpCirPose4,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 3rd quarter circle movement

S9   MOVE C,gpCirPose1,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 4th quarter circle movement

 

'-- Execute "Get measured values and Correction"

CALL 1000_GetMesVal

 

'-- Double-circle 2 with tool_corrected

S10  MOVE L,gpCirPose1,S=50%,A=0,T=giToolNrCorr               '-- Move to starting point     

S11  MOVE C,gpCirPose2,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 1st quarter circle movement

S12  MOVE C,gpCirPose3,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 2nd quarter circle movement

S13  MOVE C,gpCirPose4,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 3rd quarter circle movement

S14  MOVE C,gpCirPose1,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 4th quarter circle movement

S15  MOVE C,gpCirPose2,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 1st quarter circle movement

S16  MOVE C,gpCirPose3,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 2nd quarter circle movement

S17  MOVE C,gpCirPose4,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 3rd quarter circle movement

S18  MOVE C,gpCirPose1,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 4th quarter circle movement

 

'-- Execute "Get measured values and Correction"

CALL 1000_GetMesVal

 

 

'-- Double-circle 3 with tool_corrected --

S19  MOVE L,gpCirPose1,S=50%,A=0,T=giToolNrCorr               '-- Move to starting point     

S20  MOVE C,gpCirPose2,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 1st quarter circle movement

S21  MOVE C,gpCirPose3,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 2nd quarter circle movement

S22  MOVE C,gpCirPose4,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 3rd quarter circle movement

S23  MOVE C,gpCirPose1,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 4th quarter circle movement

S24  MOVE C,gpCirPose2,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 1st quarter circle movement

S25  MOVE C,gpCirPose3,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 2nd quarter circle movement

S26  MOVE C,gpCirPose4,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 3rd quarter circle movement

S27  MOVE C,gpCirPose1,S=gdMoveSpeed mm/s,A=3,T=giToolNrCorr  '-- 4th quarter circle movement

 

'-- Execute "Get measured values and Correction"

CALL 1000_GetMesVal

 

'-- Acknowledge error during measurement --

'-- Identify and rectify error cause --

IF gxError=1 THEN

'-- Reset tool data --

Tool[giToolNrCorr]=Tool[giToolNrOrig]

gyReset=1

WAIT gxError=0

gyReset=0

ENDIF

 

ELSE '-- Error when setting program number --

'-- Reset Program Number 1 --

gyPrgNrBit1=0

gyPrgNrBit2=0

gyPrgNrBit3=0

gyPrgNrBit4=0

gyPrgNrBit5=0

 

gyInitTMeAct=0

ENDIF

 

'--Turn off Vector-run extern --

gyVectRunExt=0

WAIT gxVecRunExAct=0

 

'-- Turn off configuration mode

gyConfigMode=0

WAIT gxConfModeAct=0

END