Page 1 of 1

CNC parking after executing a file

PostPosted: Fri Mar 04, 2022 2:20 pm
by Koduvana
Hi!
How could I set up the rule that after executing a file the machine will go automatically to my custom coordinates instead of parking at home coordinates? Controller AXbb-E and CAM UCCNC.

Re: CNC parking after executing a file

PostPosted: Fri Mar 04, 2022 3:32 pm
by ger21
Edit the M200-M202 macros with your park position, and call the M codes from your g-code.
For example, M200 in your g-code will run the M200.txt macro, and send the machine to Park Position #1.

Re: CNC parking after executing a file

PostPosted: Sat Mar 05, 2022 6:52 am
by Koduvana
Thank you, Ger21.
It could be written then even by coordinates to the end of file. I'we been thinking something automatic as present system - I should not write anything and it goes to home at this sample.

Re: CNC parking after executing a file

PostPosted: Sat Mar 05, 2022 2:47 pm
by Vmax549
Modify the M30 macro so that the machine goes HOME when it runs. Z home then XY home. When UCCNC sees the G30 it runs the M30 macro and goes home. It becomes automatic. At program end the machine goes HOME.

THAT depends on of course that you actually have a G30 at the end of your program

Just a thought(;-)TP

Re: CNC parking after executing a file

PostPosted: Mon Mar 07, 2022 9:52 am
by Koduvana
Thank you!
At the moment M30 seems to be empty...
Should I write here just G00 Z100 X0 Y1000 for example?

Re: CNC parking after executing a file

PostPosted: Mon Mar 07, 2022 11:06 am
by Vmax549
I would try it this way. BUT remember when the M30 runns in the Gcode program the machine IS going to move to this location EVERY time so be aware that it will happen every time. It is programmed to move to machine coordinates. That way it goes back to the exact Table position regardless of what work offsets you may have set. Also programed this way you KNOW what directions the moves will be. First it retracts to Z home, then moves in the Yhome direction and then moves in the X home direction.
IF you want it to retract Z then WAIT for you to check clearance you can program a M00 after the Z move. That way it will stop and wait on you to press the {cyclestart} button to proceed to Y home then X home

(;-) TP


exec.Code("G00 G53 Z0.0000"); // retract Z up to home
while(exec.IsMoving()){}
exec.Code("G00 G53 Y0.0000"); // Move Y to home
while(exec.IsMoving()){}
exec.Code("G00 G53 X0.0000"); // Move X to home
while(exec.IsMoving()){}

Re: CNC parking after executing a file

PostPosted: Mon Mar 07, 2022 11:43 am
by Koduvana
I added your code to M30 - no any reaction. Then I added just G code as I write before - no action.
Can it be that M30 or even all macros are not related to anything and I should relate them?
.... But goto park1 works.....

Re: CNC parking after executing a file

PostPosted: Mon Mar 07, 2022 12:15 pm
by ger21
There's currently a bug in UCCNC that prevents this from working.

https://www.forum.cncdrive.com/viewtopic.php?f=3&t=2552

Re: CNC parking after executing a file

PostPosted: Mon Mar 07, 2022 12:47 pm
by Koduvana
Thanks, ger!
Isnt there any fix for it??

Re: CNC parking after executing a file

PostPosted: Mon Mar 07, 2022 1:23 pm
by ger21
Should be fixed in the next release.