This repository has been archived on 2026-10-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/manual/run/the-program-branch.html
T
2026-09-11 03:46:11 +08:00

193 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The Program Branch | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="The Program Branch | 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 &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<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-program-branch">The Program Branch</h1>
<p>What the run actually read, line by line, as opposed to what the mission asked for.</p>
<p>The Execution page's Control Tree carries two branches: <strong>Mission</strong> above, <strong>Program</strong> below, at
Control-Tree path <code>execution/program</code>. Program is read-only — every node on it is either a file the
mission points at or a pass a run made over one — and the transport bar stays pinned above its
panels, so a run can be started, stepped and reset without leaving the branch.</p>
<h2 id="before-anything-runs">Before anything runs</h2>
<p>The branch is not empty before a run. The service seeds it from the mission: one node per distinct
NC file a <strong>Program File</strong> command names, and one per <strong>NC Code</strong> command, taken in the order the
mission lists them and reaching into nested groups. Those nodes are placeholders — a file the run
has not opened yet — and the branch panel says so, badging itself <em>not run yet</em> beside the file
count.</p>
<p>Three things decide what is seeded, and each of them is visible in the screenshot below:</p>
<ul>
<li><strong>A disabled command seeds nothing.</strong> The mission's greyed <em>Program File</em> entry names an NC file
that never reaches the branch, and nothing beneath a disabled group reaches it either.</li>
<li><strong>Two commands naming one file seed one node.</strong> Paths are compared with case and slash direction
ignored, so a file played twice appears once.</li>
<li><strong>An NC Code command is seeded under its own title</strong>, not under a file name, because it has no
file — its text lives in the mission. The branch marks it <code>(inline)</code>.</li>
</ul>
<p><img src="the-program-branch-img/program-before-run.en.png" alt="The Execution page before a run: the Control Tree shows the Mission branch with nine commands — two of them greyed out and unticked — over the Program branch, whose five nodes are circle.ptp, drill_slot.ptp, side.ptp, slide.ptp and (inline) Inline finishing pass. The branch panel below the transport bar is badged not run yet beside 5 files, and the four Session Messages tabs are empty"></p>
<p><em>The Program branch at <code>/execution?tree=execution/program</code>, on a project that has not been played.
The disabled <code>Program File</code> entry in Mission has no node under Program; the enabled <code>NC Code</code>
command has one, under its title.</em></p>
<h2 id="after-a-run">After a run</h2>
<p>Playing the mission fills the same nodes in and adds any file the run reached that the mission did
not name — a subprogram call nests its callee under the caller. The panel's badge changes from
<em>not run yet</em> to <em>run data</em>, and a file the run made more than one pass over takes a <code>×</code> and a
count in its tree label.</p>
<p><img src="the-program-branch-img/program-after-run.en.png" alt="The same page after the run has finished: the Execution root badge reads finished, the first Program node now reads circle.ptp ×2, the branch panel is badged run data beside 5 files, and the Session Messages tabs carry counts — Shell 11 and NC Diagnostics 7, with Step Diagnostics and NC Manipulation still unbadged"></p>
<p><em>The same deep link once the run has finished. <code>circle.ptp ×2</code> is one node holding two passes,
because two Program File commands named the same file.</em></p>
<div class="IMPORTANT">
<h5>Important</h5>
<p>The branch is rebuilt when the run <strong>changes state</strong> — starting, finishing, being reset — and not
while it is playing. During a long run the nodes on screen are the ones the last transition left
there, so a file the run has since opened may not be listed yet. Pausing brings it up to date.</p>
</div>
<h2 id="reading-one-file">Reading one file</h2>
<p>Selecting a node opens the file as the run saw it: the path it was read from, a selector for the
passes made over it, and the text with what each line produced beside it.</p>
<p><img src="the-program-branch-img/program-file-passes.en.png" alt="The Program branch with circle.ptp ×2 selected: the breadcrumb reads Execution / Program / circle.ptp ×2, the path caption NC/circle.ptp, a pass selector reading Pass (2) and #2 · re-entry beside a Follow toggle, then twenty-one numbered lines of NC with a step range printed to the right of thirteen of them, and a footer reading 21 lines · 21 executed lines"></p>
<p><em>One file node at <code>/execution?tree=execution/program/0</code>, with the canvas column switched off so the
line viewer has the width. The pass selector names the pass and why it was entered.</em></p>
<ul>
<li><strong>The pass selector</strong> carries one entry per pass, labelled with how that pass was entered — the
first arrival at the top of the file, a re-entry when the mission came back to it, or the call
that reached it from another file.</li>
<li><strong>The step range</strong> beside a line is what that line produced. A line with no range beside it ran
and produced no motion: <code>G</code> and <code>M</code> words that set state, and the tape marks, all execute without
cutting anything.</li>
<li><strong>A line missing from the marks altogether did not run in that pass.</strong> That is the difference the
branch exists to show, and it is per pass — the same line can be greyed in one pass and marked in
the next.</li>
<li><strong>Follow</strong> keeps the viewer on the line the run is executing; with it off the view stays where it
was put.</li>
</ul>
<h2 id="what-the-branch-does-not-hold">What the branch does not hold</h2>
<ul>
<li><strong>The writeback files are not inside the file nodes.</strong> Converting a played program back to NC
makes its own node at the top of the branch, beside the file nodes rather than under them, and
clicking a line on either side jumps to its twin on the other. That conversion is the CL-to-NC
writeback, so a mission that plays brand NC produces none, and the branch shows only source files.</li>
<li><strong>Node addresses are positions, not files.</strong> A node is <code>execution/program</code> followed by its index,
so a deep link into the branch survives only as long as the branch has the same shape. Link to the
branch, not into it.</li>
<li><strong>A skipped line is not only recorded here.</strong> A line suppressed by block skip is also announced in
the <strong>NC Diagnostics</strong> list while the run is playing — see
<a href="when-something-goes-wrong.html">When Something Goes Wrong</a>.</li>
</ul>
<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="playing-a-program.html">Playing a Program</a> — the two commands that put the sources here</li>
<li><a href="when-something-goes-wrong.html">When Something Goes Wrong</a> — reading this branch as part of a diagnosis</li>
<li><a href="inspecting-a-step.html">Inspecting a Step</a> — the Sentence Syntax panel that a line click on one of these file panels steers</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>