Hello Guest it is April 25, 2024, 10:20:56 AM

Author Topic: how to get Z position while moving  (Read 2187 times)

0 Members and 1 Guest are viewing this topic.

how to get Z position while moving
« on: July 06, 2012, 01:21:52 AM »
z=0
code "G53 Z60"
while ismoving()
 if active(input4) then --like a prob
  z=GetoemDRO(802)  ---get Z current position( also I try getdro(2))
 end if
Wend
----
I want to get the a Z position while Z is moving, but finally I always get the last stop position  Z=60, why?
thank you!!

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: how to get Z position while moving
« Reply #1 on: July 06, 2012, 04:31:11 AM »
The G31 command is used to detect the probe touch, Search the forum for G31 and you will find many examples of touch probe code.

Here is just one of many:-

http://www.machsupport.com/forum/index.php/topic,21306.0.html
« Last Edit: July 06, 2012, 04:33:59 AM by Graham Waterworth »
Without engineers the world stops