585,712 active members*
4,041 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2008
    Posts
    77

    What is a Postprocessor

    Good Day,

    I'm interested in DesignCAD/Contour CAM as it is hobbyist-priced. But it does not have a post-processor for Millpwr.

    What is a post processor and how hard is it to write one? What is it written in? Does it clean up the G code, modify it, add to it?

    Also, I noticed that this package doesn't have much activity on this forum. Any comments on why?

  2. #2
    Join Date
    Apr 2006
    Posts
    28
    Does the CAM program have a demo? If so, you may want to look to see if they have a generic "G-Code" post. Not saying that Millpwr will run on it but it may.

  3. #3
    Join Date
    Jun 2003
    Posts
    453
    A post processor is a program used to modify generic g-code such that it can be used on a particular cnc machine. The modifications to the code are generally fairly minimal and can be done manually by the operator if required. I've never had to write one so I can't comment on that, best you track down someone who has written one for the software you're looking at and see what they have to say, or contact the software seller or manufacturer.

  4. #4
    Join Date
    Dec 2008
    Posts
    4548
    I'll take a stab at simplifying an explanation. Anyone else chiming in would be great.

    So you have XYZ moves in a coordinate system. These may look like this:

    X-6.032136Y1.41912Z0.835333
    X-5.907102Y1.41912Z0.822
    X-5.782069Y1.41912Z0.803333
    X-5.657035Y1.41912Z0.776
    X-5.532001Y1.41912Z0.751333


    These moves have to be defined as a certain "type" of move. So a human readable version may look like this:

    [setup]
    [home]
    X-6.032136Y1.41912Z0.835333
    [rapid]
    X-5.907102Y1.41912Z0.822
    [feed]
    X-5.782069Y1.41912Z0.803333
    [start]
    X-5.657035Y1.41912Z0.776
    X-5.532001Y1.41912Z0.751333
    [end]

    very simplified.

    All the controlers use different "commands" to represent the human readable.


    So one controller may use G00/G01 ro represent a command for a move, another may require a different command.

    So you could have this for a single line profile:

    N04 T01 M06
    N05 G90 G54 X.1027 Y.232 S1252 M03
    N06 G43 H01 Z.1 M08
    N07 G01 Z-.5 F5.0115
    N08 X1.7002 F9.7724
    N09 G00 Z.1
    N10 M09
    N11 M05
    N12 G91 G28 Z0.
    N13 G91 G28 Y0.
    N14 T01 M06
    N15 M02

    Notice the commands mixed in to the coordinate values. THe same operation with a different post process could be:


    N02 M00
    N03 G00 X0.1027 Y0.232
    N04 Z0.1
    N05 G01 Z-0.5 F5.0115
    N06 X1.7002 F9.7724
    N07 G00 Z0.1
    N08 M02

    Just different commands created for the same thing. Formated in a different way. Some controllers wont like to see the line numbers. N04. Your post would need to not put these in in that case.

    To write your own, you will need to have software that allows you to configue it (or they provide one for your contollers needs). Some are just text files. You will need to know the syntax that the post uses to set the commands for various moves and operations, and you will need to know what your controller is expecting/needs to see for these settings.

    The post processor is a "configuration engine" that inserts/formats the gcode "post (after) generation of toolpath" to suit the needs of the controller.

    Does that make sense?

  5. #5
    Join Date
    Jan 2008
    Posts
    77
    Very good. Yes, that makes it clear.

    Thank you.

  6. #6
    Join Date
    Aug 2007
    Posts
    339
    Posts are generally written in C++ Language but can also be written in C. using cammands and satements to generate the G Code. such as "GO TO" "IF THEN" "END IF" and many many others. You would need to understand the Control for the Machine and write the Post accordingly for that machine.

    Below is a small snipit of the post I use to show you the basic format of one.

    $------------------------- PROGRAM LEADING/TRAILING LINES -------------------
    $10 File LEADING lines
    $LET DATE = DAT
    ''
    $IF DEBUG = 1
    -> $10
    $ENDIF
    ''
    %
    ''
    $12 Main Program LEADING lines
    $LET COUNT = 1
    $LL1
    $IF COUNT <= NMT
    (OP [(COUNT)] TOOL [T(COUNT)], [TNM(COUNT)] [TNT(COUNT)])
    $LET COUNT = COUNT + 1
    $GOTO 1
    $ENDIF
    ''
    $IF DEBUG = 1
    -> $12
    $ENDIF
    ''
    (NC CODE FILE - [FNM][FNE])
    (CREATED - [DATE])
    $IF SOLIDCAM = 0
    (POST-PROCESSED FOR FLEXICAM BY ALPHACAM)
    (PROGRAMMED BY - [MY_NAME])
    ([DESCRIPTION])
    $ELSE
    (POST-PROCESSED FOR FLEXICAM BY INTELLI-CAM)
    (PROGRAMMED BY - [MYNAME])
    ([DESCRIPTION])
    $ENDIF
    ''
    $IF [NSH] >= 1
    (SHEET NUMBER [SHN] OF [NSH])
    $ENDIF
    ''
    $IF METRIC = 0
    ''(PANEL LENGTH - X: [PANEL_X])
    ''(PANEL HEIGHT - Y: [PANEL_Y])
    ''(PANEL DEPTH - Z: [PANEL_Z])
    G70 G90 G40
    $ELSE
    ''(PANEL LENGTH - X: [PANEL_XM])
    ''(PANEL HEIGHT - Y: [PANEL_YM])
    ''(PANEL DEPTH - Z: [PANEL_ZM])
    G71 G90 G40
    $ENDIF
    ''
    $15 Main Program TRAILING lines
    ''
    $IF DEBUG = 1
    -> $15
    $ENDIF
    ''
    G0 X[SHX] Y[SHY]
    ''
    $IF [NSH] > 1
    $GOTO 10
    $ELSE
    $GOTO 99
    $ENDIF
    ''
    $LL 10
    $IF [SHN] < [NSH]
    M00
    (LOAD NEXT SHEET)

    $ENDIF
    ''
    $LL 99
    ''
    $17 File TRAILING Lines
    ''
    $IF DEBUG = 1
    -> $17
    $ENDIF
    ''
    M30
    %
    ''
    $----------------------- RAPID MOVES ----------------------------------------
    $20 Rapid Move IN XY (MILL/ROUTER/FLAME/LASER) or XZ (LATHE) only
    ''
    $IF DEBUG = 1
    -> $20
    $ENDIF
    ''
    $IF OPT = 2 '' Drilling?
    $GOTO 99
    $ENDIF
    ''
    $IF [GAX] < 0
    $MSG
    All toolpaths MUST be IN the FIRST Quadrant!

    Modify your operations and Re-Post.
    $EXIT
    $ELSEIF [GAY] < 0
    $MSG
    All toolpaths MUST be IN the FIRST Quadrant!

    Modify your operations and Re-Post.
    $EXIT
    $ENDIF
    ''
    $IF FIRST_RAPID = 0
    G0 X[GAX] Y[GAY]
    $ELSE
    G0 X[GAX] Y[GAY] Z[-GAZ]
    $ENDIF
    ''
    $LL99
    $LET FIRST_RAPID = 0
    $LET AFTER_DRILL = 0
    ''
    $----------------------------------------------------------------------------
    $21 3D Rapid Move IN XYZ (MILL/ROUTER ONLY)
    ''
    $IF DEBUG = 1
    -> $21
    $ENDIF
    ''
    $IF [GAX] < 0
    $MSG
    All toolpaths MUST be IN the FIRST Quadrant!

    Modify your operations and Re-Post.
    $EXIT
    $ELSEIF [GAY] < 0
    $MSG
    All toolpaths MUST be IN the FIRST Quadrant!

    Modify your operations and Re-Post.
    $EXIT
    $ENDIF
    ''
    G0 X[GAX] Y[GAY] Z[-GAZ]
    $LET FIRST_RAPID = 0
    $LET AFTER_DRILL = 0
    ''
    $----------------------------------------------------------------------------
    $25 Rapid Move IN Z only (MILL etc)
    ''
    $IF DEBUG = 1
    -> $25
    $ENDIF
    ''
    $IF FIRST_RAPID = 1
    $GOTO 99
    $ENDIF
    $IF AFTER_DRILL = 1
    $GOTO 99
    $ENDIF
    G0 Z[-GAZ]
    ''
    $LL99
    $LET AFTER_DRILL = 0
    ''
    We all live in Tents! Some live in content others live in discontent.

Similar Threads

  1. Postprocessor?
    By RP Designs in forum LinuxCNC (formerly EMC2)
    Replies: 4
    Last Post: 09-11-2009, 10:00 PM
  2. postprocessor
    By jrcalleja in forum PTC Pro/Manufacture
    Replies: 2
    Last Post: 09-17-2008, 02:14 PM
  3. ISO Postprocessor
    By scholtus in forum CamBam
    Replies: 1
    Last Post: 09-01-2008, 10:07 AM
  4. Postprocessor
    By scholtus in forum HURCO
    Replies: 0
    Last Post: 07-01-2008, 07:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •