<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>High Level Commands - Description</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic3" id="xps10_pagetitle">High Level Commands - Description</div>
      <hr noshade="true"><a name="SIM_ask_current_ref_junction"></a><div class="title_division">SIM_ask_current_ref_junction</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_current_ref_junction </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the name of current reference junction</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the name of the reference junction</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_current_zcs_junction"></a><div class="title_division">SIM_ask_current_zcs_junction</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_current_zcs_junction</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the name of current ZCS junction</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the name of current ZCS junction.</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_junction_origin_mtcs"></a><div class="title_division">SIM_ask_junction_origin_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_junction_origin_mtcs &lt;jct_name&gt; &lt;state&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the origin of the specified junction in the current state of the KIM model if state is CURRENT. If state is set to INITIAL, the origin of the initial state of the junction (before simulation starts) is returned. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">jct_name: the name of the junction</p>
               <p class="para_td">state: in what state of KIM model data is requested - INITIAL or CURRENT</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the junction origin in MTCS as a list of X, Y and Z coordinates.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set origin [SIM_ask_junction_origin_mtcs JNCT_HEAD_1 INITIAL]</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_last_position_mtcs"></a><div class="title_division">SIM_ask_last_position_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_last_position_mtcs </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the last position of the reference junction in the machine tool coordinate system.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns last position as a list of X, Y and Z coordinates.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set last_position [SIM_ask_last_position_mtcs]</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_last_position_zcs"></a><div class="title_division">SIM_ask_last_position_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_last_position_zcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the last position of the reference junction in ZCS coordinate system.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the last position as a list of X, Y and Z coordinates.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set last_position [SIM_ask_last_position_zcs]</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_linear_axes_config"></a><div class="title_division">SIM_ask_linear_axes_config</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" height="31" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" height="31" rowspan="1">
               <p class="para_td">SIM_ask_linear_axes_config</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the current list of logical NC axes that will participate in executing the next linear motion command. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns a list of NC axes names.</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_linear_axes_map"></a><div class="title_division">SIM_ask_linear_axes_map</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_linear_axes_map</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns a table that maps logical linear axes to physical axes.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns a table of couples. The first member of a couple is the logical axis and the second one is the physical name. </p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_offsets_mtcs"></a><div class="title_division">SIM_ask_offsets_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_offsets_mtcs &lt;from_jct&gt; &lt;to_jct&gt; &lt;state&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns offsets between two junctions in machine tool coordinate system. The offset could be returned with respect to the CURRENT state of the KIM model or in its INITIAL state. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">from_jct: return offset from this junction name</p>
               <p class="para_td">to_jct: to this junction name</p>
               <p class="para_td">state: CURRENT or INITIAL</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The offset between the two junctions is returned as a list of X, Y and Z coordinates.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set vector [ SIM_ask_offsets_mtcs $from_jct $to_jct CURRENT ]</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_rotary_axes_config"></a><div class="title_division">SIM_ask_rotary_axes_config</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_rotary_axes_config</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the current list of logical NC axes that will participate in executing the next rotary motion command. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns list of NC axes names.</p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_rotary_axes_map"></a><div class="title_division">SIM_ask_rotary_axes_map</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_rotary_axes_map</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns a table that maps logical rotary axes to physical axes.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns a table of couples. The first member of a couple is the logical axis and the second one is the physical name. </p>
            </td>
         </tr>
      </table><br><a name="SIM_ask_tool_position_mtcs"></a><div class="title_division">SIM_ask_tool_position_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_tool_position_mtcs &lt;tip_jct&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command returns the specified tool tip position and tool orientation with respect to the current MTCS. The position is the current position of the origin of the specified junction. The tool axis orientation is assumed to be in direction of the X axis of the specified junction.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">tip_jct: tool tip junction name</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This returns a list with 6 values. The first three are the tip position and the other three are vectors of the tool axis. All are defined with respect to the MTCS.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td"># get current tool position and axis</p><pre class="indent">set pos_and_axis [SIM_ask_tool_position_mtcs [SIM_ask_current_ref_junction] ]
set tool_X [lindex $pos_and_axis 0]
set tool_Y [lindex $pos_and_axis 1]
set tool_Z [lindex $pos_and_axis 2]
set axis_X [lindex $pos_and_axis 3]
set axis_Y [lindex $pos_and_axis 4]
set axis_Z [lindex $pos_and_axis 5]</pre></td>
         </tr>
      </table><br><a name="SIM_ask_tool_position_zcs"></a><div class="title_division">SIM_ask_tool_position_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_ask_tool_position_zcs &lt;tip_jct&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command returns the specified tool tip position and tool orientation with respect to the current ZCS. The position is the current position of the origin of the specified junction. The tool axis orientation is assumed to be in direction of the X axis of the specified junction.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">tip_jct: tool tip junction name</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This returns a list with 6 values. The first three are the tip position and the other three are vectors of the tool axis. All are defined with respect to the ZCS.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td"># get current tool position and axis</p><pre class="indent">set pos_and_axis [SIM_ask_tool_position_zcs [SIM_ask_current_ref_junction] ]
set tool_X [lindex $pos_and_axis 0]
set tool_Y [lindex $pos_and_axis 1]
set tool_Z [lindex $pos_and_axis 2]
set axis_X [lindex $pos_and_axis 3]
set axis_Y [lindex $pos_and_axis 4]
set axis_Z [lindex $pos_and_axis 5]</pre></td>
         </tr>
      </table><br><a name="SIM_compute_transform"></a><div class="title_division">SIM_compute_transform</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_compute_transform &lt; src_jct&gt;&lt; target_jct&gt;&lt; src_state&gt;&lt; target_state&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This commands computes the transformation from src_jct in initial or its current state to the target junction in its current or initial state.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">src_jct: &nbsp;This is the name of the source junction. </p>
               <p class="para_td">target_jct: &nbsp;This is the name of target junction. </p>
               <p class="para_td">src_state: &nbsp;INITIAL or CURRENT. This is an optional parameter. The default is INITIAL. INITIAL specifies that the src_jct coordinate system should be considered in the initial state of the machine. CURRENT specifies that the src_jct coordinate system should be considered in the current state of the machine.</p>
               <p class="para_td">target_state: &nbsp;INITIAL or CURRENT. This is an optional parameter. The default is INITIAL. INITIAL specifies that the target_jct coordinate system should be considered in the initial state of the machine. CURRENT specifies that the target_jct coordinate system should be considered in the current state of the machine.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">mom_sim_result contains the transformation matrix </p>
               <p class="para_td">mom_sim_result1 contains the translation vector.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1"><pre class="indent">#get name of MTCS junction
SIM_ask_mtcs_junction 
set mtcs_jct $mom_sim_result
# after this call mom_sim_result has the transformation from ZCS to MTCS &nbsp;
SIM_compute_transform &nbsp;[SIM_ask_current_zcs_junction] &nbsp;$mtcs_jct CURRENT CURRENT</pre></td>
         </tr>
      </table><br><a name="SIM_convert_mtd_to_sim_units"></a><div class="title_division">SIM_convert_mtd_to_sim_units</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_convert_mtd_to_sim_units &lt;value&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This converts machine tool driver units to simulation (part) units.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">value in MTD units</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the value in simulation units.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set sim_pos [ SIM_convert_mtd_to_sim_units ]</p>
            </td>
         </tr>
      </table><br><a name="SIM_convert_sim_to_mtd_units"></a><div class="title_division">SIM_convert_sim_to_mtd_units</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_convert_sim_to_mtd_units &lt;value&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Converts a specified value from current part/simulation units to MTD units.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">value in simulation units</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the value in MTD units.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Convert X coordinate of MCS to MTD units.</p>
               <p class="para_td">set origin0 [ SIM_convert_sim_to_mtd_units $mom_msys_origin(0) ]</p>
            </td>
         </tr>
      </table><br><a name="SIM_dialog_add_item"></a><div class="title_division">SIM_dialog_add_item</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_dialog_add_item &lt;item type&gt; &lt;item_id&gt; &lt;item_att&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command adds a system or user-defined item to  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgisv/mfgisv_setup_high_sys_items.html');return(false);">customize the NC Controller Panel dialog</a>. 
               </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">item_type: the type identifier for the user or system item defined at creation time.</p>
               <p class="para_td">item_id: a text name to identify the item. This is used to identify the item by the SIM_dialog_set_item command. No spaces are allowed.</p>
               <p class="para_td">item_att: the item attributes according to the syntax described in  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgisv/mfgisv_setup_high_sys_items.html');return(false);">the NC Controller Panel dialog</a>. 
               </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td"># the following example issues the commands that set the default look of the simulation dialog (just the system items)</p><pre class="indent">SIM_dialog_start &quot;Control Panel for M5ACHH Driver&quot;</pre><p class="para_td"># the following are the definitions of the default system items</p><pre class="indent">SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_ACTIVE_TOOL_ITEM &nbsp;&nbsp;S1&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_SPEED_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S2&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_FEED_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S3&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_COOLANT_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S4 
ORIENTATION=&lt;HORIZONTAL&gt;&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_POSITION_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S5&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_PROGRAM_WINDOW_ITEM S6&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_MESSAGE_WINDOW_ITEM S7&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_STEP_CONTROL_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S8&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_ANIMATION_SPEED_ITEM &nbsp;&nbsp;S9&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&quot;SYS_MACHINE_TIME_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S10&quot;</pre><p class="para_td"># examples of user defined items</p><pre class="indent">SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&nbsp;&quot;USR_SEPARATOR_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U1&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&nbsp;&quot;USR_LABEL_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U2 LABEL=&lt;my label&gt;&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&nbsp;&quot;USR_STRING_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U3 LABEL=&lt;my string&gt; 
VALUE=&lt;string value&gt;&quot;
SIM_dialog_add_item &nbsp;&nbsp;&nbsp;&nbsp;&quot;USR_RADIO_ITEM &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U4 LABEL=&lt;my radio&gt; 
ORIENTATION= &lt;HORIZONTAL&gt; SPAN=&lt;3&gt; LIST=&lt;radio1,radio2,radio3&gt; VALUE=&lt;1&gt; 
FORMAT=&lt;CHECK_BOX&gt;&quot;
SIM_dialog_end</pre></td>
         </tr>
      </table><br><a name="SIM_dialog_end"></a><div class="title_division">SIM_dialog_end</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_dialog_end </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command ends the customized dialog definition. This must be defined.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_dialog_set_item"></a><div class="title_division">SIM_dialog_set_item</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_dialog_set_item &lt;item_id&gt; &lt;item_att&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command sets the item attributes of the  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgisv/mfgisv_setup_high_sys_items.html');return(false);">customized&nbsp;NC Controller Panel dialog</a>. 
               </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">item_id: a text name to identify the item. This id is defined at creation time in SIM_dialog_add_item command.</p>
               <p class="para_td">item_att: the item attributes according to the syntax described in  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgisv/mfgisv_setup_high_sys_items.html');return(false);">customized&nbsp; NC Controller Panel dialog</a>. 
               </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td"># For system items currently only SENSITIVE attribute can be changed. The following command dims the Machine Time item from example in SIM_dialog_add_item</p><pre class="indent">SIM_dialog_set_item &quot;S10 SENSITIVE=&lt;OFF&gt;&quot; </pre><p class="para_td"># dim the X, Y and Z axes in position item</p><pre class="indent">SIM_dialog_set_item &quot;S5 LIST=&lt;X,Y,Z&gt; SENSITIVE=&lt;NO&gt;&quot;</pre><p class="para_td"># For user item all attributes can be changed</p><pre class="indent">SIM_dialog_set_item &quot;U2 LABEL=&lt;label1&gt; SENSITIVE=&lt;OFF&gt;&quot;
SIM_dialog_set_item &quot;U3 LABEL=&lt;label2&gt; VALUE=&lt;$value1&gt; SENSITIVE=&lt;OFF&gt;&quot;
SIM_dialog_set_item &quot;U4 LABEL=&lt;label4&gt; VALUE=&lt;2&gt; SENSITIVE=&lt;OFF&gt;&quot;</pre></td>
         </tr>
      </table><br><a name="SIM_dialog_start"></a><div class="title_division">SIM_dialog_start</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_dialog_start &lt;dialog_type&gt;&lt;item_attribute&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command starts the definition of the  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgisv/mfgisv_setup_high_sys_items.html');return(false);">customizable NC Controller Panel dialog</a> in ISV or the channel window in Merging Lathes.. The simulation dialog can be customized by the machine tool driver writer. It contains system and user defined items. The system items are predefined items. By default all system items are shown in the simulation dialog. You can add and set user items during the simulation from the machine tool driver. The system items are set automatically by the S&amp;V engine and you can only change a few of their attributes. Only the machine tool driver writer can set the user items. 
               </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">dialog_type: SYS_MAIN_CONTROL_PANEL to modify the NC Controller Panel dialog or SYS_CHANNEL_WINDOW to modify the channel window.</p>
               <p class="para_td">item_attribute: TITLE=&lt;Control Panel&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see example in SIM_dialog_add_item</p>
            </td>
         </tr>
      </table><br><a name="SIM_invoke"></a><div class="title_division">SIM_invoke</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" height="33" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" height="33" rowspan="1">
               <p class="para_td">SIM_invoke &lt;S&amp;V command&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This is a wrapper to S&amp;V commands that validates that the MTD has been initialized before the S&amp;V command is issued. This can be useful in posts that issue S&amp;V commands.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">S&amp;V command with its arguments</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The function returns the value in MTD units.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_invoke SIM_move_linear_mtcs Z $tool_change_pos(2)</p>
            </td>
         </tr>
      </table><br><a name="SIM_macro_append_sv_cmd"></a><div class="title_division">SIM_macro_append_sv_cmd</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_macro_append_sv_cmd &lt;S&amp;V command&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Append S&amp;V command to the current macro definition.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">S&amp;V command and its arguments</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See example in SIM_macro_call</p>
            </td>
         </tr>
      </table><br><a name="SIM_macro_call"></a><div class="title_division">SIM_macro_call</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_macro_call &lt;macro_name&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Call a predefined macro. All the S&amp;V commands associated with the macro are executed sequentially.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">macro_name: the name of existing macro</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This example shows how to define a macro (cycle_200) and how to invoke it. This macro is one of the DMU50 drilling cycles.</p>
               <p class="para_td"># start macro cycle_200 definition</p><pre class="indent">SIM_MTD_macro_def cycle_200</pre><p class="para_td"># change to rapid mode</p><pre class="indent">SIM_macro_append_sv_cmd &quot; SIM_set_cutting_mode RAPID&quot;</pre><p class="para_td"># move rapid delta Z to $mom_cycle_rapid_to</p><pre class="indent">SIM_macro_append_sv_cmd &quot;SIM_move_linear_zcs Z \[ sim_mtd_get_z $mom_cycle_rapid_to \]&quot;</pre><p class="para_td"># move rapid delta Z to $mom_cycle_feed_to</p><pre class="indent">SIM_macro_append_sv_cmd &quot;SIM_move_linear_zcs Z \[ sim_mtd_get_z $mom_cycle_feed_to \]&quot;</pre><p class="para_td"># change value of mom_cycle_feed_to , set cutting mode and feedrate </p><pre class="indent">set mom_cycle_feed_to [expr abs($mom_cycle_feed_to)]
SIM_macro_append_sv_cmd &quot; SIM_set_cutting_mode CUT&quot;
SIM_macro_append_sv_cmd &quot; SIM_set_feed $mom_cycle_feed_rate INCH_PER_MIN&quot;</pre><p class="para_td"># move to bottom of drill</p><pre class="indent">SIM_macro_append_sv_cmd &quot;SIM_move_linear_zcs Z \[ sim_mtd_get_z $mom_cycle_feed_to \]&quot; </pre><p class="para_td"># move to retract position</p><pre class="indent">SIM_macro_append_sv_cmd &quot;SIM_move_linear_zcs Z \[ sim_mtd_get_z $mom_cycle_retract_to \]&quot; </pre><p class="para_td">&nbsp;# end of macro definition</p><pre class="indent">SIM_MTD_macro_end cycle_200</pre><p class="para_td"># Here is the definition of the local procedure sim_mtd_get_z. The global variables sim_last_X, sim_last_Y and sim_last_Z are set to the last tool tip position before the macro starts. This way ncremental work with respect to some starting point can be done.</p><pre class="indent">proc sim_mtd_get_z { z_val } {
global sim_last_X sim_last_Y sim_last_Z
&nbsp;set z [expr $sim_last_Z + $z_val]
return $z
}</pre><p class="para_td"># Now, somewhere in the NC program the macro is called after positioning the tool at a starting point.</p><pre class="indent">SIM_set_cutting_mode RAPID 
SIM_move_linear_zcs X $mom_pos(0) Y $mom_pos(1) C $mom_out_angle_pos(0) B $mom_out_angle_pos(1)
SIM_macro_call cycle_200</pre></td>
         </tr>
      </table><br><a name="SIM_macro_def"></a><div class="title_division">SIM_macro_def</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_macro_def macro_name</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Starts a definition of a new macro. If a macro exists, it will be deleted first.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">macro_name: the name of the macro</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_macro_call</p>
            </td>
         </tr>
      </table><br><a name="SIM_macro_delete"></a><div class="title_division">SIM_macro_delete</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_macro_delete macro_name</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Delete an existing macro</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">macro_name: the name of the macro</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_macro_call</p>
            </td>
         </tr>
      </table><br><a name="SIM_macro_delete_all"></a><div class="title_division">SIM_macro_delete_all</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_macro_delete_all </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Delete all macros</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_macro_call</p>
            </td>
         </tr>
      </table><br><a name="SIM_macro_end"></a><div class="title_division">SIM_macro_end</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_macro_end macro_name</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">End definition of a new macro</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">macro_name: the name of the macro</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_macro_call</p>
            </td>
         </tr>
      </table><br><a name="SIM_map_logical_to_phisical_axis"></a><div class="title_division">SIM_map_logical_to_phisical_axis</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_map_logical_to_phisical_axis &lt;logical_axis&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Return the physical axis that corresponds to the specified logical axis. This is based on the mapping table defined by commands SIM_set_rotary_axes_map and SIM_set_linear_axes_map</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">logical_axis: name of logical axis</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The physical axis.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set ph_axis [SIM_map_logical_to_phisical_axis X]</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_circular_mtcs"></a><div class="title_division">SIM_move_circular_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_circular_mtcs &lt;plane vector&gt; &lt;args&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Perform a circular motion. Coordinates are in machine tool coordinate system (MTCS). The function approximates the specified arc by linear segments. The deviation of the segments from the arc is by cording tolerance (set by SIM_set_cording_tol). Each motion of the arc segment is executed by the SIM_move_linear_mtcs command. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">plane vector: a unit vector which defines the plane</p>
               <p class="para_td">args: the definition is consistent with the G02 and G03 commands. The center of the arc is defined by the combination of two components of I, J, or K for the 2D case and the I, J, K for the 3D case. R can replace the I, J, K definition and is explained in the example below. In the 2D case, the end point third coordinate could also be specified to define a helical motion between the start and end points.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="7">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">The command syntax is very similar to the G02 or G03 G code command. This command syntax covers two types of circular motion formats: one where the center of the arc is explicitly defined and the other one by the arc radius. Here are four examples of this circular motion format:</p>
               <p class="para_td">SIM_move_circular_mtcs 0 0 1 X 10 Y 10 I 20 J 30 </p>
               <p class="para_td">SIM_move_circular_mtcs 0 0 1 X 10 Y 10 R 14 </p>
               <p class="para_td">SIM_move_circular_mtcs 0 0 1 X 10 Y 10 Z 34 I 20 J 30 K 34 </p>
               <p class="para_td">SIM_move_circular_mtcs 0 0 1 X 10 Y 10 Z 34 R 65</p>
               <p class="para_td">The first two examples describe a circular arc in the X-Y plane. The other examples describe an arc in space. Examples one and two also represent arcs defined in other orthogonal planes (i.e., X-Z and Y-Z planes). In that case K replaces J or I respectively. </p>
               <p class="para_td">Examples one and three use the coordinates of the center point (M) of the arc given by I 20 J 30 and I 20 J 30 K 34 respectively. The arc direction is determined by the plane vector. The rotation direction is always positive (CCW) with respect to the specified vector. Figure 1 illustrates the arc direction depending on the plane vector. The end coordinates (E) are given by X, Y or X, Y and Z respectively. The start coordinate (S) is the starting point (where the tool is before this motion starts).</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p align="center"><img align="bottom" src="graphics/move_circ_fig_1.gif"></p>
            </td>
         </tr>
         <tr>
            <th align="left" colspan="1" rowspan="1" valign="top">
               <p class="para_th">Figure : Rotation Direction for the Circular Interpolation in the XY-Plane and Space by a Given Center Point (M) and Rotation Vector</p>
            </th>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">Examples two and four use the radius of the circle arc. There are solutions using the radius instead of the centre point as illustrated in next figure.</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p align="center"><img align="bottom" src="graphics/move_circ_fig_2.gif"></p>
            </td>
         </tr>
         <tr>
            <th align="left" colspan="1" rowspan="1" valign="top">
               <p class="para_th">Figure: Center Point Mode for the Circular Interpolation in the XY-Plane and Space by a Given Radius</p>
            </th>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">The rotation vector and the sign of the radius determine the right arc. Furthermore, there is a simple rule to find the correct center point:</p>
               <p class="para_td">R&gt;0  180 &gt;= rotation angle &gt; 0</p>
               <p class="para_td">R&lt;0  360 &gt; rotation angle &gt; 180</p>
               <p class="para_td">It is not permissible to program with the radius method if the traversing angle is 0 or 360. There a full circle must be programmed using the other method.</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_circular_zcs"></a><div class="title_division">SIM_move_circular_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_circular_zcs &lt;plane vector&gt; &lt;args&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Perform a circular move. Coordinates are specified in ZCS. See detailed description in SIM_move_circular_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_move_circular_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_helical_mtcs"></a><div class="title_division">SIM_move_helical_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_helical_mtcs &lt;&amp;&amp;gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">High level function for helical motion related to the MTCS. Syntax same as SIM_move_circular_mtcs with the following extension:</p>
               <p class="para_td">P 'pitch in radians' - P and value is specififed where each revolution is 2*PI. The end point should match the pitch value and should have the correct depth position. If pitch is less than 2*PI, then only the correct end position could be specified.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see SIM_move_circular_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_helical_zcs"></a><div class="title_division">SIM_move_helical_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_helical_zcs &lt;&amp;&amp;gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">High level function for helical motion related to the ZCS. Syntax same as SIM_move_circular_zcs with the following extension:</p>
               <p class="para_td">P 'pitch in radians' - P and value is specififed where each revolution is 2*PI. The end point should match the pitch value and should have the correct depth position. If pitch is less than 2*PI, then only the correct end position could be specified.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see SIM_move_circular_zcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">&nbsp;none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_circular_mtcs"></a><div class="title_division">SIM_move_inc_circular_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_inc_circular_mtcs &lt;&amp;&amp;gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">High level function for circular motion related to the MTCS. End position are INCREMENTAL step in respect to last position.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see SIM_move_circular_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_circular_zcs"></a><div class="title_division">SIM_move_inc_circular_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_inc_circular_zcs &lt;&amp;&amp;gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">High level function for circular motion related to the ZCS. End position are INCREMENTAL step in respect to last position.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see SIM_move_circular_zcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_helical_mtcs"></a><div class="title_division">SIM_move_inc_helical_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_inc_helical_mtcs &lt;&amp;&amp;gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">High level function for INCREMENTAL helical motion related to the MTCS. Syntax same as SIM_move_circular_mtcs with the following extension:</p>
               <p class="para_td">P 'pitch in radians' - P and value is specififed where each revolution is 2*PI. The end point should match the pitch value and should have the correct depth position. If pitch is less than 2*PI, then only the correct end position could be specified.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see SIM_move_inc_circular_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_helical_zcs"></a><div class="title_division">SIM_move_inc_helical_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" height="31" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" height="31" rowspan="1">
               <p class="para_td">SIM_move_inc_helical_zcs &lt;&amp;&amp;gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">&nbsp;High level function for INCREMENTAL helical motion related to the ZCS. Syntax same as SIM_move_circular_zcs with the following extension:</p>
               <p class="para_td">P 'pitch in radians' - P and value is specififed where each revolution is 2*PI. The end point should match the pitch value and should have the correct depth position. If pitch is less than 2*PI, then only the correct end position could be specified.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">see SIM_move_inc_circular_zcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_linear_mtcs"></a><div class="title_division">SIM_move_inc_linear_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_inc_linear_mtcs &lt;args&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sames as SIM_move_linear_mtcs, but the values are INCREMENTAL.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_move_linear_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_linear_zcs"></a><div class="title_division">SIM_move_inc_linear_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" height="33" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" height="33" rowspan="1">
               <p class="para_td">SIM_move_inc_linear_zcs &lt;args&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sames as SIM_move_linear_zcs, but the values are INCREMENTAL.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_move_linear_zcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_nurbs_mtcs"></a><div class="title_division">SIM_move_inc_nurbs_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_inc_nurbs_mtcs &lt;p_count&gt; &lt;order&gt; &lt;k_count&gt; &lt;knots&gt; &lt;points&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Same as SIM_move_nurbs_mtcs, but the values are INCREMENTAL. It is unclear if NURBS values can be incremental? So this function is designed only to be in synchronization with linear and helical motion functions.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Same as in SIM_move_nurbs_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_inc_nurbs_zcs"></a><div class="title_division">SIM_move_inc_nurbs_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_inc_nurbs_zcs &lt;p_count&gt; &lt;order&gt; &lt;k_count&gt; &lt;knots&gt; &lt;points&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Same as SIM_move_nurbs_zcs, but the values are INCREMENTAL. It is unclear if NURBS values can be incremental? So this function is designed only to be in synchronization with linear and helical motion functions.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Same as in SIM_move_nurbs_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_linear_mtcs"></a><div class="title_division">SIM_move_linear_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_linear_mtcs &lt;args&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command moves the current reference junction (set by SIM_set_current_ref_junction like tool tip junction) to the target position specified in machine tool coordinate system (MTCS). The linear and rotary axes that participate in achieving the target position are defined by the SIM_set_linear_axes_config and SIM_set_rotary_axes_config respectively.</p>
               <p class="para_td">The arguments that can be passed to the command are very similar to the G01 arguments (just the motion arguments). The target position can be explicitly defined for X, Y, Z and rotary axes. But it can also omit one or more of the coordinates which means that those coordinates do not change during that motion.</p>
               <p class="para_td">Note that the axes of the MTCS coordinate system are not necessarily aligned with the actual machine tool axes. </p>
               <p class="para_td">This function also computes the duration of this motion based on the length of the linear and angular displacement and the current feed rate. The actual computation of the duration is computed by a user TCL procedure call back that is set by the S&amp;V command SIM_set_duration_callback_fct.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See details in description</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_linear_mtcs X 100 Y 200 Z 300 A 20 B 15</p>
               <p class="para_td">SIM_move_linear_mtcs X 20</p>
               <p class="para_td">SIM_move_linear_mtcs B 100</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_linear_zcs"></a><div class="title_division">SIM_move_linear_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_linear_zcs &lt;args&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command differs from the SIM_move_linear_mtcs in two ways: first, the coordinates in this command are specified with respect to the ZCS and not MTCS. Second, the ZCS coordinate system is not fixed and can be set by call to SIM_update_current_zcs.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">See SIM_move_linear_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_linear_zcs X 120.3 Y 300.5 A 67.5</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_nurbs_mtcs"></a><div class="title_division">SIM_move_nurbs_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_nurbs_mtcs &lt;p_count&gt; &lt;order&gt; &lt;k_count&gt; &lt;knots&gt; &lt;points&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">High level function for NURB motion. The function takes the NURBS parameter as input converts the NURB to linear segments, based on the system tolerance and move the machine tool with this converted positions. The Values of the NURBS data are in relation to the MTCS coordinate system.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">p_count: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of points of NURBS</p>
               <p class="para_td">order of the NURBS</p>
               <p class="para_td">k_count: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of the knots</p>
               <p class="para_td">knots: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TCL list of knots</p>
               <p class="para_td">points: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TCL list of points</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_move_nurbs_zcs"></a><div class="title_division">SIM_move_nurbs_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_move_nurbs_zcs &lt;p_count&gt; &lt;order&gt; &lt;k_count&gt; &lt;knots&gt; &lt;points&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This command is identical to the SIM_move_nurbs_mtcs except, that the coordinates in this command are specified in relation to ZCS and not MTCS.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Same as in SIM_move_nurbs_mtcs</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_current_ref_junction"></a><div class="title_division">SIM_set_current_ref_junction</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_current_ref_junction &lt;jct_name&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the current reference junction. The reference junction is taken into account in the high level S&amp;V motion commands.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">jct_name: name of existing junction. Since junction name is unique within a kinematics component, the junction name could also be prefixed with the kinematics name and the character @ and then followed by the junction name. For example: spindle@tool_mount_jct identifies the tool_mount_jct junction defined in the spindle kinematics component.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_current_ref_junction TOOL_TIP_JCT </p>
            </td>
         </tr>
      </table><br><a name="SIM_set_duration_callback_fct"></a><div class="title_division">SIM_set_duration_callback_fct</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_duration_callback_fct &lt;fct&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the callback function that is used to compute the duration of a motion. To get an accurate duration of a motion, one can take into account the acceleration and deceleration feed rate rather than a constant feed rate. The fct prototype should be as follows:</p><pre class="indent">proc CalculateDurationTime { linear_or_angular delta }
{
...
set time ...
....
return $time
}</pre><p class="para_td">linear_or_angular can get the values LINEAR or ANGULAR. This specifies whether delta, the axis displacement, is for linear or rotary axes. The function has to return the time in seconds that it will take the machine tool to do this delta motion.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">fct: a TCL callback function </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_duration_callback_fct CalculateDurationTime</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_implicit_update"></a><div class="title_division">SIM_set_implicit_update</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_implicit_update&lt;update_flag&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">This function affects the high level motion commands SIM_move_linear_zcs/mtcs. If update_flag is YES, then the system internally calls SIM_update at the end of the high level commands. If NO it does not.</p>
               <p class="para_td">The function is especially useful if you want to move several machine devices at a time. Set the update_flag to NO and call SIM_update after the motion commands for all involved devices.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">update_flag	YES or NO</p>
            </td>
         </tr>
         <tr>
            <th align="center" colspan="1" rowspan="1" valign="top">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1"><pre class="indent">SIM_set_implicit_update NO</pre></td>
         </tr>
      </table><br><a name="SIM_set_interpolation"></a><div class="title_division">SIM_set_interpolation</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_interpolation&lt;interpolation&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Turns interpolation on or off between the calculated tool tip positions in the NC program. When turned on (the default), animation frames are created between the NC program points to provide smooth simulated motion. The number of these frames is determined by the slider setting and the Maximum Length, Angle, and Time increments. When turned off, the animation will display only the actual NC program points. This has several uses. Perhaps the driver itself performs the interpolation so the simulation engine does not need to supply additional frames. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">interpolation: ON or OFF</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1"><pre class="indent">SIM_set_interpolation ON</pre></td>
         </tr>
      </table><br><a name="SIM_set_linear_axes_config"></a><div class="title_division">SIM_set_linear_axes_config</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_linear_axes_config &lt;axes-list&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the current list of logical NC axes that will participate in executing the next linear motion command. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">axes-list: the linear axes list</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_linear_axes_config [concat X Y Z]</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_linear_axes_map"></a><div class="title_division">SIM_set_linear_axes_map</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_linear_axes_map &lt;map-table&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the current table that maps logical linear axes to physical axes.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">map_table: a list of pairs of logical and physical axes</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_linear_axes_map [concat X X_AXIS Y Y_AXIS Z Z_AXIS]</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_linearization"></a><div class="title_division">SIM_set_linearization</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_linearization&lt;linearization&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Turns simulated linearization on or off for 5-axis mills. The initial condition is off. This changes how the tool will move between the calculated tool tip positions in the NC program. When linearization is off, each of the 5 axes are independently interpolated. When turned on, the rotary axes are independently interpolated but the linear axes are adjusted to keep the reference junction (usually the tool tip) following a line between the first and second positions. This command can be used to emulate machine controllers that do linearization internally. For machine controllers that do not, you must do linearization via a setting in the post processor. Some machine controllers linearize during cutting motions but not during rapid motions, so you need to determine the appropriate places in the machine tool driver to turn linearization on and off.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">linearization: ON or OFF</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">None</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1"><pre class="indent">SIM_set_linearization ON</pre></td>
         </tr>
      </table><br><a name="SIM_set_rotary_axes_config"></a><div class="title_division">SIM_set_rotary_axes_config</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_rotary_axes_config &lt;axes-list&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the current list of logical NC axes that will participate in executing the next rotary motion command. </p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">axes-list: the rotary axes list</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_rotary_axes_config [concat B C]</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_rotary_axes_map"></a><div class="title_division">SIM_set_rotary_axes_map</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_rotary_axes_map &lt;map-table&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the current table that maps logical rotary axes to physical axes.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">map_table: a list of pairs of logical and physical axes</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_set_rotary_axes_map [concat A A B SP]</p>
            </td>
         </tr>
      </table><br><a name="SIM_transform_mtcs_to_zcs"></a><div class="title_division">SIM_transform_mtcs_to_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_transform_mtcs_to_zcs &lt;x&gt; &lt;y&gt; &lt;z&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Transforms the point from MTCS to current ZCS coordinate system.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">x, y, z: X, Y and Z coordinates of point to be transformed.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the transformed point as a list of the three coordinates.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set pt_zcs [SIM_transform_mtcs_to_zcs $mtcs_x $mtcs_y $mtcs_z]</p>
            </td>
         </tr>
      </table><br><a name="SIM_transform_point"></a><div class="title_division">SIM_transform_point</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_transform_point &lt;point src_jct target_jct src_state target_state&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Transforms the specified point coordinates defined with respect to the src_jct coordinate system to the target_jct coordinate system. The junctions coordinate system could be defined with respect to the initial state of the machine (INITIAL) or the current state (CURRENT). The state of the junction is determined by the optional parameters src_state and target_state.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">point : list of 3 coordinates</p>
               <p class="para_td">src_jct: This is the name of the source junction. The point is defined with respect to this junction coordinate system.</p>
               <p class="para_td">target_jct: This is the name of target junction. The point is transformed to this coordinate system.</p>
               <p class="para_td">src_state: INITIAL or CURRENT values. This is an optional parameter. The default is INITIAL. INITIAL specifies that the src_jct coordinate system should be considered in the initial state of the machine. CURRENT specifies that the src_jct coordinate system should be considered in the current state of the machine.</p>
               <p class="para_td">target_state: INITIAL or CURRENT values. This is an optional parameter. The default is INITIAL. INITIAL specifies that the target_jct coordinate system should be considered in the initial state of the machine. CURRENT specifies that the target_jct coordinate system should be considered in the current state of the machine.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">the transformed point</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td"># Get name of MTCS junction</p><pre class="indent">SIM_ask_mtcs_junction 
set mtcs_jct $mom_sim_result</pre><p class="para_td"># return the origin of the current tool tip junction with respect to the MTCS</p><pre class="indent">set point [list 0.0 0.0 0.0 ]
set origin [ SIM_transform_point $point $tool_tip_jct $mtcs_jct CURRENT CURRENT</pre></td>
         </tr>
      </table><br><a name="SIM_transform_vector"></a><div class="title_division">SIM_transform_vector</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_transform_vector &lt;vector src_jct target_jct src_state</p>
               <p class="para_td">target_state&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Transforms the specified vector defined with respect to the src_jct coordinate system to the target_jct coordinate system. The junctions coordinate system could be defined with respect to the initial state of the machine (INITIAL) or the current state (CURRENT). The state of the junction is determined by the optional parameters src_state and target_state.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">vector: list of 3 coordinates</p>
               <p class="para_td">src_jct: This is the name of the source junction. The point is defined with respect to this junction coordinate system</p>
               <p class="para_td">target_jct: This is the name of the target junction. The vector is transformed to this coordinate system</p>
               <p class="para_td">src_state: INITIAL or CURRENT values. This is an optional parameter. The default is INITIAL. INITIAL specifies that the src_jct coordinate system should be considered in the initial state of the machine. CURRENT specifies that the src_jct coordinate system should be considered in the current state of the machine.</p>
               <p class="para_td">target_state: INITIAL or CURRENT values. This is an optional parameter. The default is INITIAL. INITIAL specifies that the target_jct coordinate system should be considered in the initial state of the machine. CURRENT specifies that the target_jct coordinate system should be considered in the current state of the machine.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">the transformed vector</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td"># get name of MTCS junction</p><pre class="indent">SIM_ask_mtcs_junction 
set mtcs_jct $mom_sim_result</pre><p class="para_td"># return the Z axis of the tool tip junction junction with respect to the MTCS</p><pre class="indent">set vector [list 0.0 0.0 1.0 ]
set z_axis [SIM_transform_point $vector $tool_tip_jct $mtcs_jct CURRENT CURRENT]</pre></td>
         </tr>
      </table><br><a name="SIM_transform_zcs_to_mtcs"></a><div class="title_division">SIM_transform_zcs_to_mtcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_transform_zcs_to_mtcs &lt;x&gt; &lt;y&gt; &lt;z&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Transforms the point from current ZCS to MTCS coordinate system.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">x, y, z: X, Y and Z coordinate of point to be transformed.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Returns the transformed point as a list or the three coordinates.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">set pt_mtcs [SIM_transform_zcs_to_mtcs $zcs_x $zcs_y $zcs_z]</p>
            </td>
         </tr>
      </table><br><a name="SIM_update_current_zcs"></a><div class="title_division">SIM_update_current_zcs</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Syntax</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">SIM_update_current_zcs &lt;zcs_jct&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">Sets the current ZCS junction to be considered in the high level S&amp;V motion commands. This also updates the transformation from ZCS to MTCS</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Parameters</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">zcs_jct: the name of the new ZCS junction. Junction must be already created.</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Output</p>
            </th>
            <td colspan="1" rowspan="1">
               <p class="para_td">none</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" rowspan="1">
               <p class="para_th">Example</p>
            </th>
            <td colspan="1" rowspan="1"><pre class="indent">set origin0 [ SIM_convert_sim_to_mtd_units $mom_msys_origin(0) ]
set origin1 [ SIM_convert_sim_to_mtd_units $mom_msys_origin(1) ]
set origin2 [ SIM_convert_sim_to_mtd_units $mom_msys_origin(2) ]
SIM_create_junction CURRENT_ZCS_JCT $dest_cmp $origin0 $origin1 $origin2 $mom_msys_matrix(0)
$mom_msys_matrix(1) $mom_msys_matrix(2) $mom_msys_matrix(3) $mom_msys_matrix(4)$mom_msys_matrix(5)
$mom_msys_matrix(6) $mom_msys_matrix(7) $mom_msys_matrix(8)
SIM_update_current_zcs CURRENT_ZCS_JCT</pre></td>
         </tr>
      </table><br></body>
</html>