0 Membros e 1 Visitante estão vendo este tópico.
' Tapping Parametric Macro' M9000 with P R Q params' P Depth of thread positive or negative number' Q ThreadsPerInch' R RetractZ' NOTE uses swapaxis from A to B axis ' Commented out for testingDim DepthOfThread As DoubleDim TotalDegreeRotation As DoubleDim ThreadsPerInch As DoubleDim RetractZ As DoubleDepthOfThread = Param1() 'PThreadsPerInch = Param2() 'QRetractZ = Param3() 'RDepthOfThread = Abs(DepthOfThread) 'make sure thread is positiveTotalDegreeRotation=((DepthOfThread/(1/ThreadsPerInch))*360)Message "Cut to " & DepthOfThread & " rotation " & TotalDegreeRotationSwapAxis(4,5)sleep(100)Code "G91"sleep(100)Code "G1 Z-" & DepthOfThread & "A" & TotalDegreeRotationWhile (IsMoving())sleep(100)WendCode "G4P.5"Code "G1 Z" & DepthOfThread & "A-" & TotalDegreeRotationWhile (IsMoving())sleep(100)WendCode "G90"sleep(100)Code "G0Z" & RetractZResetAxisSwap()sleep(100)Message "Completed " & ThreadsPerInch & " TPI to " & DepthOfThread & " depth"End