My PP is adding extra commands

This forum is for general discussion regarding VCarve Pro
Post Reply
User avatar
rink
Vectric Craftsman
Posts: 188
Joined: Tue Jul 07, 2020 3:45 pm
Model of CNC Machine: OpenBuilds LEAD 1510 / VCarve Pro
Location: USA
Contact:

My PP is adding extra commands

Post by rink »

Good eveing.

Today, I output a toolpath, went to the CNC, hit “go”, and the machine just sat there…for a few seconds…then moved.

Turns out, the CNCPiranha-Arcs (mm) PP is outputting some extra commands into the G-code. It doesn’t happen when using the CNCPiranha-Arcs (inch) PP. Only when using the metric one. I’m attempting to attach a screen shot showing both gcode files side-by-side, with the extra commands highlighted. I wasn't able to attach the toolpath files.

The metric version of the PP is inserting commands to set the router speed, turn on the spindle, and then dwell for a while. Those are not needed. Is this by design or is it a bug?

Thx, rink.
Attachments
Untitled 5.jpg
I want to be unique like everyone else.

User avatar
jfederer
Vectric Wizard
Posts: 368
Joined: Tue Nov 27, 2018 1:09 am
Model of CNC Machine: CanCam D23M
Location: Horton Township Ontario Canada
Contact:

Re: My PP is adding extra commands

Post by jfederer »

My nc PPs do the same thing, the metric one goes to "home", pauses, then goes to 0,0. The Inch one skips the first 2 steps and just goes to 0.0. I haven't looked that the PP templates, but I assume whoever programmed them added the extra steps. We can edit them, I just haven't bothered.
Joe Federer

www.fabrikisto.com incl. Tailmaker software
www.federer.ca

User avatar
gkas
Vectric Wizard
Posts: 1451
Joined: Sun Jan 01, 2017 3:39 am
Model of CNC Machine: Aspire, Axiom AR8 Pro+, Axiom 4.2W Laser
Location: Southern California

Re: My PP is adding extra commands

Post by gkas »

rink wrote:
Fri Apr 23, 2021 10:38 pm
The metric version of the PP is inserting commands to set the router speed, turn on the spindle, and then dwell for a while. Those are not needed. Is this by design or is it a bug?
Vectric does not write the PP. So, you either get official changes from the hardware folks, or make the changes yourself.

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

Re: My PP is adding extra commands

Post by TReischl »

rink wrote:
Fri Apr 23, 2021 10:38 pm
Is this by design or is it a bug?

Thx, rink.
Not a bug. It is the way someone over at the machine place thought the post should run. Have you ever took a look at the post processor files?
"If you see a good fight, get in it." Dr. Vernon Johns

User avatar
rink
Vectric Craftsman
Posts: 188
Joined: Tue Jul 07, 2020 3:45 pm
Model of CNC Machine: OpenBuilds LEAD 1510 / VCarve Pro
Location: USA
Contact:

Re: My PP is adding extra commands

Post by rink »

Thanks for the thoughts guys. Actually I did look at the PP today. Both the one for inch and the one for metric. I couldn’t figure out what line in the PP was causing that. I’ll take another look.

How can I learn more about the code that makes up the PP? Would I have to contact the hardware manufacturer? Or is that language standard?

Thx, rink.
I want to be unique like everyone else.

User avatar
rink
Vectric Craftsman
Posts: 188
Joined: Tue Jul 07, 2020 3:45 pm
Model of CNC Machine: OpenBuilds LEAD 1510 / VCarve Pro
Location: USA
Contact:

Re: My PP is adding extra commands

Post by rink »

Update: I read the Vectric help doc on editing post processors. Pretty straightforward. Below is the entire text of the CNCPiranha-Arcs (mm) post processor. Couple thoughts:
1. This PP appears to be incomplete. There is no block section for rapid moves, plunge moves, footer, etc.as there is in the Piranha "inch" PP. If someone can confirm that...where would I get a complete one? Or could I just copy/paste the missing sections from the Piranha "inch" PP?
2. I don't see anywhere in this metric PP where it generates a DWELL (G04) command. So any idea why there would be one (a G04 P5) in my resulting g-code? It happened when saving out just the "selected toolpath", as well as when saving out "visible toolpaths to multiple files".

I'm using VCarve Desktop 10.513.

Thx, rink.

+================================================
+
+ G Code - Vectric machine output configuration file
+
+================================================
+
+ History
+
+ Who When What
+ ======== ========== ===========================
+ Tim 08/09/2015 Written
+ Mark 11/5/2016 Renamed to be standard pp for V8.5
+ MohamedM 08/07/2020 Inherit Next_Wave_CNC_mm
+================================================

POST_NAME = "CNCPiranha-Arcs (mm) (*.tap)"

POST_BASE = "Next_Wave_CNC.pp"

UNITS = "MM"

LASER_SUPPORT = "NO"


+================================================
+
+ Formating for variables
+
+================================================

VAR LINE_NUMBER = [N|A|N|1.0]
VAR POWER = [P|A| S|1.0|10]
VAR SPINDLE_SPEED = [S|A|S|1.0]
VAR CUT_RATE = [FC|A|F|1.1]
VAR PLUNGE_RATE = [FP|A|F|1.1]
VAR X_POSITION = [X|A| X|1.3]
VAR Y_POSITION = [Y|A| Y|1.3]
VAR Z_POSITION = [Z|A| Z|1.3]
VAR ARC_CENTRE_I_INC_POSITION = [I|A| I|1.3]
VAR ARC_CENTRE_J_INC_POSITION = [J|A| J|1.3]
VAR X_HOME_POSITION = [XH|A| X|1.3]
VAR Y_HOME_POSITION = [YH|A| Y|1.3]
VAR Z_HOME_POSITION = [ZH|A| Z|1.3]
VAR DWELL_TIME = [DWELL|A|P|1.2]
+================================================
+
+ Block definitions for toolpath output
+
+================================================

+---------------------------------------------------
+ Commands output at the start of the file
+---------------------------------------------------

begin HEADER

"( [TP_FILENAME] )"
"( File created: [DATE] - [TIME])"
"( for Next Wave Automation from Vectric )"
"( Material Size)"
"( X= [XLENGTH], Y= [YLENGTH], Z= [ZLENGTH])"
"( Z Origin for Material = [Z_ORIGIN])"
"( XY Origin for Material = [XY_ORIGIN])"
"( XY Origin Position = X:[X_ORIGIN_POS], Y:[Y_ORIGIN_POS])"
"( Home Position)"
"( X = [XH] Y = [YH] Z = [ZH])"
"( Safe Z = [SAFEZ])"
"([FILE_NOTES])"
"(Toolpaths used in this file:)"
"([TOOLPATHS_OUTPUT])"
"(Tool used in this file: )"
"([TOOLS_USED])"
"([TOOLNAME])"
"(|---------------------------------------)"
"(| Toolpath:- '[TOOLPATH_NAME]' )"
"(|---------------------------------------)"
"G90"
"G21"
"[FC]"
I want to be unique like everyone else.

User avatar
scotttarnor
Vectric Wizard
Posts: 945
Joined: Fri Aug 30, 2019 11:40 pm
Model of CNC Machine: Piranha XL , Shark HD520
Location: La Crosse WI

Re: My PP is adding extra commands

Post by scotttarnor »

Support@nextwavecnc.com they write the PP
Scott T

@scottscnc

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

Re: My PP is adding extra commands

Post by Adrian »

rink wrote:
Sat Apr 24, 2021 3:58 am

1. This PP appears to be incomplete.
It appears incomplete because you're not looking at the whole thing. It's a post processor that inherits another. The POST_BASE command says that it using everything in the Next_Wave_CNC file and then anything in this file are additions/replacements to that file.

GEdward
Vectric Craftsman
Posts: 232
Joined: Wed Jul 05, 2017 9:13 pm
Model of CNC Machine: 24 X 36 3 Axis
Location: Ipswich, South Dakota

Re: My PP is adding extra commands

Post by GEdward »

The problem may not be in the PP. If you are running Mach3 the problem might be in the Ports and Pins Configuration menu. In Ports and Pins there is a tab for spindle set up. Within the drop down menu is a section to set up dwell for spindle spin up time and spindle spin down time. This parameter allows time for the spindle to achieve full commanded rpm before the machine attempts to engage the tool.

Ed

GEdward
Vectric Craftsman
Posts: 232
Joined: Wed Jul 05, 2017 9:13 pm
Model of CNC Machine: 24 X 36 3 Axis
Location: Ipswich, South Dakota

Re: My PP is adding extra commands

Post by GEdward »

Ooops! The OP clearly shows the dwell command in the g code. By contrast, the inch g code generated with the CNC Piranha inch PP doesn't even show a spindle start command as far as I can see. In my PP menu there is a CNC Piranha mm processor which might be different from the Next Wave Automation processor that was used.

Ed

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

Re: My PP is adding extra commands

Post by Adrian »

As I said in my post you have to look at the CNCPiranha-Arcs and Next_Wave_CNC files together and treat them as one with the CNCPiranha-Arcs commands taking precedent where there is duplication.

The POST_BASE command is used to merge another post processor into this one. That's why there is no dwell command in the CNCPiranha-Arcs file, it's in the Next_Wave_CNC file but as far as VCarve is concerned it is in the CNCPiranha-Arcs post processor when it comes to saving the toolpath file.

User avatar
rink
Vectric Craftsman
Posts: 188
Joined: Tue Jul 07, 2020 3:45 pm
Model of CNC Machine: OpenBuilds LEAD 1510 / VCarve Pro
Location: USA
Contact:

Re: My PP is adding extra commands

Post by rink »

Good morning.
Sure enough, Adrian nailed it. There is another PP “Next_Wave_CNC.pp”. It does, indeed, include a dwell command. Here is the relevant section:
+---------------------------------------------------
+ Command output after the header to switch spindle on
+---------------------------------------------------

begin SPINDLE_ON

"G0 [ZH]"
"[S]"
"M3"
"G04 P5"

What an education for me! Now I think I can fix this situation by either:
1. Simply commenting out the dwell command from the existing POST_BASE PP.
2. Make a new, complete metric PP that has all the necessary commands and doesn’t need to inherit anything from another one.
3. Make a new abbreviated metric PP that only has one command which sets units to metric, then inherits everything else from the inch PP.
Would those approaches work?

Thx, rink.
I want to be unique like everyone else.

Post Reply