Mach3寻边和对刀代码
Posted 蓦然回首
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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寻边和对刀代码的主要内容,如果未能解决你的问题,请参考以下文章
ROZRZ在线测量自动测量在线刀补CNC远程刀补机床远程刀联对刀仪远程刀补扫码传输刀补