Hello Guest it is May 21, 2019, 09:24:23 PM

Author Topic: how to get Z position while moving  (Read 1447 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

*
  • *
  •  1,853 1,853
  • West Yorkshire, 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 »
America gave us powered flight, England the steam train and Germany the car.  Who invented the first boat?