I found a repository on github for post processor for Vcarve or Aspire software. I modified the file to work with my setup and marlin, by removing some of the g commands my setup didnt need, which is working, but I want to add a 4 axis and I need a wrapped post processor. I am just setting up my 4 axis now so I can not test it yet, but I was hoping someone who knows more about G code to look over what I have done to see if there is anything else needing changing or stands out. I listed the changes I made in the comments at the top of the file. Thanks,
+===========================================================================
|
| gCode - Vectric machine output post-processor for vCarve and Aspire
|
+===========================================================================
|
| History
|
| Who When What
| ======== ========== =====================================================
|DougS 12/17/2022 Added ROTARY_WRAP_X = "-A"
|DougS 12/17/2022 replaced XYZ to A on VAR XYZ_POSITION
|DougS 12/17/2022 Added VAR WRAP_DIAMETER = [WRAP_DIA|A||1.3]
|DougS 12/17/2022 removed Plung rate var and elements
|DougS 12/17/2022 removed ARC movements var and elements
|DougS 12/17/2022 removed var z Min and dwell elements
|DougS 12/17/2022 changed header to wraped x or y to a
| EdwardW 01/13/2020 Initial authoring
| Added status messages (M117)
| Enabled Arc movements (G2/G3)
| Added ending presentation
| EdwardW 02/28/2020
| Added G54 (CNC) coordinate support
| EdwardW 10/26/2021
| Added router control (M3/M5)
| EdwardW 12/14/2021
| Added helical-arc support
| Changed to unix line endings
| Improved comments
| Increased plunge speed when above material
| Now uses machine default rapid move speed
| Disabled PLUNGE_RATE section to avoid slowdowns
| Comments now report carved Z depth, not material Z
| EdwardW 1/22/2022
| Minor tweaks and comment updates
+===========================================================================
POST_NAME = "Marlin w/G54 Wrap X2A M3 (mm) (*.gcode)"
FILE_EXTENSION = "gcode"
UNITS = "mm"
ROTARY_WRAP_X = "-A"
+---------------------------------------------------------------------------
| Configurable items based on your CNC
+---------------------------------------------------------------------------
+ Use 1-100 (%) for spindle speeds instead of true speeds of 10000-27500 (rpm)
SPINDLE_SPEED_RANGE = 1 100 10000 27500
+ Replace all () with <> to avoid gCode interpretation errors
SUBSTITUTE = "([91])[93]"
+---------------------------------------------------------------------------
| Line terminating characters
+---------------------------------------------------------------------------
+ Use windows-based line endings \r\n
+ LINE_ENDING = "[13][10]"
+ Use unix-based line endings \n
LINE_ENDING = "[10]"
+---------------------------------------------------------------------------
| Block numbering
+---------------------------------------------------------------------------
LINE_NUMBER_START = 0
LINE_NUMBER_INCREMENT = 1
LINE_NUMBER_MAXIMUM = 999999
+===========================================================================
|
| Formatting for variables
|
+===========================================================================
VAR LINE_NUMBER = [N|A|N|1.0]
VAR SPINDLE_SPEED = [S|A|S|1.0]
VAR CUT_RATE = [FC|C|F|1.0]
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 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 X_LENGTH = [XLENGTH|A|W:|1.0]
+ VAR Y_LENGTH = [YLENGTH|A|H:|1.0]
+ VAR Z_LENGTH = [ZLENGTH|A|Z:|1.0]
VAR X_LENGTH = [XLENGTH|A||1.0]
VAR Y_LENGTH = [YLENGTH|A||1.0]
VAR Z_LENGTH = [ZLENGTH|A||1.0]
VAR SAFE_Z_HEIGHT = [SAFEZ|A||1.3]
VAR WRAP_DIAMETER = [WRAP_DIA|A||1.3]
+===========================================================================
|
| Block definitions for toolpath output
|
+===========================================================================
+---------------------------------------------------------------------------
| Start of file output
+---------------------------------------------------------------------------
begin HEADER
"; [TP_FILENAME]"
"; Material size: [YLENGTH] x [XLENGTH] x [ZMIN]mm"
"; Diameter = [WRAP_DIA] mm"
"; X Values are wrapped around the Y axis "
"; X Values are output as A "
"; Tools: [TOOLS_USED]"
"; Paths: [TOOLPATHS_OUTPUT]"
"; Safe Z: [SAFEZ]mm"
"; Generated on [DATE] [TIME] by [PRODUCT]"
"G90"
"G21"
";==========================================================================="
";"
"; Path: [TOOLPATH_NAME]"
"; Tool: #[T] : [TOOLNAME]"
";"
";==========================================================================="
"M117 [TOOLPATH_NAME] - Bit #[T]"
+---------------------------------------------------------------------------
| Rapid (no load) move
+---------------------------------------------------------------------------
begin RAPID_MOVE
"G0 [X][Y][Z]"
+---------------------------------------------------------------------------
| Carving move
+---------------------------------------------------------------------------
begin FEED_MOVE
"G1 [X][Y][Z] [FC]"
+---------------------------------------------------------------------------
| Begin new toolpath
+---------------------------------------------------------------------------
begin NEW_SEGMENT
";==========================================================================="
";"
"; Path: [TOOLPATH_NAME]"
";"
";==========================================================================="
"M117 [TOOLPATH_NAME] - Bit #[T]"
"M3 [S]"
+---------------------------------------------------------------------------
| End of file output
+---------------------------------------------------------------------------
begin FOOTER
"G0 [ZH]"
"M5"
"G4 S3"
"M117 Returning home"
"G0 [XH][YH]"
"M117 Routing complete."