<!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>S&amp;V Commands for Advanced Programming- 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">S&amp;V Commands for Advanced Programming- Description</div>
      <hr noshade="true">
      <div class="title_division">Initialization Commands</div><a name="SIM_mach_max_axis_rapid_velocity"></a><div class="title_division">SIM_mach_max_axis_rapid_velocity</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_mach_max_axis_rapid_velocity &lt;axis_name&gt; &lt;velocity&gt; &lt;unit&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 maximum rapid velocity for a machine axis.</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">axis_name: name of the axis as defined in the Machine Tool Builder (for example, X, Y, Z, A, B)</p>
               <p class="para_td">velocity: value of the velocity</p>
               <p class="para_td">unit: the following units are available:</p>
               <ul>
                  <li>
                     <p class="para_item">INCH_PER_SEC</p>
                  </li>
                  <li>
                     <p class="para_item">MM_PER_SEC</p>
                  </li>
                  <li>
                     <p class="para_item">REV_PER_SEC</p>
                  </li>
                  <li>
                     <p class="para_item">INCH_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">FEET_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">M_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">REV_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">DEG_PER_MIN</p>
                  </li>
               </ul>
            </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_mach_max_axis_rapid_velocity X &nbsp;15 &nbsp;m_per_min</p>
            </td>
         </tr>
      </table><br><a name="SIM_mach_max_spindle_speed"></a><div class="title_division">SIM_mach_max_spindle_speed</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_mach_max_spindle_speed &lt;spindle_name&gt; &lt;speed&gt; &lt;unit&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 maximum spindle speed in rotations per minute (rpm) for the specified spindle. </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">spindle_name: name of the spindle as defined in the Machine Tool Builder</p>
               <p class="para_td">speed: the speed </p>
               <p class="para_td">unit: REV_PER_MIN</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_mach_max_spindle_speed &nbsp;COUNTER_SPINDLE 5000 REV_PER_MIN </p>
            </td>
         </tr>
      </table><br><a name="SIM_mach_assign_channel_to_spindle"></a><div class="title_division">SIM_mach_assign_channel_to_spindle</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_mach_assign_channel_to_spindle &lt;channel_id&gt; &lt;spindle_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">Tells the specified channel to work at the specified spindle. It is mandatory that you assign all channels that control cutting tools to a spindle at initialization time.</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">channel_id: ID of the channel. It is defined in the Device Data subdialog of the component classification dialog in the Machine Tool Builder. </p>
               <p class="para_td">spindle_name: name of the spindle. This is the name of the spindle component defined in the Machine Tool Builder</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_mach_assign_channel_to_spindle 1 COUNTER_SPINDLE</p>
            </td>
         </tr>
      </table><br><a name="SIM_mach_assign_axis_to_channel"></a><div class="title_division">SIM_mach_assign_axis_to_channel</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_mach_assign_axis_to_channel &lt;axis_name&gt; &lt;channel_id&gt;</p>
            </td>
         </tr>
         <tr valign="top">
            <th colspan="1" height="46" rowspan="1">
               <p class="para_th">Description</p>
            </th>
            <td colspan="1" height="46" rowspan="1">
               <p class="para_td">The specified channel controls the specified axis.</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">axis_name: name of the axis, as defined in the axis dialog of the machine Tool Builder</p>
               <p class="para_td">channel_id: ID of the channel. It is defined in the Device Data subdialog of the component classification dialog in the Machine Tool Builder. </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_mach_assign_axis_to_channel X  2</pre></td>
         </tr>
      </table><br><a name="SIM_mach_default_primary_channel"></a><div class="title_division">SIM_mach_default_primary_channel</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_mach_default_primary_channel &lt;channel_id&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">If more than one channel is assigned to the same spindle, you have to specify the default primary. You must call SIM_mach_assign_channel_to_spindle up front.</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">channel_id: ID of the channel. It is defined in the Device Data subdialog of the component classification dialog in the Machine Tool Builder. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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_mach_default_primary_channel 1 </p>
            </td>
         </tr>
      </table><br><div class="title_division">Commands while Simulating</div><a name="SIM_assign_channel_to_spindle"></a><div class="title_division">SIM_assign_channel_to_spindle</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_assign_channel_to_spindle &lt;channel_id &gt; &lt;spindle_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">Tells the specified channel to work at the specified spindle. It is mandatory that you assign all channels that control cutting tools to a spindle. Do not confuse this command with SIM_mach_assign_channel_to_spindle. The SIM_mach... is only for initialization whereas this command alters the channel/spindle assignment during NC program execution.</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">channel_id: ID of the channel. It is defined in the Device Data subdialog of the component classification dialog in the Machine Tool Builder</p>
               <p class="para_td">spindle_name: name of the spindle. This is the name of the spindle component defined in the Machine Tool Builder</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_assign_channel_to_spindle 1 COUNTER_SPINDLE</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_machining_mode"></a><div class="title_division">SIM_set_machining_mode</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_machining_mode &lt;mode&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 machining mode for the current channel. The default is TURN. This is important information for the time calculation.</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">The available modes are:</p>
               <p class="para_td">TURN - all kinds of machining with a spinning workpiece</p>
               <p class="para_td">MILL - 3 axes milling </p>
               <p class="para_td">MILL_CX -milling using C and X axis interpolation</p>
               <p class="para_td">MILL_CZ -milling using C and Z axis interpolation</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_machining_mode MILL</p>
            </td>
         </tr>
      </table><br><a name="SIM_synchronize"></a><div class="title_division">SIM_synchronize</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_synchronize &lt;sync_number&gt; &lt;affected_channel_id&gt; &lt;affected_channel_id&gt; &amp;</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 a synchronization mark for the current channel.</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">sync_number: unique synchronization number.</p>
               <p class="para_td">affected_channel_id: &nbsp;list of channel IDs, including current channel, that also have to reach this sync marker until all can continue execution.</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_synchronize 23 1 2 3</p>
               <p class="para_td">Here, the current channel with id 1 has to wait at sync marker 23 until channels 2 and 3 also reach sync marker 23 &nbsp;</p>
            </td>
         </tr>
      </table><br><a name="SIM_primary_channel"></a><div class="title_division">SIM_primary_channel</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_primary_channel &lt;channel_id&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">Specifies the primary channel. This channel controls spindle speed. See SIM_set_spindle_speed, SIM_set_max_spindle_speed and SIM_set_surface_speed.</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">channel_id: ID of the primary channel </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_primary_channel 1 </p>
            </td>
         </tr>
      </table><br><a name="SIM_set_axis_rapid_velocity"></a><div class="title_division">SIM_set_axis_rapid_velocity</div>
      <table bgcolor="#f4f4f4" cellspacing="2" width="100%" align="center">
         <colgroup span="1">
            <col align="left" span="1" width="59*">
            <col span="1" width="140*">
         </colgroup>
         <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_axis_rapid_velocity&lt;axis_name&gt;&lt;velocity&gt;&lt;unit&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 overwrites the setting of the function SIM_mach_max_axis_rapid_velocity.   SIM_set_axis_rapid_velocity can be called at any time during animation. It is evaluated only for rapid ( non cutting ) motions ( see also function SIM_set_cutting_mode ) </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">axis_name: name of the axis as defined in the MTB application  </p>
               <p class="para_td">velocity: value of the velocity  </p>
               <p class="para_td">unit: can be one of the following:  </p>
               <ul class="unmarkedList">
                  <li>
                     <p class="para_item">INCH_PER_SEC  </p>
                  </li>
                  <li>
                     <p class="para_item"> MM_PER_SEC  </p>
                  </li>
                  <li>
                     <p class="para_item"> REV_PER_SEC      </p>
                  </li>
                  <li>
                     <p class="para_item">INCH_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">FEET_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">M_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">REV_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">DEG_PER_MIN</p>
                  </li>
               </ul>
            </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_axis_rapid_velocity Z3  5 M_PER_MIN</pre></td>
         </tr>
      </table><br><a name="SIM_set_spindle_speed"></a><div class="title_division">SIM_set_spindle_speed</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_spindle_speed &lt;speed&gt; &lt;unit&gt; &lt;duration&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 spindle speed for the current channel. The speed is set to the spindle to which the current channel is assigned ( SIM_assign_channel-to_spindle). This command switches to RPM mode which means that the spindle speed is now constant.</p>
               <p class="para_td">It is only logical to use this command when the machining mode is TURN. The current channel must be the primary.</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">speed: the speed value</p>
               <p class="para_td">unit: REV_PER_MIN</p>
               <p class="para_td">duration: time in seconds to execute the command on the machine (optional)</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_spindle_speed &nbsp;&nbsp;3000 REV_PER_MIN</p>
            </td>
         </tr>
      </table><br><a name="SIM_set_max_spindle_speed"></a><div class="title_division">SIM_set_max_spindle_speed</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_max_spindle_speed &lt;speed&gt; &lt;unit&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 &nbsp;spindle speed upper limit &nbsp;for the current channel. The speed limit is set to the spindle to which the current channel is assigned ( SIM_assign_channel-to_spindle). The current channel must be the primary at this spindle, otherwise an error will occur. Do not confuse this command with SIM_mach_max_spindle_speed. The SIM_mach... is only for initialization whereas this command alters the maximum spindle speed during NC program execution.</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">speed: the speed value</p>
               <p class="para_td">unit: REV_PER_MIN</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_max_spindle_speed &nbsp;&nbsp;4000 REV_PER_MIN </p>
            </td>
         </tr>
      </table><br><a name="SIM_set_surface_speed"></a><div class="title_division">SIM_set_surface_speed</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_surface_speed &lt;surface_speed&gt; &lt;unit&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 surface speed for the current channel. This command switches to SFM mode at the spindle to which the current channel is assigned. &nbsp;This means the surface speed is constant. &nbsp;The current channel must be the primary at its spindle otherwise an error will occur. </p>
               <p class="para_td">In SFM mode, the actual spindle speed depends on the diameter position of the primary tool tip. You should not switch to SFM mode before a tool change (SIM_activate_tool).</p>
               <p class="para_td">If the diameter position of the tool tip gets so small that the spindle speed limit would be exceeded, the system automatically switches to RPM mode.</p>
               <p class="para_td">It is only logical to use this command when the machining mode is TURN</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">surface_speed: the surface speed</p>
               <p class="para_td">unit: the following units are available:</p>
               <ul>
                  <li>
                     <p class="para_item">M_PER_MIN</p>
                  </li>
                  <li>
                     <p class="para_item">MM_PER_SEC</p>
                  </li>
                  <li>
                     <p class="para_item">INCH_PER_SEC</p>
                  </li>
                  <li>
                     <p class="para_item">FEET_PER_MIN</p>
                  </li>
               </ul>
               <p class="para_td"></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_surface_speed &nbsp;50 M_PER_MIN</p>
            </td>
         </tr>
      </table><br><a name="SIM_delay"></a><div class="title_division">SIM_delay</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_delay &lt;time&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 a dwell time for the current channel. This command can be used in all cases where something happens on the machine that takes a specific amount of time (except rapid and cutting motions). This time is then considered in the time calculation</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">time: the dwell time </p>
               <p class="para_td">unit: SEC</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_delay 15 sec </p>
            </td>
         </tr>
      </table><br><a name="SIM_load_workpiece"></a><div class="title_division">SIM_load_workpiece</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_load_workpiece &lt;time&gt; &lt;spindle_comp&gt; &lt;workpiece_comp&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 only works for turning simulation. It makes the current state of the workpiece visible. If it does not yet exist, the kinematics component workpiece_comp is created as child node of the spindle comp.</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">time: currently not evaluated. Specify zero.</p>
               <p class="para_td">spindle_comp: kinematics component of class LATHE_SPINDLE</p>
               <p class="para_td">workpiece_comp:kinematics component of class WORKPIECE</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_load_workpiece 0 MAIN_SPINDLE WORKPIECE_1</p>
            </td>
         </tr>
      </table><br><a name="SIM_unload_workpiece"></a><div class="title_division">SIM_unload_workpiece</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_unload_workpiece &lt;time&gt; &lt;workpiece_comp&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">Removes the workpiece from the screen and from the kinematics model. </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">time: currently not evaluated. Specify zero.</p>
               <p class="para_td">workpiece_comp: workpiece 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_unload_workpiece 0 WORKPIECE_1 </p>
            </td>
         </tr>
      </table><br><div class="title_division">Advanced Commands</div>
      <p class="para_division">The following commands are not necessarily needed and only for special cases and experienced MTD writers.</p><a name="SIM_set_channel"></a><div class="title_division">SIM_set_channel</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_channel &lt;channel_id&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 channel. All subsequent SIM commands refer to this channel. Generally the Machine Tool Driver does not need to make use of this command because the current channel is automatically set before the actual MOM events are triggered. Machine Tool Drivers, however, are sometimes written in a way that they do not call SIM commands directly in the MOM event, but first collect all information of all the MOM events before they actually start post processing and simulation. &nbsp;&nbsp;</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">channel_id: ID of the channel. It is defined in the Device Data subdialog of the component classification dialog in the Machine Tool Builder.</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_xtp_event"></a><div class="title_division">SIM_set_xtp_event</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_xtp_event &nbsp;&lt;xtp_tag&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">The data of a cell in the synchronization editor are stored in &nbsp;XTP events (Extended Toolpath Events). This data consists basically of the mom event and all its corresponding global TCL variables. The tag of the XTP event is passed to the MTD in the variable mom_xtp_event which is set before the MOM event is triggered.</p>
               <p class="para_td">Generally the Machine Tool Driver does not need to make use of this command because the current xtp event is automatically set &nbsp;before the corresponding MOM event is triggered. Machine Tool Drivers, however, sometimes do not call SIM commands directly in the MOM event but first collect all information of all the MOM events before they actually start post processing and simulating. In this case, they need to maintain the relation between the xtp event and the MOM event and call SIM_set_xtp_event before they start to simulate it. This gives the system the chance to write the machining times and G codes to the event so that they show up correctly in the Synchronization editor.</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">xtp_tag: unique identifier for the XTP event. It is passed in the global variable mom_xtp_evnt to the driver.</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_reset_buffer"></a><div class="title_division">SIM_reset_buffer</div>
      <table bgcolor="#f4f4f4" cellspacing="0" 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_reset_buffer</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">Removes all information &nbsp;from the simulation input buffer. Generally the Machine Tool Driver does not need to make use of this command. Machine Tool Drivers, however, sometimes do not call SIM commands directly in the MOM event but first collect all information of all the MOM events before they actually start post processing and simulating. In this case, they need to call SIM_reset_buffer before starting with other simulation 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">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></body>
</html>