<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->
<!--(Document created with RoboEditor. )============================-->
<!--(==============================================================)-->

<head>

<title>An Example Event Handler</title>

<!--(Meta)==========================================================-->

<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=0>
<meta name=layout-height content=0>
<meta name=layout-width content=0>
<meta name=date content="08 24, 2001 10:41:41 AM">


<!--(Links)=========================================================-->

<link rel="StyleSheet" href="../../css/main_styles.css">



<!--(Style Sheet)===================================================-->

<style type="text/css">
<!--

body {
	background-image: url("../paper.gif");
	background-repeat: repeat;
	background-attachment: scroll;
}

-->
</style>


</head>

<!--(Body)==========================================================-->


<body class="bodydocs" onLoad="top.pageLoader()" bgcolor="#FFFFFF">


<h1 CLASS=ChapName>An Example Event Handler</h1>

<p style="margin-bottom: 0;
			line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-size: smaller;
			font-family: monospace;">################################################################################<br>
# EVENT HANDLER SECTION <br>
# This section contains the control section for mill3ax post processor. <br>
# This program logic determinies the output to the post processor file.<br>
# <br>
# The following procedures are performed in the order the events are<br>
# generated.<br>
################################################################################<br>
#The following command invokes the warning mode and the default settings.<br>
#_______________________________________________________________________________<br>
source /cam/autoqc.old/post_150/tcldir/ugpost_base.tcl<br>
#_______________________________________________________________________________<br>
#The following command invokes the debugging mode.<br>
#_______________________________________________________________________________<br>
source /cam/autoqc.old/post_150/tcldir/mom_debug.tcl<br>
#********Setting the debug mode ON/OFF<br>
MOM_set_debug_mode ON <br>
#_______________________________________________________________________________<br>
<br>
#The following file consists of default values set for G &amp; M codes<br>
#_______________________________________________________________________________<br>
<br>
#********M code declaration<br>
<br>
set mom_sys_program_stop_code 0<br>
set mom_sys_optional_stop_code 1<br>
set mom_sys_end_of_program_code 2<br>
<br>
set mom_sys_spindle_direction_code(CLW) 3<br>
set mom_sys_spindle_direction_code(CCLW) 4<br>
set mom_sys_spindle_direction_code(OFF) 5<br>
<br>
set mom_sys_tool_change_code 6<br>
<br>
set mom_sys_coolant_code(MIST) 7<br>
set mom_sys_coolant_code(FLOOD) 8<br>
set mom_sys_coolant_code(TAP) 8<br>
set mom_sys_coolant_code(OFF) 9<br>
<br>
<br>
set mom_sys_clamp_code(ON) 10<br>
set mom_sys_clamp_code(OFF) 11<br>
set mom_sys_clamp_code(AXISON) 10<br>
set mom_sys_clamp_code(AXISOFF) 11<br>
<br>
#********G code declaration<br>
<br>
set mom_sys_rapid_code 0<br>
<br>
set mom_sys_linear_code 1<br>
<br>
set mom_sys_circle_code(CLW) 2<br>
set mom_sys_circle_code(CCLW) 3<br>
<br>
set mom_sys_delay_code(REVOLUTIONS) 4<br>
set mom_sys_delay_code(SECONDS) 4<br>
<br>
set mom_sys_cutcom_plane_code(XY) 17<br>
set mom_sys_cutcom_plane_code(ZX) 18<br>
set mom_sys_cutcom_plane_code(YZ) 19<br>
<br>
set mom_sys_cutcom_code(OFF) 40<br>
set mom_sys_cutcom_code(LEFT) 41<br>
set mom_sys_cutcom_code(RIGHT) 42<br>
<br>
set mom_sys_inch_code 70<br>
set mom_sys_metric_code 71<br>
<br>
set mom_sys_cycle_breakchip_code 73<br>
set mom_sys_cycle_bore_no_drag_code 76<br>
<br>
set mom_sys_cycle_off 80<br>
set mom_sys_cycle_drill_code 81<br>
set mom_sys_cycle_drill_dwell_code 82<br>
set mom_sys_cycle_drill_deep_code 83<br>
set mom_sys_cycle_tap_code 84<br>
set mom_sys_cycle_bore_code 85<br>
set mom_sys_cycle_bore_drag_code 86<br>
set mom_sys_cycle_bore_back_code 87<br>
set mom_sys_cycle_bore_manual_code 88<br>
set mom_sys_cycle_bore_manual_dwell_code 89<br>
set mom_sys_cycle_bore_dwell_code 89<br>
<br>
set mom_sys_output_code(ABSOLUTE) 90<br>
set mom_sys_output_code(INCREMENTAL) 91<br>
<br>
#_______________________________________________________________________________<br>
# Global Variable Declaration<br>
#_______________________________________________________________________________<br>
set mom_sys_list_file_columns 80<br>
set mom_sys_list_file_rows 20<br>
set mom_sys_commentary_output ON<br>
#_______________________________________________________________________________<br>
proc MOM_start_of_program {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the very begining of the program.<br>
# It gets called before any command is read from the task file.<br>
#_______________________________________________________________________________<br>
global mom_part_name<br>
global mom_logname<br>
global mom_date<br>
<br>
#********The following procedure opens the warning and listing files<br>
OPEN_files<br>
#********The following procedure lists the header information in commentary data<br>
LIST_FILE_HEADER <br>
<br>
MOM_output_literal &quot;(######## TASK : $mom_part_name ############)&quot;<br>
MOM_output_literal &quot;(# Created By : $mom_logname)&quot;<br>
MOM_output_literal &quot;(# Creation Date: $mom_date)&quot;<br>
MOM_output_literal &quot;(############################################)&quot;<br>
MOM_suppress always N<br>
MOM_output_literal &quot;%&quot;<br>
MOM_suppress off N<br>
MOM_output_literal &quot;G70 G90&quot;<br>
}<br>
<br>
proc MOM_end_of_program {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the end of the program after all<br>
# the paths are traversed.<br>
#_______________________________________________________________________________<br>
global mom_part_name<br>
<br>
MOM_do_template end_of_program<br>
MOM_output_literal &quot;(###### END OF TASK: $mom_part_name #########)&quot;<br>
<br>
#********The following procedure lists the tool list with time in commentary data<br>
LIST_FILE_TRAILER<br>
#********The following procedure closes the warning and listing files<br>
CLOSE_files<br>
}<br>
<br>
proc MOM_start_of_path {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of each path in the task<br>
# It gets called after all the general parameters of the path are loaded<br>
# like the path name and the tool name.<br>
#_______________________________________________________________________________<br>
global mom_path_name<br>
global mom_tool_name<br>
<br>
MOM_output_literal &quot;(----------------------------------------------------)&quot;<br>
MOM_output_literal &quot;(Start path: $mom_path_name with tool: $mom_tool_name)&quot;<br>
MOM_output_literal &quot;(----------------------------------------------------)&quot;<br>
}<br>
<br>
proc MOM_end_of_path {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the end of a path.<br>
#_______________________________________________________________________________<br>
global mom_path_name<br>
<br>
MOM_spindle_off <br>
MOM_coolant_off <br>
<br>
MOM_output_literal &quot;(End Of Path $mom_path_name)&quot;<br>
}<br>
<br>
proc MOM_tool_change {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at any time there is a tool change.<br>
# It gets called after the tool change data is loaded like the tool number <br>
# and the register numbers.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_first_tool {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the first operation, with a tool, in the task.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_initial_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the initial move of each operation. It assumes <br>
# the tool is moving from a safe position at rapid to the start of the operation.<br>
#_______________________________________________________________________________<br>
global mom_coolant_mode<br>
set mom_coolant_status $mom_coolant_mode<br>
<br>
MOM_force once motion_g X Y Z <br>
<br>
MOM_do_template return_home<br>
MOM_do_template tool_change<br>
MOM_do_template tool_preselect<br>
<br>
MOM_force once motion_g X Y Z G<br>
MOM_force once spindle_m coolant_m S T H <br>
<br>
MOM_do_template rapid_xy<br>
MOM_do_template spindle_start<br>
MOM_do_template rapid_z<br>
<br>
}<br>
<br>
proc MOM_linear_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for each linear move. It gets called after<br>
# the positioning varables, position and tool axis (X,Y,Z,TAX,TAY,TAZ) are loaded.<br>
#_______________________________________________________________________________<br>
global mom_cutcom_mode<br>
global mom_cutcom_status<br>
<br>
set mom_cutcom_status $mom_cutcom_mode<br>
<br>
MOM_do_template linear<br>
}<br>
<br>
proc MOM_circular_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for each circular move. It gets called after<br>
# the circle data are loaded (end point and center).<br>
#_______________________________________________________________________________<br>
global mom_pos_arc_axis<br>
global g_plane<br>
global mom_cutcom_mode<br>
<br>
set mom_cutcom_status $mom_cutcom_mode<br>
<br>
if {abs($mom_pos_arc_axis(2)) == 1.0} {<br>
set g_plane &quot;17&quot;<br>
MOM_suppress always K<br>
} elseif {abs($mom_pos_arc_axis(1)) == 1.0} {<br>
set g_plane &quot;18&quot;<br>
MOM_suppress always J<br>
} elseif {abs($mom_pos_arc_axis(0)) == 1.0} {<br>
set g_plane &quot;19&quot;<br>
MOM_suppress always I<br>
}<br>
<br>
MOM_do_template circle<br>
}<br>
<br>
proc MOM_rapid_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for each rapid move. It gets called after<br>
# the positioning varables, position and tool axis (X,Y,Z,TAX,TAY,TAZ) are loaded.<br>
#_______________________________________________________________________________<br>
global mom_last_z_pos<br>
global mom_pos<br>
global mom_coolant_mode<br>
<br>
set mom_coolant_status $mom_coolant_mode<br>
<br>
if {$mom_pos(2) &gt; $mom_last_z_pos } {<br>
MOM_do_template rapid_z<br>
MOM_do_template rapid_xy<br>
} else {<br>
MOM_do_template rapid_xy<br>
MOM_do_template rapid_z<br>
}<br>
}<br>
<br>
proc MOM_before_output {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed just before a line is about to be output<br>
# to the file. It loads the line into a variable MOM_o_buffer and then calls<br>
# this procedure. When it returns from this procedure, the variable MOM_o_buffer<br>
# is read and written to the file.<br>
#_______________________________________________________________________________<br>
<br>
#########The following procedure invokes the listing file with warnings.<br>
<br>
LIST_FILE<br>
}<br>
<br>
proc Alignment {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed in buffering a value and then putting<br>
# the value where it is desired.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc Feedrate_set {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Feedrate is set.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc cycle_set {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for each new cycle. This will make sure all <br>
# non-modal addresses and Cycle parameters are output that need to be output<br>
# at the start of a new cycle.<br>
#_______________________________________________________________________________<br>
global mom_cycle_retract_mode<br>
global g_return<br>
<br>
MOM_force once motion_g X Y Z R cycle_dwell cycle_nodrag cycle_step<br>
<br>
if {$mom_cycle_retract_mode == &quot;MANUAL&quot;} {<br>
set g_return 99<br>
} elseif {$mom_cycle_retract_mode == &quot;AUTO&quot;} {<br>
set g_return 98<br>
} else {<br>
set g_return 99<br>
}<br>
} <br>
<br>
proc MOM_cycle_plane_change {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the end of cycle motion when there is a cycle <br>
# move occuring at a higher level than the previous position.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_plane_change<br>
}<br>
<br>
proc MOM_cycle_off {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the end of cycle motion.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_off<br>
}<br>
<br>
proc MOM_drill {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a drill cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_drill_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a drill cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_drill<br>
}<br>
<br>
proc MOM_drill_dwell {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a drill dwell cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_drill_dwell_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a drill dwell cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_drill_dwell<br>
}<br>
<br>
proc MOM_drill_counter_sink {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a drill cycle.<br>
#_______________________________________________________________________________<br>
MOM_drill<br>
}<br>
<br>
proc MOM_drill_counter_sink_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a drill cycle.<br>
#_______________________________________________________________________________<br>
MOM_drill_move<br>
}<br>
<br>
proc MOM_drill_csink_dwell {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a drill dwell cycle.<br>
#_______________________________________________________________________________<br>
MOM_drill_dwell<br>
}<br>
<br>
proc MOM_drill_csink_dwell_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a drill dwell cycle.<br>
#_______________________________________________________________________________<br>
MOM_drill_dwell_move<br>
}<br>
<br>
proc MOM_drill_deep {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a deep cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_drill_deep_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a deep cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_drill_deep<br>
}<br>
<br>
proc MOM_drill_break_chip {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a brkchp cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_drill_break_chip_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a brkchp cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_breakchip<br>
}<br>
<br>
proc MOM_tap {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a tap cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_tap_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a tap cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_tap<br>
}<br>
<br>
proc MOM_bore {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a bore cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore<br>
}<br>
<br>
proc MOM_bore_dwell {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_dwell_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a bore dwell cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore_dwell<br>
}<br>
<br>
proc MOM_bore_drag {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore drag cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_drag_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a bore_drag cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore_drag<br>
}<br>
<br>
proc MOM_bore_no_drag {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore nodrag cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_no_drag_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a bore nodrag cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore_no_drag<br>
}<br>
<br>
proc MOM_bore_back {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore back cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_back_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a back bore cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore_back<br>
}<br>
<br>
proc MOM_bore_manual {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore manual cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_manual_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a manual bore cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore_manual<br>
}<br>
<br>
proc MOM_bore_manual_dwell {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed at the begining of a bore manual dwell bore cycle.<br>
#_______________________________________________________________________________<br>
cycle_set<br>
}<br>
<br>
proc MOM_bore_manual_dwell_move {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the goto of a manual dwell bore cycle.<br>
#_______________________________________________________________________________<br>
MOM_do_template cycle_bore_manual_dwell<br>
}<br>
<br>
proc MOM_load_tool {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the LOAD/TOOL command. All output for the LOAD<br>
# command will take place with the initial move.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_sequence_number {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the Sequence Number command.<br>
#_______________________________________________________________________________<br>
global mom_sequence_mode<br>
global mom_sequence_number<br>
global mom_sequence_increment<br>
global mom_sequence_frequency<br>
global mom_sequence_text<br>
if {[isset mom_sequence_mode] == &quot;y&quot;} {<br>
if {$mom_sequence_mode == &quot;OFF&quot;} {<br>
MOM_set_seq_off<br>
} elseif {$mom_sequence_mode == &quot;ON&quot;} {<br>
MOM_set_seq_on<br>
} elseif {$mom_sequence_mode == &quot;AUTO&quot;} {<br>
MOM_output_literal &quot;SEQNO/AUTO &quot;<br>
} else {<br>
MOM_output_literal &quot;error: mom_sequence_mode unknown&quot;<br>
}<br>
} else {<br>
MOM_reset_sequence $mom_sequence_number $mom_sequence_increment <br>
$mom_sequence_frequency<br>
}<br>
}<br>
<br>
proc MOM_set_modes {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed for the Set Mode command.<br>
#_______________________________________________________________________________<br>
global mom_output_mode<br>
global mom_arc_mode<br>
global mom_feed_rate_output_mode<br>
global mom_parallel_to_axis<br>
global mom_machine_mode<br>
global mom_modes_text<br>
global g_output_mode<br>
<br>
<br>
# &quot;ABSOLUTE&quot;, &quot;INCREMENTAL&quot;<br>
if {$mom_output_mode == &quot;ABSOLUTE&quot;} {<br>
set g_output_mode &quot;G90&quot;<br>
MOM_incremental OFF X Y Z<br>
} elseif {$mom_output_mode == &quot;INCREMENTAL&quot;} {<br>
set g_output_mode &quot;G91&quot;<br>
MOM_incremental ON X Y Z<br>
}<br>
# &quot;LINEAR&quot;, &quot;CIRCULAR&quot;<br>
if {$mom_arc_mode == &quot;LINEAR&quot;} {<br>
} elseif {$mom_arc_mode == &quot;CIRCULAR&quot;} {<br>
}<br>
# &quot;OFF&quot;, &quot;IPM&quot;, &quot;IPR&quot;, &quot;MMPM&quot;, &quot;MMPR&quot;, &quot;INVERSE&quot;<br>
if {$mom_feed_rate_output_mode == &quot;FPM&quot;} {<br>
} elseif {$mom_feed_rate_output_mode == &quot;FPR&quot;} {<br>
} elseif {$mom_feed_rate_output_mode == &quot;INVERSE&quot;} {<br>
} elseif {$mom_feed_rate_output_mode == &quot;OFF&quot;} {<br>
}<br>
# &quot;ZAXIS&quot;, &quot;WAXIS&quot;, &quot;UAXIS&quot;<br>
if {$mom_parallel_to_axis == &quot;ZAXIS&quot;} {<br>
} elseif {$mom_parallel_to_axis == &quot;WAXIS&quot;} {<br>
} elseif {$mom_parallel_to_axis == &quot;UAXIS&quot;} {<br>
}<br>
# &quot;MILL&quot;, &quot;TURN&quot;, &quot;PUNCH&quot;, &quot;LASER&quot;, &quot;TORCH&quot;, &quot;WIRE&quot;<br>
if {$mom_machine_mode == &quot;MILL&quot;} {<br>
} elseif {$mom_machine_mode == &quot;TURN&quot;} {<br>
} elseif {$mom_machine_mode == &quot;PUNCH&quot;} {<br>
} elseif {$mom_machine_mode == &quot;LASER&quot;} {<br>
} elseif {$mom_machine_mode == &quot;TORCH&quot;} {<br>
} elseif {$mom_machine_mode == &quot;WIRE&quot;} {<br>
}<br>
}<br>
<br>
proc MOM_cutcom_on {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Cutcom command is activated.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_cutcom_off {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Cutcom command is deactivated.<br>
#_______________________________________________________________________________<br>
MOM_do_template cutcom_off<br>
<br>
}<br>
<br>
proc MOM_spindle_rpm {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Spindle command is activated.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_spindle_off {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Spindle command is deactivated.<br>
#_______________________________________________________________________________<br>
MOM_do_template spindle_off<br>
}<br>
<br>
proc MOM_coolant_on {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Coolant command is activated.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_coolant_off {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Coolant command is deactivated.<br>
#_______________________________________________________________________________<br>
MOM_do_template coolant_off<br>
}<br>
<br>
proc MOM_opstop {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Optional Stop command is activated.<br>
#_______________________________________________________________________________<br>
MOM_do_template opstop<br>
}<br>
<br>
proc MOM_stop {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Program Stop command is activated.<br>
#_______________________________________________________________________________<br>
MOM_do_template stop<br>
}<br>
<br>
proc MOM_opskip_on {} {MOM_set_line_leader always &quot;/&quot;}<br>
proc MOM_opskip_off {} {MOM_set_line_leader off &quot;/&quot;}<br>
<br>
proc MOM_delay {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Delay command is activated.<br>
#_______________________________________________________________________________<br>
MOM_do_template delay<br>
}<br>
<br>
proc MOM_auxfun {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Auxiliary command is activated.<br>
#_______________________________________________________________________________<br>
MOM_do_template auxiliary<br>
}<br>
<br>
proc MOM_prefun {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Preparatory function command is activated.<br>
#_______________________________________________________________________________<br>
MOM_do_template preparatory<br>
}<br>
<br>
proc MOM_length_compensation {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Tool Length Compensation command is activated.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_tool_preselect {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Tool Preselect command is activated.<br>
#_______________________________________________________________________________<br>
}<br>
<br>
proc MOM_text {} {<br>
#_______________________________________________________________________________<br>
# This procedure is executed when the Text command is activated.<br>
#_______________________________________________________________________________<br>
global mom_user_defined_text<br>
MOM_output_literal &quot;$mom_user_defined_text&quot; <br>
}<br>
<br>
################################################################################<br>&nbsp;</p>

</body>

</html>
