Hello Guest it is March 31, 2020, 08:02:38 AM

Author Topic: Actual position when i hit pause.  (Read 2024 times)

0 Members and 1 Guest are viewing this topic.

Actual position when i hit pause.
« on: November 04, 2011, 03:22:34 PM »
How can i record the exact position on X & Y axis when i hit pause?

When the machine is running and i hit pause, it takes some time until the machine deccelerates and stops.
So, i want to record the exact position and current line and move automaticaly back to this position.

Does GetVar(2000) or GetParam(XDRO) have to do anything with that?

Any ideas please...
Giannis

Offline BR549

*
  •  6,925 6,925
    • View Profile
Re: Actual position when i hit pause.
« Reply #1 on: November 04, 2011, 04:29:43 PM »
There is not a way to do that BUT you can get really close.  The capture code will be just a Squeek before the actual pause process starts.

You have to modify the Pause button to allow CB code. It depends on where you want to store the variables Xpos Ypos. This example stores the Xpos and Ypos tand Zpos to #vars 1000 and 1001and 1002. And the current line number to #var 1003

SetVar(1000,GetDro(0))
SetVar(1001,GetDro(1))
SetVar(1002,GetDro(2))
SetVar(1003,GetDro(16))                                                                                                                            
DoButton(1)
While Ismoving()
Wend
Code"G91"
Code" G0 Z.250"
Code"G90"
Code" G0 X#1000 Y#1001 Z#1002"
Code" SetDro(16,GetVar(1003))


Hope that helps, (;-) TP

« Last Edit: November 04, 2011, 04:47:31 PM by BR549 »