rem 免费给个最基本的,抢生意啦……
CurrentFeed = GetDRO(18)
CurrentZ = GetDro(2)
Code "G4 P1"
Code "F100"
GageH = GetUserDRO (1001)
ZNew = CurrentZ -30
Code "G31 Z" &ZNew
While IsMoving()
Wend
Call SetDro (2,GageH) '将量块高度指定给DRO 2 ,DRO(2)是Z轴的坐标值,这样量块的底面就是Z轴工件顶面为 0 坐标
FinalMove = GageH + 20
Code "G0 Z" &FinalMove
Code "F" &CurrentFeed |