Hello
Guest
it is
May 07, 2024, 11:18:00 PM
Guest
Login
Register
Menu
Home
Help
Search
Calendar
Members
Members
View the memberlist
Search For Members
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
General Mach Discussion
/
Save current tool position so I can come back to it?
« previous
next »
Print
Pages:
1
2
»
Go Down
Author
Topic: Save current tool position so I can come back to it? (Read 3911 times)
0 Members and 1 Guest are viewing this topic.
bitviper
11
Save current tool position so I can come back to it?
«
on:
February 20, 2015, 07:17:47 PM »
I'd like to be able to call a routine that moves the mill somewhere and then, when the routine is done, I'd like the mill to return to where it was before the routine was called. Is that possible?
Logged
Overloaded
4,922
Re: Save current tool position so I can come back to it?
«
Reply #1 on:
February 20, 2015, 07:25:29 PM »
There is "Remember" and "Return" that might be what you want.
OEM 286 & 285 that you could build into a button script.
Russ
Logged
bitviper
11
Re: Save current tool position so I can come back to it?
«
Reply #2 on:
February 20, 2015, 07:27:02 PM »
Ah - thanks for the reply but I want to do it automatically in my code. The routine is called many times and I'd have to hang around throughout the job to press that button.
No way to do this in code?
Logged
Overloaded
4,922
Re: Save current tool position so I can come back to it?
«
Reply #3 on:
February 20, 2015, 07:29:07 PM »
Sure, could be done in a macro, then called with M****
Logged
bitviper
11
Re: Save current tool position so I can come back to it?
«
Reply #4 on:
February 20, 2015, 07:30:34 PM »
Ok. I'll look into how to use OEM codes in gcode. Will report back here when I figure it out and have working code.
Logged
Overloaded
4,922
Re: Save current tool position so I can come back to it?
«
Reply #5 on:
February 20, 2015, 07:30:54 PM »
or, how bout a subroutine, then a return ?
Logged
bitviper
11
Re: Save current tool position so I can come back to it?
«
Reply #6 on:
February 20, 2015, 07:31:48 PM »
I do use a subroutine already and it returns to the main program when it is done. Trouble is, the tool doesn't automatically return to where it was before the routine was called.
Logged
ger21
6,295
Re: Save current tool position so I can come back to it?
«
Reply #7 on:
February 20, 2015, 07:51:57 PM »
SetVar(1, GetOEMDRO(800))
SetVar(2, GetOEMDRO(801))
SetVar(3, GetOEMDRO(802))
Do Stuff Here
Code "G0 Z" & GetVar(3) ' Move to Previous Z Position
Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous XY Position
Logged
Gerry
2010 Screenset
http://www.thecncwoodworker.com/2010.html
JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
bitviper
11
Re: Save current tool position so I can come back to it?
«
Reply #8 on:
February 20, 2015, 07:54:29 PM »
Thanks. Are those lines going into my gcode file or in something else? I'm doing a lot of hunting regarding these OEM codes and they refer to VB scripting but I haven't found yet how that relates to the gcode file.
Logged
ger21
6,295
Re: Save current tool position so I can come back to it?
«
Reply #9 on:
February 20, 2015, 07:58:42 PM »
They need to go into an M code macro. I was assuming that's where you're "routine" was.
Logged
Gerry
2010 Screenset
http://www.thecncwoodworker.com/2010.html
JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Print
Pages:
1
2
»
Go Up
« previous
next »