Wednesday, March 08, 2006

Making a Fully-Automatic MEASURE.ALL Command

A Measure.all macro is used with CNC Routers that have an automatic tool height measurement sensor installed on the table. It will pick up each tool the machine has in its tool rack, then measure and store the tool length offset for the tool.

The L111 command will check the software's internal register to see which tool is currently loaded in the software. If the tool is not loaded, the line of G-code immediately following the L111 command will be skipped. If the tool is loaded, the next line of G-code will be read and processed.

Here's an example measure.all macro:

T1 [GET TOOL NUMBER ONE]

L111T1 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]

M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]



T2 [GET TOOL NUMBER TWO]

L111T2 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]

M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]



T3 [GET TOOL NUMBER THREE]

L111T3 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]

M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]


T4 [GET TOOL NUMBER FOUR]

L111T4 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]

M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]

No comments: