# macro tool_change: calls tool_change1 for constant surface speed (G96)
#                    and   tool_change2 for G97
#
# must return home before returning to lathe mode.
ASSIGN: Tcode= Tcoder+101;
SELECT: Power_toolr
CASE: 1
MACRO: lathesetup
CASE: 2
MACRO: lathesetup
CASE: 3
MACRO: lathesetup
CASE ELSE:
MACRO: lathesetup
END SELECT:
MACRO: calc_cyc_time
MACRO: cycle_time_out
MACRO: cyc_tool_data
#
#
MACRO: coolant_off
MACRO: retract_home
MACRO: get_tool_info
MACRO: clamp_baxis
#
#
MACRO: off_43
OUTPUT: M205
ASSIGN: Tool_desc= UPC$(Tool_desc);
OUTPUT: ** (  {Tool_desc} T{Tool_num})
#
#
SELECT: Power_tool
CASE: 0
#      do nothing
CASE ELSE:
ASSIGN: Comments= "(APPROACH FEEDRATE FOR G43.4)";
OUTPUT: **#600=1200.  {Comments}
ASSIGN: Comments= "(FEEDRATE FOR PLUNGE CUTTING)";
OUTPUT: **#601=40.   {Comments}
ASSIGN: Comments= "(FEEDRATE FOR ENTRY INTO CUTS)";
OUTPUT: **#602=40.   {Comments}
ASSIGN: Comments= "(LINEAR FEEDRATE FOR 2D ROUGH CUTS)";
OUTPUT: **#603=40.   {Comments}
ASSIGN: Comments= "(LINEAR FEEDRATE FOR B AXIS ONLY FINISH CUTS)";
OUTPUT: **#604=40.   {Comments}
END SELECT:
#
#
SELECT: Power_tool
CASE: 1
MACRO: caxis_od_setup
CASE: 2
MACRO: cfacesetup
CASE: 3
MACRO: caxis_id_setup
END SELECT:
#
# delay plot on so we dont get funny power tool motion
ASSIGN: Plot_on= 1;
TOOLSYMBOL:
ASSIGN: Plot_on= (Power_tool<1);
MACRO: speeds                   Repeats= (Thr_cycle<>1);
ASSIGN: Plot_on= 1;
ASSIGN: Tool_descr= Tool_desc;
ASSIGN: Tool_filer= Tool_file;
ASSIGN: Tool_numr= Tool_num;
ASSIGN: Tcoder= Tcode;
ASSIGN: Power_toolr= Power_tool;
ASSIGN: Prev_odid= Odid_cycle;
ASSIGN: Dia_comp= Tcode;
ASSIGN: Canned_cyc= 0;
ASSIGN: Tool_ch= 1;
