CNC 2D Optimization - Masterwood 313 - 2007

Optimization of 2D rectangular grid pattern for position location (drilling) on a CNC that does not support

a to 2 axis drill command and is only capable of a drill command in a line.

See downloads for example programs

Program Function Overviews:

The last three mainly allow the optimization when drilling multi-grid configurations.

Technical challenges

The CNC programing language G-Codes, but the style doesn't support nesting of code.

This means basic common language styles found in today's programming languages

are not support, the following are some examples of styles that are not supported. 

IF(condition)

{

    While (condition)

..

}

 If(condition)

{    

    if(condition)

    {.......}

}

While (condition)

{

    IF(condition)

....

}

 While(condition)

{

    While(condition)

    {.......}

}

if (condition and condition)

if ( condition or condition)

not

 While(condition and condition)

While(condition or condition)

The only program that may be executed inside a while or and if is CNC Drill codes or variables calculations use math,

which also has its complexity limitations at a point. The conditions statements can only be singular,

as in no and or or's could be used only, variable < > = variable.

Therefore using mathematical logic of division and round of fractions to whole numbers,

I could effectively create if conditions in while loops.

Mathematical if statement in couple of forms that were used: 

Examples of gird patterns for drilling or subprogram, and there possible optimization.

    Small white blocks can be sub programs or drill commands.

        This shows drill patterns for holes and there optimization when there more than one drilling pattern.

        This shows drill patterns for holes and there optimization when there more than one drilling pattern.

Screen Shot of a Drill Pattern using this program.

Screen Shot of CD-Case drill whole pattern for plastic slide plat.

Its optimized for speed and simple altering of board size parameters.

Because this pattern has to run hundreds of times for single 1.5m bookcase.

 

.