Archived
369 lines
19 KiB
HTML
369 lines
19 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>The Other Commands | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="The Other Commands | HiAPI-C# 2025 ">
|
|
|
|
|
|
<link rel="icon" href="../../img/HiAPI.favicon.ico">
|
|
<link rel="stylesheet" href="../../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../../public/main.css">
|
|
<meta name="docfx:navrel" content="../../toc.html">
|
|
<meta name="docfx:tocrel" content="toc.html">
|
|
|
|
<meta name="docfx:rel" content="../../">
|
|
|
|
|
|
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../../index.html">
|
|
<img id="logo" class="svg" src="../../img/HiAPI.logo.png" alt="">
|
|
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="">
|
|
<h1 id="the-other-commands">The Other Commands</h1>
|
|
|
|
<p>Beyond putting a program into a run, a mission can change the session's settings part-way through,
|
|
steer the optimizer, write out what the run produced, and drive the session from a script.</p>
|
|
<h2 id="where-they-are">Where they are</h2>
|
|
<p>The Execution page's <strong>Mission</strong> branch, all from the same <strong>Add Command</strong>. The Program category's
|
|
other two commands are on <a href="playing-a-program.html">Playing a Program</a>, and the Flow category's one
|
|
command is on <a href="building-a-mission.html">Building a Mission</a>.</p>
|
|
<h2 id="settings-one-per-command">Settings, one per command</h2>
|
|
<p>The <strong>Setup</strong> category holds five commands, each carrying one setting:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Command</th>
|
|
<th>What it sets</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Machining Resolution</strong></td>
|
|
<td>the meshing resolution of material removal, in mm</td>
|
|
<td>0.125 mm</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Machining Motion Resolution</strong></td>
|
|
<td>how a motion is sampled into steps</td>
|
|
<td>Feed Per Cycle</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Collision Detection</strong></td>
|
|
<td>whether collisions are detected</td>
|
|
<td>on</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Pause on Failure</strong></td>
|
|
<td>whether the run stops at a failure</td>
|
|
<td>off</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Physics</strong></td>
|
|
<td>whether physics is simulated</td>
|
|
<td>on, where the advanced-physics licence is held</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Each takes effect from its own position in the list onward.</strong> A program above one plays under
|
|
whatever was in force before it; programs below it play under the new value, until something further
|
|
down changes the session again.</p>
|
|
<p>That is the reason these are commands rather than project-wide settings, and it is worth using: put
|
|
a coarse machining resolution above the roughing programs and a fine one above the finishing
|
|
programs, and one run does both at the resolution each deserves.</p>
|
|
<p>Four of the five are a single field or checkbox. <strong>Machining Motion Resolution</strong> has more to say and
|
|
carries its own editor: a type — <em>Feed Per Cycle</em>, <em>Feed Per Tooth</em> or <em>Fixed</em> — and, for Fixed, a
|
|
linear resolution in mm and a rotary one in degrees.</p>
|
|
<div class="NOTE">
|
|
<h5>Note</h5>
|
|
<p><strong>General Config is not on the menu, and it is not missing.</strong> It was one command carrying all five
|
|
of these settings at once, and the five above replace it. A project that still stores one loads as
|
|
those five commands in its place — preceded by a Record Meshed Geometry command where the bundle
|
|
also read a meshed geometry file — and saving from then on writes the five. There is nothing to
|
|
add and nothing to look for.</p>
|
|
</div>
|
|
<h2 id="the-optimizer-as-a-step">The optimizer, as a step</h2>
|
|
<p><strong>NC Optimization Config</strong> is the Optimization category's one command, and it exists so the
|
|
optimizer's settings sit at a point in the run rather than over all of it. Everything played below
|
|
it optimizes under those values, and a second one further down re-points them mid-mission.</p>
|
|
<p>Its own node carries five switches. The fifth, <strong>Omit Leading Zero in Output (.348, not 0.348)</strong>, only formats the numbers written out; the other four steer the optimizer — <strong>Enable Optimization</strong>, <strong>Enable Feedrate Optimization</strong>,
|
|
<strong>Enable Depth Splition</strong> and <strong>Enable Interpolation</strong> — and the values live on five child nodes
|
|
beneath it:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Child node</th>
|
|
<th>What is on it</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Distances</strong></td>
|
|
<td>the extended pre- and post-distances, in mm</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Feedrate</strong></td>
|
|
<td>the feedrate floor and ceiling, the rapid feed, the feed-per-tooth bounds and the assignment ratio</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Motion Dynamics</strong></td>
|
|
<td>maximum acceleration and jerk</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Force & Safety</strong></td>
|
|
<td>the preferred cutting force and the yielding, thermal-yield, spindle-torque and spindle-power safety factors</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Compensation</strong></td>
|
|
<td>the forward, side and depth compensation switches</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>None of the five child nodes carries a checkbox of its own. The command's own checkbox is the only
|
|
one, and like every command's it decides whether the mission runs this command — not whether the
|
|
optimizer is on, which is the first switch on its panel.</p>
|
|
<p>The command takes no title: its row always reads <strong>NC Optimization Config</strong>. What each quantity
|
|
means, and why an optimized result can look wrong, is
|
|
<a href="../../technique/nc-optimization/index.html">NC Optimization</a>.</p>
|
|
<p>The demo mission's optimizer command, at <code>/execution?tree=execution/mission/7</code>. In this mission it
|
|
sits below both program groups rather than above them, so the ordering rule at the top of this
|
|
section is what decides how much of the run it reaches. The five switches are on the command's own
|
|
panel; the five value nodes are indented under it in the tree.</p>
|
|
<p><img src="the-other-commands-img/nc-optimization-config.en.png" alt="The NC Optimization Config command selected in the Mission branch, with Distances, Feedrate, Motion Dynamics, Force and Safety and Compensation child nodes listed beneath it, and the panel below showing the Enable Optimization, Enable Feedrate Optimization, Enable Depth Splition and Enable Interpolation checkboxes ticked above an unticked Omit Leading Zero in Output checkbox"></p>
|
|
<h2 id="writing-out-what-the-run-produced">Writing out what the run produced</h2>
|
|
<p>The <strong>Output</strong> category holds three commands: <strong>Post-Execution</strong>, <strong>Record Meshed Geometry</strong> and
|
|
<strong>Export Meshed Geometry (STL)</strong>.</p>
|
|
<p><strong>Post-Execution's name says what it consumes, not where it goes.</strong> It is an ordinary entry in the
|
|
list, not an end-of-run hook, and everything it writes is derived from what the session has played
|
|
<em>above</em> it. Put it after two programs and it covers both; put a second one halfway down the list and
|
|
it writes an interim snapshot of the same accumulating run. <strong>Its placement is the whole question.</strong></p>
|
|
<p>Five outputs hang off it, each a child node whose own checkbox switches that output on:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Output</th>
|
|
<th>What it writes</th>
|
|
<th>Default template</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Step Files Output</strong></td>
|
|
<td>the step-series data of what has played</td>
|
|
<td><code>Output/[NcName].step.csv</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Shot Files Output</strong></td>
|
|
<td>time-sampled series at a period you set</td>
|
|
<td><code>Output/[NcName].shot.csv</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Optimization Output</strong></td>
|
|
<td>the optimized programs</td>
|
|
<td><code>Output/Opt-[NcName]</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>CL → NC Writeback</strong></td>
|
|
<td>brand NC re-synthesized from what was played</td>
|
|
<td><code>Output/[NcName].nc</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Geometry Difference Detection</strong></td>
|
|
<td>a comparison of the workpiece geometry at a radius you set</td>
|
|
<td>—</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><code>[NcName]</code> in a template is replaced by the source program's name.</p>
|
|
<p>Three things to know before switching them on:</p>
|
|
<ol>
|
|
<li><strong>Two of the five are visible only while Show Physics Options is on</strong> in the Preference menu —
|
|
Shot Files Output and Optimization Output. See <a href="../basics/preferences.html">Preferences</a>.</li>
|
|
<li><strong>The shot file's time resolution is a sampling period, not the machining resolution</strong>, and it
|
|
sets the accuracy ceiling of that data. A fine period makes a large file: a six-cut program
|
|
writes about 13 MB at the default 1 ms and about 128 MB at 0.1 ms.</li>
|
|
<li><strong>The CL → NC writeback needs the CL played on an XYZABC chain</strong>, so the Program File command
|
|
that plays it goes above this command. It re-serializes every control file the session played,
|
|
so an NC play is written back too, and the converted files appear on the <strong>Program</strong> branch as
|
|
their own nodes — see <a href="the-program-branch.html">The Program Branch</a>.</li>
|
|
</ol>
|
|
<p>Every field stays editable whether or not its checkbox is ticked: the checkbox decides what runs,
|
|
not what can be prepared. The outputs are written in an order of the command's own — shot files,
|
|
step files, optimization, the writeback, then the geometry difference — which is not the order the
|
|
tree lists them in, and which matters only if you are reading their timestamps.</p>
|
|
<p>The demo mission's Post-Execution command with <strong>Step Files Output</strong> selected, at
|
|
<code>/execution?tree=execution/mission/8/step-files</code>. Each output is a child node with its own
|
|
checkbox — that tick is what switches the output on — and the template field for the selected one
|
|
sits in the panel below.</p>
|
|
<p><img src="the-other-commands-img/post-execution.en.png" alt="The Post-Execution command in the Mission branch with its five child nodes, each carrying its own checkbox, and the Step File Template field in the panel below"></p>
|
|
<h2 id="keeping-the-workpiece-between-runs">Keeping the workpiece between runs</h2>
|
|
<p>The Output category's other two commands both take the workpiece as it stands at their own point in
|
|
the list. <strong>Record Meshed Geometry</strong> stores it in the application's mesh format so a later run can
|
|
pick it back up; <strong>Export Meshed Geometry (STL)</strong> writes an STL for something outside the
|
|
application to read.</p>
|
|
<p>Record Meshed Geometry carries a path — <code>Cache/Workpiece.wct</code> by default, because a recorded mesh is
|
|
a rebuildable by-product of a run rather than a project asset — and one of four actions:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Action</th>
|
|
<th>What it does</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>No Action</strong></td>
|
|
<td>nothing; the entry is a placeholder</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Read</strong></td>
|
|
<td>always loads the file into the session</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Write</strong></td>
|
|
<td>always writes the session's geometry to the file</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Read On First Or Write</strong></td>
|
|
<td>reads the file if it exists <strong>and nothing has played yet this session</strong>; otherwise writes</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The condition on the fourth is what makes the command usable more than once in one mission: the
|
|
first such entry reads, and every one below a program writes. Building a mission around that is
|
|
<a href="a-mission-that-resumes.html">A Mission That Resumes</a>.</p>
|
|
<p><strong>Writing builds the mesh, at the resolution in force where the command sits</strong> — so a Machining
|
|
Resolution command belongs above it. A missing file is not an error: writing it is what a run does.
|
|
<strong>Reset</strong> on the command's panel deletes the file it points at, so the next run records afresh.</p>
|
|
<p>Export Meshed Geometry (STL) takes a path — <code>Output/MeshedGeom.stl</code> by default, since an export is
|
|
something you asked for rather than a cache — and a resolution in millimetres; leave it at 0 for the
|
|
default. It also builds the mesh, so the same placement rule applies.</p>
|
|
<h2 id="driving-the-session-from-a-script">Driving the session from a script</h2>
|
|
<p><strong>Script</strong> is the Program category's third command: C# evaluated against the running session, for
|
|
anything the other command kinds do not cover. Where the script returns a sequence of actions, that
|
|
sequence is played as part of the run.</p>
|
|
<p>The editor completes against the very API the run will compile the script with, so what it offers is
|
|
what the run accepts, and a member's signature and summary show beside the suggestion. Picking a
|
|
method inserts the call with each argument as a stop, so <kbd>Tab</kbd> walks the parameters.</p>
|
|
<p><strong>There is no Save button.</strong> Typing saves shortly after you stop, and the pill beside the title
|
|
reports where the text is: <em>Idle</em>, <em>Dirty</em>, <em>Staging…</em>, <em>Staged</em>, or <em>Error</em> with the reason in its
|
|
tooltip. <strong>Staged means the service is holding the script, not that the project has been saved</strong> —
|
|
save the project to keep it.</p>
|
|
<p>Two prompts guard the edges, and neither is a yes/no question, so each has three buttons:</p>
|
|
<ul>
|
|
<li><strong>Unsaved Changes</strong>, when you select another node while a save is still pending — <em>Save & switch</em>
|
|
flushes it first, <em>Discard</em> drops it, <em>Cancel</em> leaves the selection where it is.</li>
|
|
<li><strong>Script changed elsewhere</strong>, when the command changed underneath you — another tab, or a project
|
|
reload.</li>
|
|
</ul>
|
|
<p>Like NC Code, the title is optional and is what the row brackets.</p>
|
|
<h2 id="the-list-is-not-closed">The list is not closed</h2>
|
|
<p>What <strong>Add Command</strong> offers is whatever the application knows about, not a menu built into the
|
|
interface. A kind with no editor of its own is served by a generic one built from the settings that
|
|
kind declares — which is how <strong>Machining Resolution</strong>, <strong>Collision Detection</strong>, <strong>Pause on Failure</strong>
|
|
and <strong>Physics</strong> are edited. So a command kind can be addable, and fully editable, before this manual
|
|
has a page for it.</p>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a href="index.html">Running a Simulation</a> — the rest of running a job</li>
|
|
<li><a href="building-a-mission.html">Building a Mission</a> — the list these commands go into</li>
|
|
<li><a href="a-mission-that-resumes.html">A Mission That Resumes</a> — the layout these commands fall into, and what it buys</li>
|
|
<li><a href="playing-a-program.html">Playing a Program</a> — the two commands that put NC code into a run</li>
|
|
<li><a class="xref" href="../../anatomy/execution/mission/PreSettingCommand-panel.html">PreSettingCommand Panel</a> — the component behind General Config, and what a stored bundle expands into</li>
|
|
<li><a class="xref" href="../../anatomy/execution/mission/NcOptOption-panel.html">NC Optimization Option Panel</a> — the component behind NC Optimization Config, field by field</li>
|
|
<li><a class="xref" href="../../anatomy/execution/mission/PostExecutionCommand-panel.html">PostExecutionCommand Panel</a> — the component behind Post-Execution: its five sections and what each writes</li>
|
|
<li><a class="xref" href="../../anatomy/execution/mission/script-command-panel.html">Script Command Panel</a> — the component behind Script: its editor, its completion and its save states</li>
|
|
</ul>
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|