Archived
264 lines
15 KiB
HTML
264 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Program Zero Alignment | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Program Zero Alignment | 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="program-zero-alignment">Program Zero Alignment</h1>
|
|
|
|
<p>Program zero is the point an NC program treats as <code>X0 Y0 Z0</code>. The machine finds it by adding a work
|
|
offset — G54, G55 and the rest — to machine zero, so a simulation only cuts where the real machine
|
|
cuts if the program zero on the model and the work offset in the controller agree. Making them agree
|
|
is this task, and it runs in one of two directions depending on why the simulation is being built.</p>
|
|
<h2 id="which-direction-to-align">Which direction to align</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>You are</th>
|
|
<th>Align</th>
|
|
<th>Because</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Planning a job</strong> from an NC file, before the part is set up on the machine</td>
|
|
<td>the <strong>work offset</strong> onto program zero</td>
|
|
<td>The workpiece and fixture can sit wherever is convenient; the offset has probably not been measured yet, and the model does not have to match a real table</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Reproducing a cut</strong> from a controller log, a machine-coordinate feed, or a job already running</td>
|
|
<td><strong>program zero</strong> onto the work offset</td>
|
|
<td>The recorded data is in absolute machine coordinates, so the part has to sit where it really sits, or collisions, overcut and engagement will not match what happened</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Both directions need the workpiece already placed on the fixture and the fixture on the table —
|
|
that is <a href="anchor.html">Anchor</a>, and it comes first.</p>
|
|
<h2 id="where-program-zero-sits-on-the-workpiece">Where program zero sits on the workpiece</h2>
|
|
<p><strong>Geom To Program Zero</strong> (<code>/general-setup?tree=equipment/workpiece/anchor/geom-to-program-zero</code>)
|
|
holds the offset from the workpiece geometry to program zero. Set it to whatever point the NC
|
|
program was written around: for most milling programs that is a corner or the centre of the stock's
|
|
top face. Nothing else on this page makes sense until that point is where the programmer put it.</p>
|
|
<h2 id="planning-write-the-offset-from-where-the-workpiece-is">Planning: write the offset from where the workpiece is</h2>
|
|
<p>The Controller branch's <strong>Work Coordinates</strong> leaf
|
|
(<code>/general-setup?tree=equipment/controller/program-data/work-coordinates</code>) holds the table the run
|
|
resolves G54 against, one row per coordinate id.</p>
|
|
<ol>
|
|
<li>Place the workpiece and fixture wherever the scene is convenient to work in.</li>
|
|
<li>Select the Work Coordinates leaf and find the row the program uses — <code>G54</code> for most programs.</li>
|
|
<li>Press <strong>P0</strong> in that row. It writes the machine coordinate the workpiece's program-zero anchor is
|
|
currently sitting at into the row, which is exactly the number the machine's operator would key
|
|
in after touching off. <strong>M0</strong> beside it writes machine zero instead, which is how a row is
|
|
returned to no offset at all.</li>
|
|
</ol>
|
|
<p>The leaf on a demo project, at
|
|
<code>/general-setup?tree=equipment/controller/program-data/work-coordinates</code>. The grey line above the
|
|
table names where this brand keeps the offsets — on Fanuc, its own parameter table — and the rows
|
|
below it are the coordinate ids that brand holds, with only <code>G54</code> carrying a value here. The panel
|
|
is narrow, so the row actions sit off the right edge.</p>
|
|
<p><img src="program-zero-alignment-img/work-coordinates.en.png" alt="The Work Coordinates leaf of the Control Tree selected on the General Setup page, its panel showing a caption reading that the offsets are stored in the Fanuc parameter table and a table of G54 through G57 rows with X, Y and Z fields, G54 holding values and the rest zero"></p>
|
|
<p><strong>P0 has something to write only once the scene is assembled.</strong> It works out where the program-zero
|
|
anchor is by walking the machine chain to it, so a project with no machine tool attached, or a
|
|
workpiece that has not been placed, gives it nothing to compute and it reports that it could not get
|
|
the machine position at program zero rather than writing a wrong number.</p>
|
|
<p>The row's values can also be typed in directly when the offset is already known from the machine.
|
|
Clicking anywhere in a row marks that coordinate on the canvas, so the offset can be seen rather
|
|
than only read.</p>
|
|
<h2 id="reproducing-a-real-cut-place-the-workpiece-on-the-offset">Reproducing a real cut: place the workpiece on the offset</h2>
|
|
<p>Going the other way — leaving the offset alone and moving the part to meet it — is not offered on
|
|
the runner path. The Legacy-Controller screen that used to carry a one-press control for it
|
|
(Align P0) was removed on 2026-09-11, and the Work Coordinates leaf's two row actions both write
|
|
the row — <strong>P0</strong> from where program zero sits, <strong>M0</strong> to machine zero — and neither moves the part.
|
|
So in the reproducing direction the part is placed by hand, and the row checks the placement rather
|
|
than making it:</p>
|
|
<ol>
|
|
<li>Type the recorded offset into the row the program uses — the values can be entered directly, as
|
|
above — and click the row so the canvas marks that coordinate.</li>
|
|
<li>Move the part to meet the mark by changing where the fixture sits on the machine table: the
|
|
fixture's <strong>Geom To Table</strong> transform, in <a href="anchor.html">Anchor</a>. The workpiece rides on the
|
|
fixture, so its program-zero anchor moves with it.</li>
|
|
<li>Once the program-zero anchor sits on the mark, the part sits where it really sat. Pressing <strong>P0</strong>
|
|
afterwards rewrites the row from the scene, so use it only as a check: the numbers it writes should
|
|
be the ones you typed, and any difference is how far the placement is off. If they differ, fix the
|
|
placement and type the recorded offset back in — the run resolves against whatever the row holds,
|
|
and P0 has just overwritten it.</li>
|
|
</ol>
|
|
<h2 id="checking-that-it-worked">Checking that it worked</h2>
|
|
<p>A wrong alignment — a wrong offset, or a workpiece at the wrong height — shows up as <strong>overcut</strong>,
|
|
<strong>collision</strong> or <strong>nocut</strong>, and it shows up early: usually within the first hundred or so NC lines.
|
|
Check it cheaply before committing to a full run.</p>
|
|
<ol>
|
|
<li>Set a coarse <strong>Initial Resolution</strong> on the workpiece's <strong>Mesh</strong> item — around an eighth of the
|
|
cutter diameter is enough to see gross errors, and it runs quickly. That is
|
|
<a href="workpiece.html">Workpiece</a>.</li>
|
|
<li>Run, and watch the opening Z plunge. This is where a wrong offset shows first.</li>
|
|
</ol>
|
|
<div class="TIP">
|
|
<h5>Tip</h5>
|
|
<p>If the tool plunges far deeper than the programmed depth and the holder gouges the stock, the work
|
|
offset's Z is almost certainly wrong — the workpiece is modelled higher or lower than it really
|
|
sits.</p>
|
|
</div>
|
|
<p>One false positive is worth knowing: a roughing cut with a spiral entrance into tough material can
|
|
legitimately exceed the modelled cutting conditions while the setup is perfectly correct. It is
|
|
uncommon, and early overcut, collision or nocut usually does mean the alignment is wrong.</p>
|
|
<h2 id="when-the-planned-offset-is-not-the-real-one">When the planned offset is not the real one</h2>
|
|
<p>In the reproducing direction, the offset aligned to must be <strong>the offset the machine was actually
|
|
using</strong>, not the one the job was planned with. Operators re-zero between setups — after a manual
|
|
tool change, after re-cutting stock — so a planned G54 and the real one can differ by an amount that
|
|
cannot be assumed in advance.</p>
|
|
<p>When the data comes from a controller log, derive the offset from the log's own machine coordinates
|
|
rather than trusting the plan: an invariant that survives an operator's edits — a known cutting
|
|
depth, the span of a feature — mapped onto the recorded coordinates recovers the real offset on
|
|
those axes. Axes the operator may have shifted with nothing to key on are not recoverable this way.
|
|
A wrong Z is the one that bites hardest, because it places the workpiece away from its true height
|
|
and the tool over- or under-plunges from the first block.</p>
|
|
<h2 id="a-placement-convention-that-makes-this-easier">A placement convention that makes this easier</h2>
|
|
<p>The three transforms that hold the assembly together can be put anywhere, but a block-on-plate setup
|
|
is easiest to reason about when each sits at the middle of the face it meets:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Transform</th>
|
|
<th>A good default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Fixture's <strong>Geom To Workpiece</strong></td>
|
|
<td>The top centre of the fixture geometry</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Workpiece's <strong>Geom To Fixture</strong></td>
|
|
<td>The bottom centre of the workpiece geometry</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Workpiece's <strong>Geom To Program Zero</strong></td>
|
|
<td>The top centre of the workpiece geometry, or whichever top point the program was written around</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Nothing above depends on this convention — <strong>P0</strong> walks the assembly as it stands, whatever the
|
|
transforms hold — but a scene built this way is far easier to check by eye, and far easier to place
|
|
by hand in the reproducing direction.</p>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a href="anchor.html">Anchor</a> — placing the workpiece, fixture and tool relative to the machine, which comes before this</li>
|
|
<li><a class="xref" href="../../technique/mechanism/assembly-anchors.html">Assembly Anchors</a> — the named buckle anchors this alignment resolves against</li>
|
|
<li><a href="workpiece.html">Workpiece</a> — the branch carrying the Geom To Program Zero transform this task sets, and the Mesh resolution the check above uses</li>
|
|
<li><a href="fixture.html">Fixture</a> — the Geom To Table transform that moves the part onto a recorded offset in the reproducing direction</li>
|
|
<li><a href="controller.html">Controller</a> — the branch whose work-offset table a run resolves against</li>
|
|
<li><a href="../../technique/nc-dialects/index.html">NC Dialects</a> — how each brand's code names the work offset this alignment is expressed against</li>
|
|
<li><a class="xref" href="../../workflows/project-data-checklist.html">Project Data Checklist</a> — the collection step this alignment closes</li>
|
|
<li><a class="xref" href="../../workflows/basic-simulation.html">Workflow: Basic Machining Simulation</a> — driving a simulation from an NC file or a controller log</li>
|
|
<li><a class="xref" href="../../workflows/force-training.html">Workflow: Milling Force Parameter Training</a> — milling force training, which depends on a correct setup</li>
|
|
<li><a href="index.html">Setup</a> — the rest of the pre-simulation configuration</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>
|