2025-12-05 16:33:37 +08:00

160 lines
8.2 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>訓練與校正銑削係數 | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="訓練與校正銑削係數 | 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="Cmd-MillingTraining">
<h1 id="訓練與校正銑削係數">訓練與校正銑削係數</h1>
<p>銑削係數為計算銑削力的必須參數。</p>
<p>訓練與校正銑削係數需先完成<a href="../Mapping/index.html">資料映射</a></p>
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_TrainMillingPara_">TrainMillingPara</a><small>(API)</small>訓練銑削係數,不需先設定工件銑削係數,輸出的新係數也與原工件銑削係數無關。</p>
<p><a class="xref" href="../../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ReTrainMillingPara_">ReTrainMillingPara</a><small>(API)</small>校正銑削係數需基於已設定之工件銑削係數才可輸出校正後係數。校正時原係數的權重10%、從資訊映射而得的樣本權重90%。</p>
<div class="NOTE">
<h5>Note</h5>
<p><strong>指令格式</strong></p>
<pre><code>//訓練銑削係數
TrainMillingPara(&lt;樣本旗標&gt;, &lt;檔案輸出路徑&gt;);
//校正銑削係數
ReTrainMillingPara(&lt;樣本旗標&gt;, &lt;檔案輸出路徑&gt;);
</code></pre>
</div>
<p>&lt;樣本旗標&gt; 為應用於訓練資料的資料種類,包含:<code>Fx</code><code>Fy</code><code>Fz</code><code>Mx</code><code>My</code><code>Mz</code>
使用<code>|</code>號作聯集。</p>
<div class="TIP">
<h5>Tip</h5>
<p><strong>以動力計資料為例,輸出訓練銑削係數</strong></p>
<pre><code>ClearTimeMappingData();
AddTimeDataByFile( &quot;lineA&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:25:51.7100&quot;, &quot;18:26:12.9910&quot;);
AddTimeDataByFile( &quot;lineB&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:26:30.5750&quot;, &quot;18:27:12.2880&quot;);
PlayNcFile(&quot;NC/file1.nc&quot;)
TrainMillingPara(Fx|Fy|Fz, &quot;StainlessSteel.mp&quot;);
</code></pre>
</div>
<div class="TIP">
<h5>Tip</h5>
<p><strong>以智慧刀把資料為例,輸出校正銑削係數</strong></p>
<pre><code>ClearTimeMappingData();
AddTimeDataByFile( &quot;lineA&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:25:51.7100&quot;, &quot;18:26:12.9910&quot;);
AddTimeDataByFile( &quot;lineB&quot;, &quot;Mapping/sensor1.csv&quot;, &quot;18:26:30.5750&quot;, &quot;18:27:12.2880&quot;);
PlayNcFile(&quot;NC/file1.nc&quot;)
ReTrainMillingPara(Fz|Mx|My|Mz, &quot;StainlessSteel.mp&quot;);
</code></pre>
</div>
<h2 id="訓練條件">訓練條件</h2>
<p>路徑樣本<u>以穩定資料訓練佳</u>,即資料波形有重複性維持至少兩轉。因系統演算法最低以一轉波形做訓練。
在非穩定情況,會因為模擬中的每刃進給固定、訓練資料不穩定,造成剪切力於總力占比降低,使得訓練出的犁切係數偏高。</p>
<p>樣本穩定的情況下NC路徑沒有限制切削形狀槽銑或側銑任意形狀刀具皆可用來訓練及校正銑削係數。</p>
<p><code>TrainMillingPara</code>訓練銑削係數,資訊映射須包含至少一組不同每刃進給的路徑樣本。訓練資料的資料種類建議最少為(動力計)<code>Fx|Fy|Fz</code>或(智慧刀把)<code>Fz|Mx|My|Mz</code>
如果資料種類少於前述,如<code>Fx|Fy</code><code>Mx|My|Mz</code>,則樣本的自由度太高,訓練出來的係數不能符合訓練樣本以外的路徑。</p>
<p>如果僅使用<code>Mx|My|Mz</code>,由於力矩資料為 <span class="math">\(\vec{r} \times \vec{F}\)</span>所以r方向資料會遺失相當於少了一個自由度難以訓練材料系數。
所以力矩資料須搭配<code>Fz</code>使用。</p>
<p><code>ReTrainMillingPara</code>校正銑削係數,沒有限制資料種類及每刃進給。</p>
</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>