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

<html>

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

<head>

<title>The 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=1>
<meta name=layout-height content=824>
<meta name=layout-width content=666>
<meta name=date content="10 24, 2005 8:54:41 AM">


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

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



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

<style>
<!--
body {background-color: #ffffff;}
-->
</style>


</head>

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


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


<h1>The Event Handler</h1>

<p CLASS=Paragraph>The<span style="font-weight: bold;"> Event Handler </span>is 
 a set of instructions that you must develop for each machine/controller 
 combination for which you intend to process tool path data. Each Event 
 Handler must contain a set of instructions for each type of event that 
 you want Post to process. These instructions will define how the tool 
 path data is to be processed and how each event is to be executed at the 
 machine tool.</p>

<p CLASS=Paragraph>The language that you must use to define these instructions 
 is TCL. (For more information on TCL as related to the post writer, refer 
 to <span style="font-weight: bold;"><a HREF="../tcl/tcl_overview.html">TCL 
 For The Post Writer</a></span>.)</p>

<p CLASS=Paragraph>For each event that you want the Event Handler to process, 
 there must be, a TCL procedure. The Manufacturing Output Manager (MOM) 
 will invoke this procedure when an event is triggered by the Event Generator. 
 If you do not want an Event Handler to process a particular event type, 
 simply do not include a TCL procedure for that event in the Event Handler.</p>

<p CLASS=Paragraph>The TCL procedure name for each event must be identical 
 to the event name that will be triggered by the Event Generator. For example, 
 the procedure name for a tool change event <span style="font-style: italic;">must</span> 
 be MOM_tool_change.</p>

<p CLASS=Paragraph>The parameters associated with each event are passed 
 to the Event Handler as global variables. The Setup Events, Machine Control 
 Events, Move Events, Cycle Events, and Miscellaneous Parameters sections 
 describe the valid events and the parameters associated with each event. 
 Refer to <a HREF="../ex_ent_hdle/event_hndlr_examp.html"><span style="font-weight: bold;">An 
 Example Event Handler</span></a> for an example.</p>

<p CLASS=Paragraph>The TCL interpreter serves as the translator for Post.</p>

<h1><a NAME=def_file></a>The Definition File</h1>

<p CLASS=Paragraph>The definition file mainly contains static information 
 about a specific machine tool (one definition file for each machine).</p>

<p CLASS=Paragraph>Most NC machines use addresses for each of the variables 
 that control the machine. For example, the address X is used to store 
 the value of the X coordinate of the end position of a Linear move. Each 
 command line in an NC program changes the state of the machine by changing 
 the state of its addresses. Post will provide tools that use the information 
 in the definition file to format NC commands.</p>

<p CLASS=Paragraph>These tools will be provided as an extension to core 
 TCL. The definition file contains the following:</p>

<ul>
	
	<li class=kadov-p-CListBullet><p CLASS=ListBullet>General machine attributes</p></li>
	
	<li class=kadov-p-CListBullet><p CLASS=ListBullet>The addresses that 
 are supported by the machine</p></li>
	
	<li class=kadov-p-CListBullet><p CLASS=ListBullet>The attributes of 
 each address (format, max, min)</p></li>
	
	<li class=kadov-p-CListBullet><p CLASS=ListBullet>A set of block templates 
 that describes how the addresses fit together to perform an action on 
 the machine. For example, the command G01 X[Xval] Y[Yval] Z[Zval] performs 
 a linear move.</p></li>
</ul>

<p CLASS=Paragraph>As mention above, the definition file describes static 
 data about a specific machine tool. It contains information that will 
 simplify the process of generating an NC program.</p>

<p CLASS=Paragraph>Refer to <a HREF="../ex_def/def_file_examp.html"><span 
 style="font-weight: bold;">An Example Definition File</span></a> for an 
 example.</p>

<ul>
	
	<li class=kadov-P-CNote><p CLASS=Note><span style="font-weight: normal;">We 
 recommend using Postbuilder to create teh Event Handler and Definition 
 File.</span> </p></li>
</ul>

</body>

</html>
