G-Code from V-Carve Desktop - newbie :)

This forum is for requests and queries about machine tool support for Vectric Products
Post Reply
User avatar
Woodturner-Girl
Posts: 5
Joined: Mon Mar 15, 2021 3:47 am
Model of CNC Machine: centroid controlled home built

G-Code from V-Carve Desktop - newbie :)

Post by Woodturner-Girl »

Hello Everyone,
New to me CNC machine, running Mach3, trying to test. I just purchased the license for both V-Carve Desktop and Mach3.
I happily designed a small plaque in V-Carve to test my machine, exported for Mach2/3 Arcs (inch), setup the machine and set zero for x,y and z - every single time I run from machine home a few things are driving me crazy. The main thing is with my code, it doesn't say anywhere G54 - which is what I am using in my Mach3 for part zero. When I run my file, it sometimes moves z first, which bothers me, as well it starts z .2 inches above the work piece? Can't figure this out, feel like I have gone through all settings.
We also have other software so my husband sent a file which was saved g-code for Mach3 on that, the G54 line is there - machine runs perfectly.
My question, why does saving through V-Carve for Mach2/3 G-code not have the G54 line? If not needed, where am I going wrong for it to see .20 above my material top as the z start point? Files here:

Mach3 test txt is thru other software and pocket 1 clear is through V-Carve.
any assistance you can give me is greatly appreciated!!
thanks,
Colleen
Attachments
Mach3 test.txt
(92.67 KiB) Downloaded 178 times
Pocket 1 [Clear 1].txt
(60.27 KiB) Downloaded 171 times
Colleen

User avatar
Leo
Vectric Wizard
Posts: 4080
Joined: Sat Jul 14, 2007 3:02 am
Model of CNC Machine: 1300 x 1300 x 254 Chinese Made
Location: East Freetown, Ma.
Contact:

Re: G-Code from V-Carve Desktop - newbie :)

Post by Leo »

G54 is DEFAULT -

MOST machines start up in G54 mode. Even industrial machines do that, so it is not required to have the G54 code in the program.

If however you want to use a different work coordinate system like for instance you have two different parts on the CNC machine, you can insert a G55 or G56 and so on. The new G code will cancel the G54 and activate the G55 or whatever else you set.

When Mach 3 is shut down, then reopened it will return to the Default G54. Also if you want to go back to G54 within the same program as you had the G55 set, you can simply insert another G54 and that will cancel the G55 and return back to G54.

Mach3 has about 90 work offsets available.

It is very useful once to get to understand it. I am not aware of anything in Vectric where this can be set. It needs to be done directly in the GCode program.
Imagine the Possibilities of a Creative mind, combined with the functionality of CNC

User avatar
TReischl
Vectric Wizard
Posts: 4567
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: G-Code from V-Carve Desktop - newbie :)

Post by TReischl »

IIRC G54 is the default for Mach3. In other words, it will use that unless you spec G55, G56, etc. It has to have a default workpiece coordinate system and G54 is it.

If you would feel better having it in your code then you can head over to the post processor folder, open the post up and add the G54 so it will appear in all your programs. HOWEVER. . . if you are using workpiece/fixture offsets to control the machine that can throw a monkey wrench in the works.

If'n it were me, I would leave it as is until your are firmly grounded.
"If you see a good fight, get in it." Dr. Vernon Johns

User avatar
TReischl
Vectric Wizard
Posts: 4567
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: G-Code from V-Carve Desktop - newbie :)

Post by TReischl »

About that Z.2, that is a safe distance above the actual work surface, a rapid point. It is normal, do not worry about it.
"If you see a good fight, get in it." Dr. Vernon Johns

User avatar
Rcnewcomb
Vectric Archimage
Posts: 5864
Joined: Fri Nov 04, 2005 5:54 am
Model of CNC Machine: 24x36 GCnC/WinCNC with ATC
Location: San Jose, California, USA
Contact:

Re: G-Code from V-Carve Desktop - newbie :)

Post by Rcnewcomb »

When I run my file, it sometimes moves z first, which bothers me, as well it starts z .2 inches above the work piece? Can't figure this out, feel like I have gone through all settings.
There are 3 different Z settings under the Material Setup on the Toolpaths Tab.
Screen Shot 2021-03-16 at 9.00.30 AM.png
Rapid Z Gaps above Material
Clearance (Z1)
This is the height above the job at which it is safe for the cutter to move at rapid or maximum feed rate. The software will raise the bottom of the cutter to this height when it traverses the material.

Plunge (Z2)
For all toolpaths, as well as specifying a rapid clearance gap for rapid positioning moves above the workpiece, the user can also specify a much smaller gap that the tool will rapid down to during plunge moves. By default the plunge gap is set to the same value as the Clearance gap which means that there will be no rapid plunges. If you set the plunge gap to a smaller value than the Clearance gap, the tool will plunge at rapid feed rate to the specified distance above the material surface before changing to the specified plunge rate. For jobs where a large value for Clearance gap has to be specified to avoid clamps etc, this feature can save a considerable amount of machining time if there are a lot of plunge moves in the job.

Note: Some engraving machines are not able to take advantage of this feature.

Home / Start Position
This is the absolute position that the tool will start moving from and where the tool can be programmed to return to at the end of cutting the job.
- Randall Newcomb
10 fingers in, 10 fingers out, another good day in the shop

User avatar
Woodturner-Girl
Posts: 5
Joined: Mon Mar 15, 2021 3:47 am
Model of CNC Machine: centroid controlled home built

Re: G-Code from V-Carve Desktop - newbie :)

Post by Woodturner-Girl »

thanks everyone - I'm heading into the shop with the exact file that was exported, but I'm using V-carve.
my rapid z gap above material is:
clearance .2 plunge .2
home / start position -- y - 0 x - 0 -- z .21

when I use the file above, these were the same settings, but my spindle actually moves around the top as if it thinks its cutting at .20 above the material. My thought was the home/start should also be zero? we will see shortly how the file works :) be back soon
Colleen

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

Re: G-Code from V-Carve Desktop - newbie :)

Post by Adrian »

Have you set z-zero on the machine to match what you have it set to in VCarve?

The Home Start Z gap above material is where the Z axis moves to at the start and end of the job. It shouldn't be zero and it will automatically set to be greater than Z1 if you do try to set it to zero.

User avatar
Woodturner-Girl
Posts: 5
Joined: Mon Mar 15, 2021 3:47 am
Model of CNC Machine: centroid controlled home built

Re: G-Code from V-Carve Desktop - newbie :)

Post by Woodturner-Girl »

Okay, so this may be a mach3 question, so please tell me to head there if necessary :) - I started my program - see gcode below sent from V-Carve.
My problem now lies that my z axis moves first - in doing this it will hit my fixture. If, as I hoped, it moves across y, forward on x and then down - where I want it to cut - should work perfectly, but if I allow to run out of the box v-carve gcode - moves z first.
as mentioned previously - fusion gcode runs great :)
I don't want to use fusion - love v-carve :) thanks again for helping!!!
Attachments
Profile 1.txt
(7.38 KiB) Downloaded 172 times
Colleen

User avatar
Woodturner-Girl
Posts: 5
Joined: Mon Mar 15, 2021 3:47 am
Model of CNC Machine: centroid controlled home built

Re: G-Code from V-Carve Desktop - newbie :)

Post by Woodturner-Girl »

Adrian wrote:
Tue Mar 16, 2021 6:22 pm
Have you set z-zero on the machine to match what you have it set to in VCarve?

The Home Start Z gap above material is where the Z axis moves to at the start and end of the job. It shouldn't be zero and it will automatically set to be greater than Z1 if you do try to set it to zero.
Hi Adrian, I have set zero as material surface which is what I did on the machine, also, gap above model from v-carve is set to zero.
I haven't let it run yet, as if I do, it will hit my fixture by moving z first. I just don't understand why the gcode from fusion worked and v-carve doesn't. If it was mach3, then technically the gcode from fusion would have been doing the same thing
Colleen

User avatar
adze_cnc
Vectric Wizard
Posts: 4303
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: G-Code from V-Carve Desktop - newbie :)

Post by adze_cnc »

I had the same issue when our machine's "brain" was upgraded to move more effificiently.

From your "Profile 1.txt" file:

Code: Select all

N190 X0.0000Y0.0000F40.0
N200 G00X3.5131Y4.6091Z0.2000
Line N200 moves directly to the new x,, y, z point by the shortest distance.

To fix this I made a copy of the post-processor file that I used and added the words "no ramp" to the name. I then altered a section within the new post-processor file from:

Code: Select all

begin RAPID_MOVE

"[N] G0 [X] [Y] [Z]"
to

Code: Select all

begin RAPID_MOVE

"[N] G0 [X] [Y]"
"[N] G0 [Z]"
The Mach 2/3 post-processor has a similar line. Presumably the Fusion output does similar to what I have done above. You could post a sample g-code file from Fusion to verify.

User avatar
Leo
Vectric Wizard
Posts: 4080
Joined: Sat Jul 14, 2007 3:02 am
Model of CNC Machine: 1300 x 1300 x 254 Chinese Made
Location: East Freetown, Ma.
Contact:

Re: G-Code from V-Carve Desktop - newbie :)

Post by Leo »

The code that is posted out of Fusion WILL be different. I had the exact same issue.

In Vectric the "Z" moves up to a safe position as shown in the dialog box that Rcnewcomb posted. This is because of how Vectric has created the "safety" lines in their post processor.

Fusion has a little different format in their post processor.

I have been professionally CNC programming for many years and I prefer the method that Vectric uses.

Moving "Z" straight up to a safe position helps to move the tool above clamps and such. There are three settings in those boxes that Rcnewcomb posted. It would be a really good idea to get REALLY familiar and to get a good understanding on how they work. They are REALLY useful, but you really need to get a decent understanding of what they are doing.

On my machine with Mach3 - I set those values as : Z1 is .5, Z2 is .2
Home / Start Position is X0, Y0, Z4.0

Everyone is going to be different, but these are the setting I use.

I have never changed my Mach3 post - I am happy the way it works.

At the start of the program, the "Z" moves to 4", then the "X""Y" moves to the start cutting position, then the cutter moves "Z" down to 1/2 inch above, then "Z" moves to .2 above. From there the cutter FEEDS into the cut and starts cutting. To me - that is some nice smooth safe motions.
Imagine the Possibilities of a Creative mind, combined with the functionality of CNC

User avatar
Woodturner-Girl
Posts: 5
Joined: Mon Mar 15, 2021 3:47 am
Model of CNC Machine: centroid controlled home built

Re: G-Code from V-Carve Desktop - newbie :)

Post by Woodturner-Girl »

Hello Everyone,

I want to express my sincere gratitude for your assistance in solving my z axis problem. It turns out it was the home start position, the z gap above material. As soon as I corrected that.... all works perfectly!!

Also, as noted, I do not need the line G54 in g-code for it to work :)

Thanks everyone!!! Couldn't have done it without you!

Collee
Colleen

Post Reply