Hello Guest it is March 28, 2024, 05:51:29 PM

Author Topic: help on 3 Buttons to remember positions a,b,c, and 3 buttons to return to same.  (Read 2905 times)

0 Members and 1 Guest are viewing this topic.

I need some help on creating 3 Buttons to remember positions a,b,c, after jogging around.  and 3 buttons to return to same positions so i can change tooling.

I have been reading for about 18 hours straight and am stumped.

thanks in advance

Offline BR549

*
  •  6,965 6,965
    • View Profile
You only need a singlee buton for each process of store position and return to position.

Create 2 buttons.  Then put the following codes into the proper button.


Button to store positions.


'Macro to store points
SetVar(200,GetDro(0))   'X position
SetVar(201,GetDro(1))   'Y position
SetVar(202,GetDro(2))   'Z position
End



Button to return to stored point.


,Macro to return to points
Code" G00 X " & GetVar(200) &" Y " &GetVar(201)     'Return to Stored XY points
Code" G00 Z " & GetVar(202)                                   'Return to Stored Z point
End

Why not just use the "Remember / Return" feature included on the RUN screen ?
Jog to your desired pos., Hit Remember, then hit Return any time to go to the remembered pos.
Works a treat !
Russ

Offline BR549

*
  •  6,965 6,965
    • View Profile
YES but HERE it crawls across the table at about 2-3 IMP when it returns. I have yet to figure what controls the speed for that function. Jog is at %100 for fast and slow.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Well I be, after a long time of looking for the speed control I found WHY it goes slow(;-). I had turned ON the C drive for testing AND it is set for a LONG LONG way away from zero so the other axis were waiting on C.

Whoed a thunk it, (;-) TP