首页 > 代码库 > Mach3寻边和对刀代码
Mach3寻边和对刀代码
Mach3汉化版
对刀代码 :
‘Rem Probe Down by PEU (Based on Erniebro Work) FeedCurrent = GetOemDRO(818) ‘读取F值 SafeZ = GetOemDRO(54) ‘读取安全Z数值 ZCurrent = GetDro(2) Code "G4 P1" ‘Pause 1 second to give time to position probe plate Code "F100" ‘slow feed rate to 100 MM/MIN GageH = GetOEMDRO (1002) Rem Probe Down by PEU (Based on Erniebro Work) FeedCurrent = GetOemDRO(818) ‘Get the current settings ZCurrent = GetOemDro(802) Code "G4 P1" ‘Pause 1 second to give time to position probe plate Code "F100" ‘slow feed rate to 100 MM/MIN GageH = GetUserDRO(1152) ZNew = ZCurrent - 30 ‘对刀时,Z最多下降30mm Code "G31 Z" &ZNew While IsMoving() Wend Call SetDro (2,GageH) FinalMove = GageH + Safez ‘Z轴: 对刀块高度+安全高度 If SafeZ<FinalMove Then Code "G0 Z" &FinalMove Else Code "G0 Z" &SafeZ ‘退回到安全z End if Code "F" &FeedCurrent ‘restore starting feed rate
寻边代码:
Rem Probe Down by PEU (Based On Erniebro Work) FeedCurrent = GetOemDRO(818) ‘Get the current settings XCurrent = GetOemDro(802) Code "G4 P1" ‘Pause 1 second to give time to position probe plate Code "F100" ‘slow feed rate to 100 MM/MIN GageH = GetUserDRO(1152) ‘读出对刀块厚度 XNew =XCurrent +20 ‘probe down 20 mm Code "G31 X" &XNew While IsMoving() Wend Call SetDro (0,GageH * -1) FinalMove = (GageH * -1)-3 ‘对刀块负数,再退刀 -3 Code "G0 X" &FinalMove Code "F" &FeedCurrent ‘restore starting feed rate
Mach3寻边和对刀代码
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。