Archived
182 lines
9.5 KiB
HTML
182 lines
9.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Machine Chain Code | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Machine Chain Code | 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="Technique-ChainCode">
|
|
<h1 id="machine-chain-code">Machine Chain Code</h1>
|
|
|
|
<p>A machine tool file can carry its kinematic topology as a <strong>chain code</strong> — a short bracket notation
|
|
for the same connectivity the mechanism builder produces, meant for hand-editing the XML. It is read
|
|
and written by <a class="xref" href="../../api/Hi.Numerical.Xyzabc.CodeXyzabcChain.html">CodeXyzabcChain</a><small>(API)</small>, which builds the very
|
|
same mechanism, so a hand-written code and a builder-drawn structure are interchangeable — with two
|
|
exceptions on the way back: a mechanism with two components sharing one name, or with an unnamed
|
|
component that more than one segment would have to mention, cannot be written down as code.</p>
|
|
<p>The code carries <strong>connectivity only</strong>. Pivots, exact axis vectors, end-anchor offsets and shapes
|
|
are properties of the mechanism, and editing the code preserves them for every component whose name
|
|
is unchanged.</p>
|
|
<h2 id="the-notation">The Notation</h2>
|
|
<p>Each segment declares branches from left to right:</p>
|
|
<pre><code>[O][base][Z][C][w];[O][base][Y][X][B][S][t]
|
|
</code></pre>
|
|
<ul>
|
|
<li><p><code>[A][B][C]</code> is shorthand for the branches <code>[A][B];[B][C]</code>, so a segment is just a path.</p>
|
|
</li>
|
|
<li><p>Words are components. The <strong>same word in different segments is the same component</strong>, which is how
|
|
segments join into one structure.</p>
|
|
</li>
|
|
<li><p>The first word of the whole code names the ground anchor. Within a segment each branch runs from
|
|
the word on its left to the word on its right.</p>
|
|
</li>
|
|
<li><p>Reserved words are the topology keywords: <code>X</code>, <code>Y</code>, <code>Z</code>, <code>A</code>, <code>B</code>, <code>C</code> become motion axes, and <code>w</code>
|
|
and <code>t</code> become the end anchors. <strong>Any other word is a plain component</strong> carried along without
|
|
motion, such as <code>base</code> or <code>S</code> above. A code must name exactly one <code>[w]</code> and one <code>[t]</code>; the six
|
|
axes are optional, and each may be used at most once. Words merge by exact name, so no two
|
|
components can claim one role; what the check refuses is a code naming no table buckle at all —
|
|
<em>the chain code must contain the table buckle [w].</em> A code carrying only <code>[W]</code> is refused by
|
|
that same check, and the message names the near miss: <em>The code carries [W], which differs only
|
|
in letter case; the keyword is matched exactly, so rename it to [w].</em></p>
|
|
</li>
|
|
<li><p><strong>Spell the keywords exactly</strong> — upper case for the axes, lower case for <code>t</code> and <code>w</code>. The code
|
|
itself and everything downstream of it compare them as written: role resolution, axis discovery,
|
|
the default collision pairs, and the end-anchor check a machine file is loaded through. So a
|
|
mis-cased axis is a plain component contributing no motion, and a mis-cased end anchor stops the
|
|
code building, with a message naming the near miss.</p>
|
|
</li>
|
|
<li><p><code>[]</code> is an anonymous component. Each occurrence is a separate one, it cannot be referred to from
|
|
another segment, and it cannot hold a geometric shape — shapes are stored by component name.</p>
|
|
</li>
|
|
<li><p>Declaring the same branch twice is harmless; it states the same connection.</p>
|
|
</li>
|
|
<li><p>A segment with a single word just declares a component, which is how a ground anchor that only
|
|
receives branches gets named.</p>
|
|
</li>
|
|
<li><p>Any number of segments is allowed, so auxiliary structures can branch off any component:</p>
|
|
<pre><code>[O][base][Z][C][w];[O][base][Y][X][B][S][t];[base][loader][gripper]
|
|
</code></pre>
|
|
</li>
|
|
</ul>
|
|
<h2 id="direction-and-convergence">Direction and Convergence</h2>
|
|
<p><strong>Branch direction is free.</strong> A branch authored towards the ground anchor is simply written that way,
|
|
as in <code>[Z][O]</code>. A branch belongs to the component farther from the ground anchor, so <code>[O][Y]</code> and
|
|
<code>[Y][O]</code> both make <code>Y</code> the axis; only the direction differs. Pointing every branch away from the
|
|
ground anchor remains a readability convention — it makes the structure read outwards, ground → base
|
|
→ motion axes → the <code>t</code> and <code>w</code> end anchors — but the motion, the axis keywords and the default
|
|
collision pairs all read a branch the same way round regardless.</p>
|
|
<p><strong>Limbs may meet again.</strong> <code>[A][B][D];[A][C][D]</code> gives <code>D</code> two incoming branches. Only one route
|
|
through such a loop drives the motion, so use it for structure rather than for a second motion path.</p>
|
|
<p>Axis directions follow the machine-building convention: axes between the ground anchor and <code>w</code> are
|
|
seeded negative, the others positive.</p>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a href="topology.html">Kinematic Topology</a> — the anchors, branches and assemblies this notation encodes</li>
|
|
<li><a href="../../manual/setup/machine-tool.html">Machine Tool</a> — building the same structure in the mechanism builder, and the keywords both forms share</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>
|