Macro Templates
Drilling Macro
Rotary Tools
They are called to do central drilling with vertical mill or live tools, using rotary tools. They take care of the following machining.
- Right Tapping
- Left Tapping
- Reamering
- Deep Hole Drilling
- Spot Drilling
- Boring
- Counterboring
Static Tools
They are called to do central drilling with the lathe, using static tools. They take care of the following machining.
- Right Tapping
- Left Tapping
- Reamering
- Deep Hole Drilling
- Spot Drilling
Repeat macro template for every drill point
If your machine need to recall macro for every drill point, you need to set to check the
[Repeat drilling macro for every point] property ( use the search field to find this property ).
Most probably you have to adjust the macros template accordingly to your need.
Example 1 Deckel FP6NC - Dialog 11
Here the required drill macro code :
G83 X16.795 Y29.09 TI-22. MI10.
G83 X-16.795 Y29.09 TI-22. MI10.
G83 X-33.59 Y0. TI-22. MI10.
G83 X-16.795 Y-29.09 TI-22. MI10.
G83 X16.795 Y-29.09 TI-22. MI10.
G83 X33.59 Y0. TI-22. MI10.
To get this , you need to update the [Deep hole drilling] and other templates in this way :
G83{COO_X}{COO_Y}TI{TOTAL_INCRE_Z}MI{STEP_VALUE}{FEED_CODE}
If needed , add {COO_X} and {COO_Y} in the [Drilling Template - Always Repeated Code] code list .
Example 2 Deckel Dialog 4
Here the required drill macro code :
G0 X0.0 Y0.0 Z2.0
G82 F76 S+600 Z-10.0 Z-1.0 Z0.5
G0 X10.0 Y0.0 Z2.0
G82 F76 S+600 Z-10.0 Z-1.0 Z0.5
First change the default value for this 2 property :
- Spindle CW :
M3S+ - Spindle CCW :
M4S-
Then change the template for deep hole drilling :
G0{COO_X}{COO_Y}{SECURE_Z_CODE}
G82{SPINDLE_ORIENTATION}{SPEED_VALUE}Z{TOTAL_INCRE_Z}Z{STEP_VALUE|-1}Z.5
As before , if you need to force some {TAGS} to be always repeated , insert it in the [Drilling Template - Always Repeated Code] property .
Example 3
Customizing macro for deep hole drilling , for DYNAPTH lathe machine :
1) Change template for [Lathe Deep Hole Drilling] with
" (7) {ABSOLUTE_Z_DEPTH}W{STOCK_END_VALUE}{STEP_CODE}V{FEED_VALUE}{DWELL_CODE} "
2) Change the char code for DWELL_CODE and STEP_CODE
Type "step" in the search field of post-processor dialog and change [Macro Step (Peck] Code] from Q to K
Similarly Type "dwell" and change :
- [Macro Dwell Code] from P to L
- [Macro Dwell Mode] from millisecond to second
3) Now the output code for deep hole drilling macro is :
(7) Z-48.W0.K14.V0.168L0.5
LATHE Threading Macro
To customize the threading macro for lathe, insert threading in the serch field , then edit property [Macro - Lathe Threading]
DICTIONARY CODES | OUTPUT |
---|---|
PITCH_CODE | [Code Feed] + value of thread pitch . F2.5 |
PITCH_VALUE | Only numeric value of thread pitch . ex. 2.5 |
START_Z_CODE | Start Z Code ( ABSOLUTE) |
START_Z_VALUE | |
END_Z_CODE | End Z Code ( ABSOLUTE) |
END_Z_VALUE | |
FIRST_DIA_CODE | First Thread Step Diameter Value. X40 |
FIRST_RADIUS_CODE | First Thread Step Radial Value. X20 |
PLACEHOLDER_DIAMETERS_LIST | Placeholder for step list X40 X39.5 X38 ... |
MAJOR_DIAMETER_VALUE | |
MINOR_DIAMETER_VALUE | |
THREAD_ANGLE | ex : 60° for metric, 55° for Withworth |
STEP_COUNT | Number of step necessary to create the thread |
THREAD_DEPTH_VALUE | full thread depth |
THREAD_PEAK_DIA | The thread peak offset from the drive line. Negative I values are external threads, and positive I values are internal threads |
THREAD_PEAK_RADIAL | Same as above, but radial values |
FIRST_INCREMENT_DIA | Initial Cut Depth or First Step Depth |
FIRST_INCREMENT_RADIAL | Same as above, but radial values |
Example
Threading macro template for Emcotronic TM-02
Set this string as [Thread Template]
G85 X{MAJOR_DIAMETER_VALUE} {END_Z_CODE} D3 {STEP_COUNT} D4 2 D5 {THREAD_ANGLE_VALUE} D6 {THREAD_DEPTH_VALUE|1000} D7 6 F{PITCH_VALUE}
Set 1000 as [Feed SYNC Multiplier]. In this way the feed values are expressed in 1/1000 mm .
Example 2 - M30 x 2 - Linux CNC
Lathe Threading Template:
G76 P{PITCH_VALUE} {END_Z_CODE} I{THREAD_PEAK_DIA} J{FIRST_INCREMENT_DIA} K{THREAD_DEPTH_VALUE} H1 L2 E1
Output:
G76 P2. Z-19. I-2. J0.522 K1.26 H1 L2 E1
Expand canned cycles
From version 2.1.0.241
Not in all controller are available canned cycles, to support also this machines is possible to expand the canned cycles in simply movementes.
To obtain this you need to delete the canned cycles template from post processor dialog.
Note: Tapping cycle not supported yet.
Thread cycle example :
By default is used the G92 macro, here the template :
G92{FIRST_DIA_CODE}{END_Z_CODE}{PITCH_CODE}
{PLACEHOLDER_DIAMETERS_LIST}
and the output g-code is like this :
G92 X9.535 Z-15. F1.5
X9.15
X8.798
X8.528
X8.301
X8.1
Now delete the thread cycle template from post processor in this way :
The output will become like this :
...
X9.535
G32 Z-15. F1.5
G0 X12.
Z1.5
X9.15
G32 Z-15. F1.5
G0 X12.
Z1.5
X8.798
G32 Z-15. F1.5
G0 X12.
Z1.5
X8.528
G32 Z-15. F1.5
G0 X12.
Z1.5
X8.301
G32 Z-15. F1.5
G0 X12.
Z1.5
X8.1
G32 Z-15. F1.5
G0 X12.
...
Deep hole drilling example :
Default Template :
G83{ABSOLUTE_Z_DEPTH}{POINT_R_CODE}{STEP_CODE}{FEED_CODE}
G80
Default Output :
G83 Z-30. R0.Q10. F0.12
G80
Now deleted the template , for lathe in this case :
And this will be become the output :
X0.
G1 Z-10. F0.12
G0 Z2.
Z-9.
G1 Z-20. F0.12
G0 Z2.
Z-19.
G1 Z-30. F0.12
G0 Z2.