Rember and Return function

Here is where you can drop off Examples of WORKING macros,plugins,Gcode programs , macro Wizards etc.
Please give a brief description of what it is and how it works.

Rember and Return function

Postby Vmax549 » Sat Jan 27, 2018 6:38 pm

This is a function to remember where you are at and return back to that location when you are ready to restart the Gcode program. It is in 2 parts macro M20913 (Remember) and M20915 (Return). You can set them up as buttons OR hotkeys. I use F5 and F6 here for testing. To use UNZIP teh file into your macro folder.

To use when you are running a program.

Hit {CycleStop} this stops motion and shuts off teh spindle and coolant.

Hit { REM } this records teh XYZ Position infomation and any Modal modes This is teh point of return. It then raises teh Z up to ZHome( G53 X0)

Make your 1st waypoint move. Sometimes you have to manipulate a path to stay clear of objects.
Hit { REM } to record teh waypoint.

repeat up to a total of 3 waypoints. When you run out of waypoints it will alert you. ASND wll not let you set anymore.

When you get out of harms way then you can do anything you need to such as change tools, Check teh part, what ever(;-)

When you are ready to return back to teh program simply HIT { RET } and teh machine will return back to teh point of return via teh waypoints you programed.

At the last waypoint before it goes back to teh point of return it will remind you to turn teh Spindle and coolant back on.

Then it will return to teh point of return and reset any modal value that may have changed back to what teh program requires for restart. And wait on YOU to press {CycleStart} to restart teh program.

This function along with UCCNC's cyclestop/start allows you to stop and start from an ARC and also a canned drill cycle (;-)

Please test this carefully until you fully understand it. (;-)

IF you have wants and wishes or FIND glitches let me know and I will see what I can do.

(;-) TP
Attachments
Rem_Ret.zip
(1.18 KiB) Downloaded 29 times
Vmax549
 
Posts: 915
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Rember and Return function

Postby dezsoe » Sun Jan 28, 2018 9:22 am

Hi Terry,

Hit { REM } this records teh XYZ Position infomation and any Modal modes This is teh point of return. It then raises teh Z up to ZHome( G53 X0)

It's not the first time I meet G0 G53 Z0 as a safe position for Z. It may be a good practice on some machines, but there are others that don't have 0 at the top. As you could probably find out, mine also don't have the Z0 there. Before 2101 I set 50 to Write offset on homing and my SmartHome macro pulled Z back to 45. In 2101 and later I set 45 to Write offset on homing and -5 to back off. Also, my softlimit Z+ is set to 45. Running to Z0 in machine coords could make some trouble on my machine... :) I don't know what would be the best way: parametric, input, anything else? In my macros when I have to pull up Z fully I use the softlimit value, but you cannot guarantee that on others' machine softlimit is set.

Code: Select all
    exec.Code("G00 G53 Z" + AS3.Getfielddouble(42).ToString("F4"));             // Go to Zaxissoftlimitplus

Sorry, I don't know the resolution, only the problem... :)
dezsoe
 
Posts: 418
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Rember and Return function

Postby Dan911 » Sun Jan 28, 2018 2:58 pm

IMO I think you will find more users with soft limits disabled than you would not using 0 for top. I would just add a
messagebox to give warning and a chance to edit. User can always slash// out the messagebox once aware and edit if needed.

Dan
Dan911
 
Posts: 302
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Rember and Return function

Postby Vmax549 » Sun Jan 28, 2018 6:29 pm

The answers would be to let the USER raise the Z to a safe level as the first waypoint.(;-)

(;-) TP
Vmax549
 
Posts: 915
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Rember and Return function

Postby Sword » Sun Jan 28, 2018 9:44 pm

I'll try this on a machine later, but trying it in demo mode, I get a way points full message upon the first Remember.

Ideally, the Z would pull up right away with the cycle stop. Assuming this would be a UCCNC thing, but suppose a macro for the cycle stop button would work too. :?:
Sword
 
Posts: 16
Joined: Fri Dec 08, 2017 10:45 pm

Re: Rember and Return function

Postby Vmax549 » Sun Jan 28, 2018 10:21 pm

Try clearing teh Vars by hitting teh return button first. Teh function uses Vars 500 -513 . IF you have something going on with those Vars there may be a problem.

Auto raise of Z with cyclestop can raise safety issues. IF at teh time you pressed cyclestop you were undercutting teh part then you could destroy both part and tool. Been there on that one (;-)

Trying to do from a macro can raise problems with UCCNC. When you hit Cyclestop not only does teh gcode stop it also cancels macros.. SO if it cancels teh macro you are running teh cyclestop from RUTROW and strange things can happen. Been there as well.

(;-) TP
Vmax549
 
Posts: 915
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Rember and Return function

Postby Sword » Wed Jan 31, 2018 8:24 pm

Thanks Vmax, that got it working (both in demo and at the machine), but it seems that it needs to be done again after a restart. Hitting Return to clear it can cause some unwanted movement as well, possibly from some previously saved waypoints.

Understand about the auto raise issue. While I seldom do any undercutting with a table router and wood, I can see the possibilities for those with mills. That said, as soon as you hit remember, that's what happens. So, don't hit cycle stop until it's no longer in an undercut situation.

In testing, I see a couple of issues. Here's a step by step...cycle stop, remember (Z retracts here which is fine with me, but not so much for any undercutters out there :o ), click ok for first waypoint, jog somewhere, remember, click ok for second waypoint, jog somewhere again if desired, etc. until all waypoints are used and then hit return and ok. It now makes it's return path, but it asks to start spindle/coolant one step to soon (if more than one waypoint). At this point, it would be nice to have the dialog stay on top because you have to click away to start the spindle and then bring the dialog back up to click ok. If you have more than one waypoint, it now makes it's last return path and then down to where it was. If you click on ok to the start spindle/coolant before clicking away to start them, it will take off without being ready or having started them.

Scott
Sword
 
Posts: 16
Joined: Fri Dec 08, 2017 10:45 pm

Re: Rember and Return function

Postby Vmax549 » Wed Jan 31, 2018 8:47 pm

When you are down in teh hole and you hit {CycleStop} it should not retract Z. It should stop motion AND turn off coolant.

Then for your first move you back out of teh undercutting if there is any then set that waypoint. Then add as many waypoint as you need up to 3. If you do not need them then do not hit remember just go to where ever and do what ever.

To return just make sure you can get to teh waypoint to start teh return. It will go back to teh point of return following teh waypoints. IF it was an undercut then it lowers back to Z- then moves back into teh position of XY. at that point the spindle should be up to speed and ready for you to press {CycleStart} and teh program continues where it left off.

IF you were in the hole of a drill cycle it will recover for there as well

AT LEAST that is how it works here. ;)

I will recheck it (;-) TP
Vmax549
 
Posts: 915
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Rember and Return function

Postby Vmax549 » Wed Jan 31, 2018 10:16 pm

OK I am BAD, I forgot to comment out teh Z raise action :oops: that will fix teh undercut error as YOU will have to move it clear for liftingZ then raise and move away.

The turn on spindle works OK just go over to teh Spindle and coolant buttons and click on them before you say OK.

I will create a button to clear the Waypoints on { REM } if it is needed. That way there will be ZERO motion involved.

Thanks for the testing and suggestions, (;-) TP
Vmax549
 
Posts: 915
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Rember and Return function

Postby Vmax549 » Wed Jan 31, 2018 11:07 pm

OK HERE is the updated version if you want to test. I think I cover all teh bases.

(;-) TP
Attachments
M20915.txt
(1.9 KiB) Downloaded 26 times
Vmax549
 
Posts: 915
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Next

Return to UCCNC TOOL BOX

Who is online

Users browsing this forum: Google [Bot] and 1 guest