X, Y, Z movements to starting position when starting job

This forum is for general discussion regarding VCarve Pro
Post Reply
Mike3110
Posts: 8
Joined: Fri Dec 06, 2024 11:08 am
Model of CNC Machine: BZT PKE500

X, Y, Z movements to starting position when starting job

Post by Mike3110 »

Hi,

at job start, the spindle always firstly moves down in Z direction (after confirming tool change) and then to the X/Y zero position. This easily leads to collisions on the table. I now always manually switch these two lines in the G code file:

G0 Zxxx
G0 X0.000 Y0.000

to

G0 X0.000 Y0.000
G0 Zxxx

This works but is always manual action and easily forgotten. Is there a general setting to automatically have the movements in the "right" order?

I am using EdingCNC postprocessor. Or would I need to change the postprocessor? As a beginner, changing postprocessor is probably to difficult for me...

Thanks for your support!
Michael

User avatar
Adrian
Vectric Archimage
Posts: 15396
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: X, Y, Z movements to starting position when starting job

Post by Adrian »

From what I can see that post processor is doing what most do and is moving to the X,Y,Z positions defined in the Material Setup form on the toolpath tab at the start and end of every job.
form.png
You can change those values and they will become the defaults for future jobs.

You can also create a new post processor from the existing one and remove those lines entirely if you would prefer.

ira
Vectric Apprentice
Posts: 84
Joined: Thu Jan 04, 2024 12:22 am
Model of CNC Machine: hd-510

Re: X, Y, Z movements to starting position when starting job

Post by ira »

To be safe you should probably change the code to something like:

G0 Z-xxx
G0 X0.000 Y0.000
G0 Zxxx

To insure the Z is high enough it doesn't hit anything.when it first moves to X0,Y0. That seems to be how my Janome industrial robot works.

User avatar
Adrian
Vectric Archimage
Posts: 15396
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: X, Y, Z movements to starting position when starting job

Post by Adrian »

Sorry misread the post. You will need to edit the post processor if it's doing the moves in the wrong order.

There is a post processor editing guide on the Help menu.

NathanAu
Vectric Apprentice
Posts: 81
Joined: Mon Sep 16, 2019 3:43 pm
Model of CNC Machine: CNC Shark HD 3

Re: X, Y, Z movements to starting position when starting job

Post by NathanAu »

Putting the Z move first is the right thing to do, IMO. I didn't look at that machine's post processor but that first Z move should be moving the bit to the safe Z (rapid z gap above material on material setup dialog) or Home Z so that any following X/Y movements (first one is probably XYZ Home) won't crash into anything below the safe Z level as it moves in a straight line to Home. This is especially important if you zero on the machine surface and don't manually jog the height above the material and any clamps before you start the toolpath. When you look at the post processor, you can edit and set the first Z Move to "G0 [SAFEZ]". It might be set to "G0 [ZH]" which takes it to the home Z position which could be lower than the safe Z. I usually set the home Z and the safe Z the same but they can be different. Adrian's tip above shows you where to set the home position. The Safe Z setting is right above that.

One other thing to note about Safe Z: When you set the Rapid Z gap above material in the Material Setup, You give the height above the material but when you create a tool path it will show a different number than the rapid gap height if you set the Z zero on the machine bed instead of the material surface. I mostly do this on double sided jobs but there may be situations or machines where you always zero on the machine surface.

Mike3110
Posts: 8
Joined: Fri Dec 06, 2024 11:08 am
Model of CNC Machine: BZT PKE500

Re: X, Y, Z movements to starting position when starting job

Post by Mike3110 »

Thanks to all for the helpful hints and the comprehensive background information on this topic !!!

NathanAu
Vectric Apprentice
Posts: 81
Joined: Mon Sep 16, 2019 3:43 pm
Model of CNC Machine: CNC Shark HD 3

Re: X, Y, Z movements to starting position when starting job

Post by NathanAu »

BTW, I forgot to mention a reason to not remove those first movements to home (Z then XY) from the post processor. This also helps to ensure you do not crash into something when it starts moving towards the position of the first cut. If for example you move the spindle way off to one corner while you prepare the material and set Z zero, moving to home first after raising the bit is less likely to run into clamps or anything sitting on the bed as it moves in a straight line to the first cutting position. I also would not hardcode the safe Z and Home position in the post processor unless absolutely necessary for your machine. It is better to have the flexibility to adjust them on the material setup dialog so that they can be adjusted when special working holding is needed that might create a higher than usual obstruction. They could also be different on different sides of a 2 sided project or on different sheets.

Mike3110
Posts: 8
Joined: Fri Dec 06, 2024 11:08 am
Model of CNC Machine: BZT PKE500

Re: X, Y, Z movements to starting position when starting job

Post by Mike3110 »

Thanks!

I have now switched the two lines in the post processor
from

G0[ZH]
G0[XH][YH][F]

to

G0[XH][YH][F]
G0[ZH]

So, I can still use the variables, but the spindle first moves to the X/Y starting position and then goes down to the Z starting position. It leads to the same result as the manual adjustments in my first post. I didn't know that adjusting the post processor is so easy.

Is it correct that ZH is only used at the beginning for the starting position, and Z1 and Z2 are used as heights during the job when the spindle goes up and down at a new XY-position? At what Z[?] starts the slow movement down to the material, is it Z2? So, the spindle goes up to Z1, moves quickly to new XY and then down to Z2 and from Z2 down in the slow mode?

User avatar
Adrian
Vectric Archimage
Posts: 15396
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: X, Y, Z movements to starting position when starting job

Post by Adrian »

ZH is used at the start end of the job. Z1 is the clearance when rapid moving between cuts. Z2 is the level where the plunge speed takes over from the rapid speed for the Z axis.

So the machine will rapid move to ZH and then rapid to Z1 and to Z2 at which point it slows to the programmed plunge speed for the Z moves into the material. Plunge speed back up to Z2 and then rapid to Z1.

NathanAu
Vectric Apprentice
Posts: 81
Joined: Mon Sep 16, 2019 3:43 pm
Model of CNC Machine: CNC Shark HD 3

Re: X, Y, Z movements to starting position when starting job

Post by NathanAu »

By changing the sequence, you just made your problem worse and made it impossible to correct. For the reasons I mentioned above, I would not change the order of the Z and XY moves. You should be able to manage the problem you are seeing by simply adjusting the Home and Rapid Z Gap above material in the Material Setup Dialog in the Toolpaths commands tab. With the Z move first, you can be sure that the next XY move will stay at that level as moves to home. If you set Z Home to be above the material and any work holding clamps, crashes should not occur. On the other hand, if at the time you start the toolpath the bit is just above the machine bed after setting Z zero for example, without moving to ZH first, it will take a direct line to XH,YH and crash into anything in its path, probably including the material.

What settings do you have for Home Z and Rapid Gap in the material setup?
Screenshot 2025-02-03 101312.png

User avatar
Adrian
Vectric Archimage
Posts: 15396
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: X, Y, Z movements to starting position when starting job

Post by Adrian »

I'm confused as well. If the Z is going down when you have a ZH variable then the solution is to adjust the Z gap above material setting in the job as explained in my first post.

Sounds like you are having the Z rise to the top of it's movement either automatically as part of your Z setting process or manually and then when you run the job it's going down to a Z gap above material setting that you have far lower than that.

Z gap above material should really be as high as you can get your Z axis to go and then there are no issues.

Mike3110
Posts: 8
Joined: Fri Dec 06, 2024 11:08 am
Model of CNC Machine: BZT PKE500

Re: X, Y, Z movements to starting position when starting job

Post by Mike3110 »

Thanks for your further explanation, highly appreciated.

I will set ZH at a safe height, so it will not cause any crashes - independent of the order. However, I don't see any advantage in first going down to ZH. At the beginning of the job, the spindle goes to machine zero (highest Z) for tool change anyway. After confirming the tool change, it firstly goes above the material at the highest zero and then to ZH. This order is also standard for Fussion360 for example.

What I wanted to avoid is that during the job the spindle goes up to high and then very slowly down. But I understood now that Z1/Z2 is relevant for these movements.

Most important to me is that I now better understand the different Z variables and how I can define the order within the post processor. Thanks!

NathanAu
Vectric Apprentice
Posts: 81
Joined: Mon Sep 16, 2019 3:43 pm
Model of CNC Machine: CNC Shark HD 3

Re: X, Y, Z movements to starting position when starting job

Post by NathanAu »

I finally looked at the EndingCNC (inches) post processor. My machine does not support automated tool changes so it is new to me but one thing that you might want to look at is whether you have the tools defined correctly. If I understand what the PP is doing for tool changes, it relies on the setup tool length definitions to know where the tool is when making those moves. Based upon a quick study of the PP gcode and what you describe, it sounds like your machine zeros Z at the top rather on the machine or material surface as most hobbyist machines do and presumably calculates the Z zero position based upon tool and spindle length definitions. If the spindle is always at the top as you say after the tool change is complete, then you may be able to modify the repositioning in the tool change section from
"[N] G0[ZH]"
"[N] G0[XH][YH][F]"


to just

"[N] G0[XH][YH][ZH][F]"

and have it move in a straight line to the home position as long as you set home Z in Vcarve above any obstructions that you might run in to but you will have to decide whether that is appropriate for your machine. From your comments, it sounds like you do. I would leave the initial repositioning in the header with a Z home first just in case for some reason you have jogged to some place where the initial move could cause a crash when you execute the tool path.



EDIT: I may have misinterpreted what I saw about the rapid move speed so I deleted that.

Post Reply