How do I set PVC to raise the Z axis before/after carving?

This forum is for general discussion about PhotoVCarve.

How do I set PVC to raise the Z axis before/after carving?

Postby huntleybill » Tue Nov 27, 2018 1:41 am

After setting up my project is PVC, I save the file for milling out on my CNC. I use Universal Gcode Sender (UGS) to load and run the file. For an example, say I am carving something that in part has a total depth of 6mm. My issue is when the milling job is done the X,Y axis moves back to 0,0. The Z axis does not raise to clear the stock first causing the bit (which is still at a 6mm depth) to crash into the stock usually breaking the bit.

Is there a way to setup default commands withing PVC to raise the bit to clear the stock before the machine returns to "home"? If so, what commands do I use and where do I put those commands.

I really don't want to have to edit gcode every time I want to create a new project. I was hoping to set some defaults within the software. Is that possible?

I went to the UGS forum and they tell me that has to be done in PVC and not UGS. I have no idea! What do you say?
Thank you for your help
Bill
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby Adrian » Tue Nov 27, 2018 9:18 am

With PhotoVCarve it's the Rapid Clearance Gap in step 3 (Set Cutting Parameters) that sets the Z clearance throughout the process. In the other Vectric products there are more settings for Z clearance but just the one in PhotoVCarve.

As it's used when moving between grooves as well as the final move home it makes me think that there is something else going on here though as your job would have been ruined long before you got to the final move stage as the Z would drag at every move.

Are you using the correct post processor for your setup when saving the file at the end?
User avatar
Adrian
Vectric Archimage
 
Posts: 9587
Joined: Thu Nov 23, 2006 2:19 pm
Location: Surrey, UK
Model of CNC Machine: ShopBot PRS Alpha 96x48

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Tue Nov 27, 2018 5:13 pm

Thank you Adrian. I have tried G code mm .tap and Axyz.nc. Don't know if I should be using something else????

The Z does raise between grooves as it should. It just doesn't raise (enough) when the job is complete to clear the stock when X,Y return to "home".
I thought there was a one time entered default command string I could put into UGS a to raise the bit after the job completed and before X,Y returns to 0,0. Their forum tells me I would have to edit the G-code every time I created a job and insert that command (whatever that command is) into the appropriate place with-in the g-code. Seems like there would be an easier way than to have to edit g-code every time.
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby Adrian » Tue Nov 27, 2018 5:52 pm

If you know the commands you need you can edit them into the footer section of the post processor and then the code will be generated with them in place every time rather than having to edit them in.

I don't know what the correct post processor for your setup is but it seems to me that you're not using the right one if it's behaving the way you describe.
User avatar
Adrian
Vectric Archimage
 
Posts: 9587
Joined: Thu Nov 23, 2006 2:19 pm
Location: Surrey, UK
Model of CNC Machine: ShopBot PRS Alpha 96x48

Re: How do I set PVC to raise the Z axis before/after carvin

Postby GEdward » Tue Nov 27, 2018 7:02 pm

Are you by chance setting up the Z zero below the project surface? I ask because when doing lithophanes I do exactly that in order to get the image deep enough for the lighting effect to work. I set the X Y zero at the center of the project so that spindle just goes to the center of the project on the last line of code.
GEdward
Vectric Apprentice
 
Posts: 81
Joined: Wed Jul 05, 2017 9:13 pm
Location: Ipswich, South Dakota
Model of CNC Machine: Romaxx WD-1

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Tue Nov 27, 2018 10:04 pm

No...the Z 0 is sleghtly above the stock surface. This is more for the end of the milling. I get plenty of depth with pvc set to 2.5 mm. The problem is that when the carving ends, the bit does not raise 2.5mm before it moves back to center. The only other option, is to change the G code to NOT return X,Y to 0,0 after completion. But i dont know what code i need to remove to do that.
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Tue Nov 27, 2018 11:42 pm

Adrian wrote:If you know the commands you need you can edit them into the footer section of the post processor and then the code will be generated with them in place every time rather than having to edit them in.


That's just it. I don't know what those commands are and where the "footer" is. That is kinda what I am asking. What are those commands and where do I put them? :D
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Wed Nov 28, 2018 12:33 am

I think I found that the command I am looking for is G28. So, if I understand this right, I set the command to G28 Z5, This tells the machine to raise the Z axis 5mm past my "0" or Z start position. This should clear the bit from the stock.

So, where is the "footer" in PVC to put this command in so I don't have to enter it in every time?
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby GEdward » Wed Nov 28, 2018 1:56 am

G28 typically sends all axis to home. Unless you define Z home as being a point 5mm above the work piece it will send the Z to 0. In other words you will need to touch off Z on the work piece and then move Z up 5mm and then zero Z. This is because G28 sends all axis to their respective 0 positions as it relates to the part program, NOT the machine's zeroes. Also G28 is usually a rapid move and even if Z is moving up it may not be up high enough to clear the work piece before Y or X rams the tool into the work.

What my post processor generates looks like this on the last two lines of motion commands: G0 or ( G00 depending on the PP flavor ) Z3.00 followed by G0 X0.00 Y0.00. This makes everything pretty safe as the Z is commanded to 3mm above the work piece BEFORE X and Y do their thing.

I really don't much like the G28 command as it just rapids all axis to zero without regard to things being in the way; like clamping fixtures.
GEdward
Vectric Apprentice
 
Posts: 81
Joined: Wed Jul 05, 2017 9:13 pm
Location: Ipswich, South Dakota
Model of CNC Machine: Romaxx WD-1

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Wed Nov 28, 2018 2:51 am

GEdward: Thank you. That is a BIG help. I will try G0 instead of G28. This is what I am looking for.
Now, where do I put this command in PVC? Or do I put it in Universal Gcode Sender? And where do I put it in that program?

Thank you again.
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby Rcnewcomb » Wed Nov 28, 2018 3:19 am

You will need to update the post processor that you use for your machine. See the attached document.
Attachments
Post_Processor_Guide.pdf
(1.5 MiB) Downloaded 60 times
- Randall Newcomb
User avatar
Rcnewcomb
Vectric Wizard
 
Posts: 3544
Joined: Fri Nov 04, 2005 5:54 am
Location: San Jose, California, USA
Model of CNC Machine: GCnC/WinCNC

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Wed Nov 28, 2018 3:28 am

I looked at a few of the other post processor g-codes. Seems the post processor "Larken mm .nc" uses G0 Z? then G0 X? Y? Z?. I will try that PP on UGS and see what happens.


Rcnewcomb wrote:You will need to update the post processor that you use for your machine. See the attached document.


Thank you. I will look at this now.
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby GEdward » Wed Nov 28, 2018 3:34 am

PS, I use the G code tap post processor. So just for the heck of it I calculated a tool path using Axyz .nc and it does something weird, at least as I see it, on the 4th to the last line. It looks like this: N......G28G91Z0. G91 is positioning defined with reference to previous position so if the previous position was Z-2.5 then what? Either way however both post processor formats move Z to the "rapid clearance gap", which is set in the "set cutting parameters" section, in my case 2.5 mm, on the line before x and y are commanded to 0.
GEdward
Vectric Apprentice
 
Posts: 81
Joined: Wed Jul 05, 2017 9:13 pm
Location: Ipswich, South Dakota
Model of CNC Machine: Romaxx WD-1

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Wed Nov 28, 2018 3:42 am

WOW...this PP Guide answers a lot! I didn't know this existed. Thank you
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Re: How do I set PVC to raise the Z axis before/after carvin

Postby huntleybill » Wed Nov 28, 2018 3:53 am

GEdward wrote:Either way however both post processor formats move Z to the "rapid clearance gap", which is set in the "set cutting parameters" section, in my case 2.5 mm, on the line before x and y are commanded to 0.


I noticed that too. As I mentioned I looked at the Larken PP and it used G0 command in the footer while those others used G28. But if I change that parameter to say 3mm using the "set cutter parameters", then every time to tool starts a new line, it also raises the bit 3mm which increases travel and time it takes to make the part. But if it raises the Z axis above the stock and doesn't break the bit or ruin the piece, then I'm not sure that is really an issue. I'll have to try it on the CNC to see what actually happens.
huntleybill
Vectric Apprentice
 
Posts: 36
Joined: Tue May 30, 2017 12:51 am
Model of CNC Machine: Home Built

Next

Return to PhotoVCarve - General

Who is online

Users browsing this forum: No registered users and 1 guest