Parking (save homing & position info at shutdown)

Users should post macros that they want to share in this forum. It is recommended that you attach the actual macro code to your posting. Also, please include a detailed description of what the macro does and why it is useful. It is also helpful to include line by line comments in the macro g-code file. This will help users modify it to fit their exact needs.

Please only submit one macro per posting and clearly name the subject in a way that describes the macro being posted.

If your macro builds on the work of others, please don't forget to give that person credit for his/her work.
Forum rules
No profanity, No gambling. No porn. No illegal activity of any kind. Violators will be removed without notice.
Post Reply
missionarymike
Posts: 15
Joined: Mon Mar 29, 2021 6:46 pm

Parking (save homing & position info at shutdown)

Post by missionarymike » Thu Jun 30, 2022 6:45 pm

This macro allows you to save the current homing and position info during shutdown without having to set GCode system variables.

Simply put, this code sends the machine to a specified location, mine is back center with the Z at full height, so it is out of the way.

The parked location is very machine specific. You MUST modify the XYZ variables in this file, if you don't, you might crash your machine if it doesn't have proper soft-limits set.

Code: Select all

(File: 'parking.nc')

G20 (imperial mode)
G90 (absolute distance mode)

; use G53 to use machine coordinates and avoid offsets
G53 G0 Z7 (move Z to safe height 1st, do NOT combine XYZ)
G53 G0 X36 Y48

M0 (Msg, Parked and ready for shutdown.)
M2
Please feel free to provide feedback on how this works on your machine.
Attachments
machine-parking.nc
machine-parking.nc
(256 Bytes) Downloaded 1532 times

bor MC
Posts: 31
Joined: Wed Mar 04, 2020 2:03 pm
Location: Grandy, NC
Contact:

Re: Parking (save homing & position info at shutdown)

Post by bor MC » Thu Jun 30, 2022 8:09 pm

I have been setting up all of my machine builds with this configuration;

https://www.facebook.com/borbuiltnc/pho ... &ref=notif

At start up the procedure is to;

- First click the "Home All" button - This triggers all axies to find their designated switch. For my setup, Z first to the max position, X second to the min, Y last to the max. Resting (switch back off) is the rear left-side corner of the machine with the Z at max height and 1/2" over the X and Y travel. (This is also PARK)

- Next click the grey X0 - Y0 MACROS button. This moves the gantry forward to a designated spot 1/2" inside the FULL travel of the X and Y axis and lowers the Z slightly then sets all axis as the new Zero.

%
G20
G90
G53 G0 X.7233 Y.8533 Z4
G90
G92 X0 Y0 Z4
G90


The remaining buttons are for regular use.

- PARK Raises the Z to 4" then moves the X/Y to the rear left-side corner of the machine. From here you can easily load and unload projects from the table, or shut-down the system.

%
G53 G0 Z4
G0 X0 Y96.5


- HOME Raises the Z to 4" then moves the gantry to the set X/Y zero point. from here you can jog it anywhere over your work piece for the T-Top program.

%
G53 G0 Z4
G0 X0 Y0
G92 X0 Y0


- T-Top Manually position the cutting head over any area of your work piece and click the T-Top button. You will be prompted to attach the plate and alligator clip, then click OK. Once this simple height probe is finished the code returns the Z to it's highest point and prompts you to remove the clip and plate. Click the HOME macros to go back to X/Y Zero.

%
G20
G90
M0 (MSG, Attach Plate)
G91
F10
G38.2 Z-4
G92 Z.103
G90
G53 G0 Z4
M0 (MSG, Remove Plate)


This set up was adapted from the larger machines we have at my day job, and honestly makes the at home versions easier and much more familiar to use.

MC

TimATX
Posts: 2
Joined: Tue Apr 14, 2020 6:00 pm

Re: Parking (save homing & position info at shutdown)

Post by TimATX » Wed Jul 13, 2022 9:02 am

VERY COOL! Thanks for sharing. I'll be sure to incorporate this soon.

Post Reply