Recording "cutter mileage" with a (LinuxCNC) Post-processor

Discussion of post processors for various CNC machines

Recording "cutter mileage" with a (LinuxCNC) Post-processor

Postby cnczane » Thu Aug 17, 2017 5:53 pm

I'm going to give this a shot.

According to an earlier post, the Min/Max values of XYZ are available in the post processor, so I have an idea, applicable to simple cut-in-X or cut-in-Y only (that is not 3D, waterline, pencil, etc.), to use these to make it easier to calculate and store the "mileage" the cutter travels in cutting the model. (This information is given in MeshCAM's "Estimate cutting time" window, and it could be noted at that time--IF one remembers. This is a way to estimate it after-the-fact.)

For cut-along-X, add a line something like this to the .con (post-processor definition) file for LinuxCNC[1]:
START = ";"
START = "(estimate mileage on cutting tool after running this code: works only on linear-motion programs)"
START = "#<Yextent> = [ [YMAX] - [YMIN] ]"
START = "#<Xextent> = [ [XMAX] - [XMIN] ]"
START = "#<Stepover> = 0.01 ; Default to avoid divide-by-zero error: edit to correct value"
START = "#<TOOL_MILEAGE> = [ #<Yextent>/#<Stepover>*#<Xextent> / 12 / 5280 ]"
START = "(DEBUG, Tool mileage: #<TOOL_MILEAGE>)"
START = "(NB LinuxCNC can't print numbers in a MSG statement: requires DEBUG)"
START = ";"

[1] Note: LinuxCNC can do calculations and define new variables. If your CNC software can too, (I expect Mach3 can), a similar approach will work.
--
CNCZANE
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Return to Post Processors

cron