tune
@@ -0,0 +1,182 @@
|
||||
<!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 "{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="Cmd-ActOperations">
|
||||
<h1 id="動作操作">動作操作</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個方法來執行特定的加工動作。</p>
|
||||
<h2 id="playact">PlayAct</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayAct_">PlayAct</a><small>(API)</small> 執行一個動作物件,並在執行過程中控制步調。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">PlayAct(<動作物件>, <來源指令>, <取消令牌>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 執行自訂動作
|
||||
var act = new CustomAct();
|
||||
PlayAct(act);
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="playtoolingteleport">PlayToolingTeleport</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayToolingTeleport_">PlayToolingTeleport</a><small>(API)</small> 執行刀具傳送操作,將指定刀具傳送到新位置。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">PlayToolingTeleport(<刀具ID>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 傳送刀具1
|
||||
PlayToolingTeleport(1);
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="playclteleport">PlayClTeleport</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayClTeleport_">PlayClTeleport</a><small>(API)</small> 執行刀具位置(CL)傳送操作,將刀具傳送到指定的位置和方向。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">PlayClTeleport(<X>, <Y>, <Z>, <I>, <J>, <K>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 傳送刀具到指定位置和方向
|
||||
PlayClTeleport(10.0, 20.0, 30.0, 0.0, 0.0, 1.0);
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="參數說明">參數說明</h2>
|
||||
<h3 id="playtoolingteleport-1">PlayToolingTeleport</h3>
|
||||
<ul>
|
||||
<li><code><刀具ID></code>: 要傳送的刀具編號</li>
|
||||
</ul>
|
||||
<h3 id="playclteleport-1">PlayClTeleport</h3>
|
||||
<ul>
|
||||
<li><code><X>, <Y>, <Z></code>: 刀具位置座標(單位:mm)</li>
|
||||
<li><code><I>, <J>, <K></code>: 刀具方向向量</li>
|
||||
</ul>
|
||||
<h2 id="使用場景">使用場景</h2>
|
||||
<ul>
|
||||
<li><strong>PlayAct</strong>: 用於執行自訂的動作物件</li>
|
||||
<li><strong>PlayToolingTeleport</strong>: 用於快速移動刀具到新位置</li>
|
||||
<li><strong>PlayClTeleport</strong>: 用於精確控制刀具的位置和方向</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>這些操作通常用於特殊情況或測試場景。在正常加工流程中,通常使用 <a class="xref" href="../PlayNcFile/index.html">執行NC檔</a> 或 <a class="xref" href="../PlayNc/index.html">執行NC碼字串</a> 來執行NC碼。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,133 @@
|
||||
<!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 "{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="Cmd-Collision">
|
||||
<h1 id="碰撞檢測">碰撞檢測</h1>
|
||||
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnableCollisionDetection">EnableCollisionDetection</a><small>(API)</small>:啟用碰撞檢測。</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePauseOnCollision">EnablePauseOnCollision</a><small>(API)</small>:啟用碰撞發生時暫停。</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">EnableCollisionDetection = <布林值>;
|
||||
EnablePauseOnCollision = <布林值>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">EnableCollisionDetection = true;
|
||||
EnablePauseOnCollision = false;
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,167 @@
|
||||
<!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 "{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="Doc-Task">
|
||||
<h1 id="腳本">腳本</h1>
|
||||
|
||||
<p><strong>任務</strong>(Task)頁面會依照順序執行腳本,頁面排版順序為由左至右,再由上至下。</p>
|
||||
<h2 id="腳本工具列">腳本工具列</h2>
|
||||
<p>個別腳本的工具列的<strong>順序</strong>(Order)欄位為執行順序,如果沒有勾選<strong>啟用</strong>,則該任務會無視執行順序被略過。</p>
|
||||
<p>工具欄可新增、刪除腳本。</p>
|
||||
<p><a id="Script"></a></p>
|
||||
<h2 id="語法與功能">語法與功能</h2>
|
||||
<p><strong>腳本</strong> (Script) 中的<strong>標題</strong> (Title) 的功能僅為註記,無其他功能,腳本的內容與標題不一定要匹配。</p>
|
||||
<p>腳本使用原生C#語言,可直接引用<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small>的成員屬性及成員函數。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>基本 C# 語法</strong></p>
|
||||
<ul>
|
||||
<li>指令以分號 <code>;</code> 作為結束符號。</li>
|
||||
<li>可以使用 <code>//</code> 作為行尾註解。</li>
|
||||
<li>可以使用<code>double.PositiveInfinity</code>、<code>double.NegativeInfinity</code>表示實數中的無限大及無限小。</li>
|
||||
</ul>
|
||||
<p>腳本範例:</p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><a id="FileTemplate"></a></p>
|
||||
<h3 id="多檔案輸出樣板">多檔案輸出樣板</h3>
|
||||
<p>在有支援路徑樣板的指令中,路徑字串裡的<code>[NcName]</code>會被替換為NC檔案的名稱。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
PlayNcFile("NC/file2.nc");
|
||||
WriteShotFiles("Output/[NcName].shot.csv", 1);
|
||||
// 輸出檔案至:
|
||||
// Output/file1.nc.shot.csv
|
||||
// Output/file2.nc.shot.csv
|
||||
OptimizeToFiles("Cache/Opt-[NcName]");
|
||||
// 輸出檔案至:
|
||||
// Cache/Opt-file1.nc
|
||||
// Cache/Opt-file2.nc
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="nc碼中的腳本指令">NC碼中的腳本指令</h2>
|
||||
<p>在註解內,以<code>;@</code>開頭,會在該行NC執行前執行腳本指令。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>FANUC NC檔範例,在換刀時更改仿真解析度</strong></p>
|
||||
<pre><code>...
|
||||
G40 G17 G49 G54 G80
|
||||
G91 G28 Z0.0
|
||||
T01 M06 (;@MachiningResolution_mm=0.03125;)
|
||||
S1270 M03
|
||||
G43 Z10. H01
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,170 @@
|
||||
<!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 "{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="Cmd-Events">
|
||||
<h1 id="事件處理">事件處理</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個事件,允許在加工過程中執行自訂邏輯。</p>
|
||||
<h2 id="machiningstepbuilt">MachiningStepBuilt</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningStepBuilt">MachiningStepBuilt</a><small>(API)</small> 當加工步階建立時觸發的事件。可用於在每個步階建立時進行配置或修改。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">MachiningStepBuilt += (preStep, curStep) => {
|
||||
// 自訂邏輯
|
||||
};
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 在每個步階建立時記錄資訊
|
||||
MachiningStepBuilt += (preStep, curStep) => {
|
||||
if (curStep != null)
|
||||
{
|
||||
Message($"Step created: ToolId={curStep.ToolId}, Feedrate={curStep.Feedrate_mmdmin}");
|
||||
}
|
||||
};
|
||||
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
<p>相關 API:<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Message_">Message</a><small>(API)</small>、<a class="xref" href="../PlayNcFile/index.html">執行NC檔</a></p>
|
||||
</div>
|
||||
<h2 id="machiningstepselected">MachiningStepSelected</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningStepSelected">MachiningStepSelected</a><small>(API)</small> 當加工步階被選取時觸發的事件。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">MachiningStepSelected += (millingStep) => {
|
||||
// 自訂邏輯
|
||||
};
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 當步階被選取時執行特定操作
|
||||
MachiningStepSelected += (step) => {
|
||||
if (step != null && step.ToolId == 1)
|
||||
{
|
||||
ProgressMessage($"Tool 1 step selected at line {step.LineNo}");
|
||||
}
|
||||
};
|
||||
</code></pre>
|
||||
<p>相關 API:<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ProgressMessage_">ProgressMessage</a><small>(API)</small></p>
|
||||
</div>
|
||||
<h2 id="事件清除">事件清除</h2>
|
||||
<p>事件會在呼叫 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ResetRuntime_">ResetRuntime</a><small>(API)</small> 時自動清除。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>事件處理器會在腳本執行期間保持有效,直到明確清除或重置運行時。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,122 @@
|
||||
<!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 "{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="Cmd-RemoveFlyPiece">
|
||||
<h1 id="移除離料">移除離料</h1>
|
||||
|
||||
<p>在五軸切削過程中可能出現懸浮留料,使用<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_RemoveFlyPiece_">RemoveFlyPiece</a><small>(API)</small>指令清除。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">RemoveFlyPiece();
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
|
After Width: | Height: | Size: 884 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 371 KiB |
@@ -0,0 +1,153 @@
|
||||
<!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 "{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="Cmd-GeomDiff">
|
||||
<h1 id="幾何比對">幾何比對</h1>
|
||||
|
||||
<p>幾何比對指令 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Diff_">Diff</a><small>(API)</small> 用於比對工件目標形狀(Target Shape)與仿真後形狀。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">Diff(<掃描半徑(mm)>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><掃描半徑>(Detection Radius)是工件目標形狀的表面延伸距離,如果仿真後表面超過該距離,則不計算偏差值。
|
||||
掃描半徑越大,計算時間越長。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">Diff(1);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>比對後以顏色呈現過切與留料距離。</p>
|
||||
<p>比對後工件表面的路徑索引將會失效。</p>
|
||||
<h2 id="往復斜面干涉比對案例解析">往復斜面干涉比對案例解析</h2>
|
||||
<p>CAM產生的NC碼未必如預期,與使用方式有關,許多參數可以調整,還要靠使用者的經驗與細心,所以需要誤差比對確定CAM產生的NC無誤。</p>
|
||||
<p>本範例為CAM產生的NC,經過誤差比對發現諸多需修正處。</p>
|
||||
<p>這些問題若不使用軟體輔助只能在加工結束後發現,對精密製造影響甚鉅。</p>
|
||||
<h3 id="比對標的">比對標的</h3>
|
||||
<p>以上下斜坡之幾何做干涉比對測試,切削模擬之刀具為R0.5mm、D12mm之牛鼻刀,切削路徑為往復移動。</p>
|
||||
<p>比對標的、切削路徑如下:</p>
|
||||
<p><img src="img/geom_compare_slide_design.png" alt="geom_compare_slide_design">
|
||||
比對標的</p>
|
||||
<p><img src="img/slide_resolution_0p1_with_path.png" alt="slide_resolution_0p1_with_path">
|
||||
切削路徑</p>
|
||||
<h3 id="結果與討論">結果與討論</h3>
|
||||
<p>切削模擬後的干涉比對如下圖。</p>
|
||||
<p><img src="img/diff_resolution_0p02.png" alt="diff_resolution_0p02">
|
||||
切削模擬後的干涉比對。綠色為精準,正紅色為過切超過0.02mm、正藍色為留料超過0.02mm。</p>
|
||||
<ul>
|
||||
<li>目標幾何靠近壁面處為直角,故偵測出留料。</li>
|
||||
<li>進刀段落往復區域的NC碼Z值不一致,故偵測到過切。</li>
|
||||
<li>往復邊緣處刀子沒有走出刀具半徑,離工件距離過短,故偵測到留料。</li>
|
||||
<li>往復路徑中的藍綠斑馬紋為往復間距過大造成的留料。</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>
|
||||
@@ -0,0 +1,144 @@
|
||||
<!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 "{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="Cmd-LoadCuttingParaByFile">
|
||||
<h1 id="載入切削參數">載入切削參數</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_LoadCuttingParaByFile_">LoadCuttingParaByFile</a><small>(API)</small> 從檔案載入切削參數到工件。</p>
|
||||
<p>切削參數為計算銑削力的必須參數。可以使用<a href="../MillingTraining/index.html">訓練與校正銑削係數</a>訓練或校正銑削係數,然後使用本指令載入到工件中。</p>
|
||||
<h2 id="指令格式">指令格式</h2>
|
||||
<pre><code class="lang-csharp">LoadCuttingParaByFile(<檔案路徑>);
|
||||
</code></pre>
|
||||
<h2 id="參數說明">參數說明</h2>
|
||||
<ul>
|
||||
<li><code><檔案路徑></code>: 切削參數檔案的路徑(相對於專案目錄)</li>
|
||||
</ul>
|
||||
<h2 id="指令範例">指令範例</h2>
|
||||
<pre><code class="lang-csharp">// 載入已訓練的切削參數
|
||||
LoadCuttingParaByFile("StainlessSteel.mp");
|
||||
|
||||
// 在訓練後立即載入
|
||||
TrainMillingPara(Fx|Fy|Fz, "StainlessSteel.mp");
|
||||
LoadCuttingParaByFile("StainlessSteel.mp");
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
<h2 id="注意事項">注意事項</h2>
|
||||
<ul>
|
||||
<li>載入前必須先設定工件(Workpiece),否則會顯示錯誤訊息</li>
|
||||
<li>載入成功後會顯示成功訊息,並更新工件的切削參數</li>
|
||||
<li>切削參數檔案路徑會自動儲存到工件的<code>CuttingParaFile</code>屬性中</li>
|
||||
</ul>
|
||||
<h2 id="參考">參考</h2>
|
||||
<ul>
|
||||
<li><a href="../MillingTraining/index.html">訓練與校正銑削係數</a> - 訓練與校正銑削係數</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Workpiece_">Workpiece</a><small>(API)</small> - 工件屬性</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>
|
||||
|
After Width: | Height: | Size: 165 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,422 @@
|
||||
<!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 "{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="Cmd-Mapping">
|
||||
<h1 id="資料映射">資料映射</h1>
|
||||
|
||||
<p>資料映射指,將外部資料對應於仿真路徑,使得仿真步(<a class="xref" href="../../output/simulation-step-output.html">仿真步輸出資訊(Simulation Step Output)</a>)可以索引外部資料。</p>
|
||||
<p>外部資料包含智慧刀把、動力計,可依時間線性映射至指定刀具路徑及加工區域。</p>
|
||||
<p>映射資料可用於檢視加工狀態、訓練銑削係數、校正銑削係數。</p>
|
||||
<h2 id="資料映射的形式">資料映射的形式</h2>
|
||||
<p>依據資料大小、應用情境不同,資料映射有多種形式。
|
||||
以資料量區分,<strong>仿真步</strong>對應<strong>外部資料</strong>可以一對一與一對多。</p>
|
||||
<h2 id="一對一映射">一對一映射</h2>
|
||||
<p>一對一映射指每個仿真步對應一個外部資料點,資料量與仿真步數量相同或相近。</p>
|
||||
<p>一對一的資料映射方式:</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../PlayCsvFile/play-csv-file.html">執行CSV檔</a>:適用控制器資料,每個步階對應一個CSV資料行</li>
|
||||
<li><a href="#mapsinglebycsvfile">MapSingleByCsvFile</a>:使用時間插值將CSV資料映射到加工步階</li>
|
||||
</ul>
|
||||
<h3 id="playcsvfile">PlayCsvFile</h3>
|
||||
<p><a class="xref" href="../PlayCsvFile/play-csv-file.html">執行CSV檔</a> 可以與一對多的資料映射協同使用,詳見 <a class="xref" href="../PlayCsvFile/play-csv-file.html">執行CSV檔</a>。</p>
|
||||
<h3 id="mapsinglebycsvfile">MapSingleByCsvFile</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MapSingleByCsvFile_">MapSingleByCsvFile</a><small>(API)</small> 讀取CSV檔案並使用時間插值將資料映射到加工步階。每個仿真步對應一個外部資料點(透過時間插值計算)。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">MapSingleByCsvFile(<CSV檔案路徑>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 讀取CSV檔案並映射到步階
|
||||
PlayNcFile("NC/file1.nc");
|
||||
MapSingleByCsvFile("Data/sensor.csv");
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>此方法使用時間插值方式將CSV資料映射到加工步階,適用於需要將外部感測器資料對應到仿真步階的場景。每個仿真步會對應一個透過時間插值計算的外部資料點。</p>
|
||||
</div>
|
||||
<h2 id="一對多映射">一對多映射</h2>
|
||||
<p>一對多映射指每個仿真步對應多個外部資料點,外部資料量遠大於仿真步數量(通常數十倍以上)。</p>
|
||||
<p>一對多的形式適用智慧刀把、加速規、測力計等高採樣率資料。</p>
|
||||
<p>一對多的資料映射可以直接<a href="#%E5%B0%8D%E6%87%89%E7%9C%9F%E5%AF%A6%E5%8A%A0%E5%B7%A5%E6%99%82%E9%96%93%E5%85%A8%E5%B1%80%E6%98%A0%E5%B0%84">對應真實加工時間全局映射</a>,也可以對<a href="#%E6%8C%87%E5%AE%9A%E6%95%B8%E6%8E%A7%E8%B7%AF%E5%BE%91%E5%8F%8A%E6%99%82%E9%96%93%E5%B1%80%E9%83%A8%E6%98%A0%E5%B0%84">指定數控路徑及時間局部映射</a>。</p>
|
||||
<h3 id="對應真實加工時間全局映射">對應真實加工時間全局映射</h3>
|
||||
<p>可使用<a class="xref" href="../PlayCsvFile/play-csv-file.html">執行CSV檔</a>或<a href="#mapsinglebycsvfile">MapSingleByCsvFile</a>作為前置,以獲取真實加工時間,csv檔案中須包含<code>ActualTime</code>欄位(<a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_ActualTime">ActualTime</a><small>(API)</small>)。然後使用<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MapSeriesByCsvFile_">MapSeriesByCsvFile</a><small>(API)</small>映射外部資料。</p>
|
||||
<p>此方法為一對多映射,每個仿真步會對應多個外部資料點。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code>MapSeriesByCsvFile(<檔案名>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="指定數控路徑及時間局部映射">指定數控路徑及時間局部映射</h3>
|
||||
<p>資料映射需設定:指定輸入資料、指定NC路徑。</p>
|
||||
<p>此方法為一對多映射,每個仿真步會對應多個外部資料點。</p>
|
||||
<figure class="alert text-bg-light">
|
||||
<img src="Mapping%20Overview%20Example.png" alt="Mapping Overview Example">
|
||||
<figcaption>資料映射圖例</figcaption>
|
||||
</figure>
|
||||
<h4 id="指定輸入資料">指定輸入資料</h4>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code>AddTimeDataByFile(<映射名>, <輸入檔案路徑>, <映射起點時間>, <映射終點時間>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><映射名>為自訂之標記名稱,對應於指定<strong>NC路徑</strong>中的映射名。</p>
|
||||
<p>時間資料格式為<code><時>:<分>:<秒>.<小數點後秒></code>;其餘資料格式為實數。</p>
|
||||
<p>注意映射資料不會因撥放器重置而被清空。可以使用<code>ClearTimeMappingData</code>指令清空。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code>ClearTimeMappingData();
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code>ClearTimeMappingData();
|
||||
AddTimeDataByFile( "lineA", "Mapping/sensor1.csv", "18:25:51.7100", "18:26:12.9910");
|
||||
AddTimeDataByFile( "lineB", "Mapping/sensor1.csv", "18:26:30.5750", "18:27:12.2880");
|
||||
PlayNcFile("NC/file1.nc")
|
||||
</code></pre>
|
||||
</div>
|
||||
<h4 id="指定nc路徑">指定NC路徑</h4>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code>//範圍(多行)資料映射
|
||||
BeginSelection(<映射名>, <起點映射錨點旗標>, <起點偏置物件>);
|
||||
EndSelection(<映射名>, <終點映射錨點旗標>, <終點偏置物件>);
|
||||
//單行資料映射
|
||||
LineSelection(<映射名>, <起點映射錨點旗標>, <起點偏置物件>, <終點映射錨點旗標>, <終點偏置物件>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><映射名>為自訂之標記名稱,對應於指定<strong>輸入資料</strong>中的映射名。</p>
|
||||
<ul>
|
||||
<li>可以使用<code>BeginSelection</code>與<code>EndSelection</code>作範圍(多行)資料映射:
|
||||
<ul>
|
||||
<li><code>BeginSelection</code>設置映射起點。</li>
|
||||
<li><code>EndSelection</code>設置映射終點。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>或是使用<code>LineSelection</code>作單行資料映射。</li>
|
||||
</ul>
|
||||
<p><映射錨點旗標>可以使用:</p>
|
||||
<ul>
|
||||
<li><code>LineBegin</code>
|
||||
以該行運動起點為映射錨點。</li>
|
||||
<li><code>LineEnd</code>
|
||||
以該行運動終點為映射錨點。</li>
|
||||
<li><code>FirstTouch</code>
|
||||
以該行第一次接觸工件的位置為映射錨點。</li>
|
||||
<li><code>LastTouch</code>
|
||||
以該行最後接觸工件的位置為映射錨點。</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p><img src="markRegionOnTouch.png" alt="markRegionOnTouch.png"></p>
|
||||
</blockquote>
|
||||
<p><偏置物件>是相對於錨點的偏移,可以使用:</p>
|
||||
<ul>
|
||||
<li><code>null</code>
|
||||
無偏移。</li>
|
||||
<li><code>ShiftTime_s</code>
|
||||
單位秒。正值為往後時間;負值為往前時間。</li>
|
||||
<li><code>ShiftDistance_mm</code>
|
||||
單位mm。正值為往後位移;負值為往前位移。</li>
|
||||
</ul>
|
||||
<p>指定NC路徑命令需在NC碼註解中執行,前置<code>;@</code>符號。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>NC檔案範例</strong></p>
|
||||
<pre><code>...
|
||||
G00 G90 X-6. Y10.
|
||||
G17 G01 Z-1. F600.
|
||||
S50 M03
|
||||
X13. F20 ;@LineSelection("lineA", FirstTouch, ShiftTime_s(2), LineEnd, ShiftDistance_mm(-1));
|
||||
X25. F10 ;@LineSelection("lineB", FirstTouch, null, LastTouch, null);
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>NC檔案範例2</strong></p>
|
||||
<p>如果控制器不支援<code>;</code>符號作為註解,如FANUC控制器,則需將其引入註解範圍內。</p>
|
||||
<pre><code>...
|
||||
G00 G90 X-6. Y10.
|
||||
G17 G01 Z-1. F600.
|
||||
S50 M03
|
||||
X13. F20 (;@LineSelection("lineA", FirstTouch, ShiftTime_s(2), LineEnd, ShiftDistance_mm(-1));)
|
||||
X25. F10 (;@LineSelection("lineB", FirstTouch, null, LastTouch, null);)
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="選區結束映射設定">選區結束映射設定</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnableMapOnSelectionEnd">EnableMapOnSelectionEnd</a><small>(API)</small> 設定是否在選擇結束時連帶執行映射。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">EnableMapOnSelectionEnd = true; // 或 false
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 啟用選區結束映射
|
||||
EnableMapOnSelectionEnd = true;
|
||||
BeginSelection("region1");
|
||||
// ... NC 代碼 ...
|
||||
EndSelection("region1"); // 連帶執行映射
|
||||
|
||||
// 停用選區結束映射
|
||||
EnableMapOnSelectionEnd = false;
|
||||
BeginSelection("region2");
|
||||
// ... NC 代碼 ...
|
||||
EndSelection("region2"); // 不連帶執行映射
|
||||
Map("region2"); // 手動執行映射
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>預設值為 <code>true</code>。當設為 <code>true</code> 時,<code>EndSelection</code> 會連帶執行對應的 <code>Map</code> 操作。</p>
|
||||
</div>
|
||||
<h3 id="範例專案">範例專案</h3>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../examples/milling-training-dynamometer/index.html">範例專案:動力計訓練銑削係數</a></li>
|
||||
</ul>
|
||||
<h2 id="感測器資料檔案格式">感測器資料檔案格式</h2>
|
||||
<p>輸入檔案格式為csv,須包含時間資訊,其餘資訊可選擇包含或不包含。</p>
|
||||
<p>csv檔案需有標題列,欄位標題需用特定指示詞標示。
|
||||
部分欄位指示詞為方便性是多擇一。</p>
|
||||
<ul>
|
||||
<li>時間:
|
||||
<ul>
|
||||
<li><code>ActualTime</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>動力計:
|
||||
<ul>
|
||||
<li>X方向力:
|
||||
<ul>
|
||||
<li><code>Fx</code></li>
|
||||
<li><code>Workpiece.Fx</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Y方向力:
|
||||
<ul>
|
||||
<li><code>Fy</code></li>
|
||||
<li><code>Workpiece.Fy</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Z方向力:
|
||||
<ul>
|
||||
<li><code>Fz</code></li>
|
||||
<li><code>Workpiece.Fz</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>智慧刀把:
|
||||
<ul>
|
||||
<li>X方向力矩:
|
||||
<ul>
|
||||
<li><code>Mx</code></li>
|
||||
<li><code>Holder.Mx</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Y方向力矩:
|
||||
<ul>
|
||||
<li><code>My</code></li>
|
||||
<li><code>Holder.My</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Z方向力矩:
|
||||
<ul>
|
||||
<li><code>Mz</code></li>
|
||||
<li><code>Holder.Mz</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>加速規(可選):
|
||||
<ul>
|
||||
<li><code>Ax</code></li>
|
||||
<li><code>Ay</code></li>
|
||||
<li><code>Az</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>欄位可以包含其他外部資訊,如下例之<code>CH1</code>、<code>CH2</code>。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>檔案範例</strong></p>
|
||||
<pre><code>ActualTime,CH1,CH2,Mx,My,Mz
|
||||
18:23:54.703,-0.00398,-0.00034,-0.02923,0.10733,0.00409
|
||||
18:23:54.704,-0.00194,0.00285,0.04155,-0.04457,0.00448
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="串接控制器資料及感測器資料至數控路徑">串接控制器資料及感測器資料至數控路徑</h2>
|
||||
<p>因為機台加減速,模擬加工時間與實際加工時間會累積誤差,時間拉長了對不上。所以在資料映射時透過錨點做線性投影。</p>
|
||||
<ul>
|
||||
<li>模擬步資料及控制器資料皆含檔案號行號,故可依此設定兩者相應錨點</li>
|
||||
<li>控制器資料及感測器資料皆含實際時間,故可依此設定兩者相應錨點</li>
|
||||
</ul>
|
||||
<p>串接後可使模擬步索引感測器資料。</p>
|
||||
<p><img src="img/Series-Mapping.jpg" alt="串接映射示意圖"></p>
|
||||
<p>如示意圖:</p>
|
||||
<ul>
|
||||
<li>L = <code>FileNo</code>, <code>LineNo</code> 錨點</li>
|
||||
<li>t = <code>ActualTime</code> 錨點</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>為何使用兩層映射?</strong></p>
|
||||
<p>雖然可以直接使用 <a class="xref" href="../PlayCsvFile/play-csv-file.html">執行CSV檔</a> 執行模擬,但控制器的採樣頻率有限,直接播放會導致模擬路徑失真。</p>
|
||||
<p>透過系統解譯器解譯數控路徑(<a class="xref" href="../PlayNcFile/index.html">執行NC檔</a>),再將控制器資料與感測器資料映射至模擬步,可獲得較精確的模擬路徑。</p>
|
||||
</div>
|
||||
<h3 id="操作流程">操作流程</h3>
|
||||
<p>依序使用兩指令串聯控制器資料及感測器資料至虛擬環境:</p>
|
||||
<ol>
|
||||
<li><p><strong>先使用 <a href="#mapsinglebycsvfile">MapSingleByCsvFile</a> 將控制器資料映射至模擬數控路徑</strong></p>
|
||||
<ul>
|
||||
<li>控制器資料至少包含 <code>FileNo</code>、<code>LineNo</code>、<code>ActualTime</code></li>
|
||||
<li>該指令會依 <code>FileNo</code> 及 <code>LineNo</code> 將 <code>ActualTime</code> 及其他控制器資料插補至模擬步中</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><strong>而後使用 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MapSeriesByCsvFile_">MapSeriesByCsvFile</a><small>(API)</small> 將感測器資料映射至模擬數控路徑</strong></p>
|
||||
<ul>
|
||||
<li>感測器資料至少包含 <code>ActualTime</code></li>
|
||||
<li>該指令會依 <code>ActualTime</code> 將其他感測器資料插補至模擬步中</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 1. 使用系統解譯器解譯數控路徑(獲得精確的模擬路徑)
|
||||
PlayNcFile("NC/machining.nc");
|
||||
|
||||
// 2. 映射控制器資料(含FileNo, LineNo, ActualTime)
|
||||
MapSingleByCsvFile("Data/controller.csv");
|
||||
|
||||
// 3. 映射感測器資料(含ActualTime及感測器數據)
|
||||
MapSeriesByCsvFile("Data/sensor.csv");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="範例專案-1">範例專案</h3>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../examples/mapping-demo/index.html">範例專案:串聯控制器資料及感測器資料至模擬數控路徑並更新銑削係數</a></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>
|
||||
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,223 @@
|
||||
<!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 "{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="Cmd-Messages">
|
||||
<h1 id="訊息處理">訊息處理</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個方法來顯示和管理訊息。</p>
|
||||
<h2 id="message">Message</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Message_">Message</a><small>(API)</small> 顯示一般訊息。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">Message(<訊息字串>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">Message("開始執行NC檔案");
|
||||
PlayNcFile("NC/file1.nc");
|
||||
Message("NC檔案執行完成");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="progressmessage">ProgressMessage</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ProgressMessage_">ProgressMessage</a><small>(API)</small> 顯示進度訊息。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">ProgressMessage(<訊息字串>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">ProgressMessage("正在載入工件...");
|
||||
ReadRuntimeGeom("Cache/workpiece.wct");
|
||||
ProgressMessage("工件載入完成");
|
||||
</code></pre>
|
||||
<p>相關指令:<a class="xref" href="../RuntimeGeom/index.html">程序幾何</a></p>
|
||||
</div>
|
||||
<h2 id="warningmessage">WarningMessage</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_WarningMessage_">WarningMessage</a><small>(API)</small> 顯示警告訊息。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">WarningMessage(<訊息字串>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">if (StepCount == 0)
|
||||
{
|
||||
WarningMessage("沒有執行任何步階");
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="errormessage">ErrorMessage</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ErrorMessage_">ErrorMessage</a><small>(API)</small> 顯示錯誤訊息。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">ErrorMessage(<訊息字串>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">if (Workpiece == null)
|
||||
{
|
||||
ErrorMessage("工件不存在");
|
||||
return;
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="appendmessagestofile">AppendMessagesToFile</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_AppendMessagesToFile_">AppendMessagesToFile</a><small>(API)</small> 將訊息附加到檔案,可選擇性地依標籤過濾。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">AppendMessagesToFile(<目標檔案路徑>, <標籤1>, <標籤2>, ...);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
|
||||
// 將所有訊息寫入檔案
|
||||
AppendMessagesToFile("Output/messages.txt");
|
||||
|
||||
// 只將帶有特定標籤的訊息寫入檔案
|
||||
AppendMessagesToFile("Output/errors.txt", "Error", "Warning");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="sessionmessagehost">SessionMessageHost</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_SessionMessageHost">SessionMessageHost</a><small>(API)</small> 取得會話訊息主機物件,用於進階訊息操作。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var messageHost = SessionMessageHost;
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="訊息類型">訊息類型</h2>
|
||||
<ul>
|
||||
<li><strong>Message</strong>: 一般資訊訊息</li>
|
||||
<li><strong>ProgressMessage</strong>: 進度相關訊息(通常顯示在進度列)</li>
|
||||
<li><strong>WarningMessage</strong>: 警告訊息(不會中斷執行)</li>
|
||||
<li><strong>ErrorMessage</strong>: 錯誤訊息(可能影響執行)</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>所有訊息都會記錄在會話訊息主機中,可以在介面中查看,也可以使用 <code>AppendMessagesToFile</code> 匯出到檔案。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,200 @@
|
||||
<!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 "{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="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(<樣本旗標>, <檔案輸出路徑>);
|
||||
//校正銑削係數
|
||||
ReTrainMillingPara(<樣本旗標>, <檔案輸出路徑>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><樣本旗標> 為應用於訓練資料的資料種類,包含:<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( "lineA", "Mapping/sensor1.csv", "18:25:51.7100", "18:26:12.9910");
|
||||
AddTimeDataByFile( "lineB", "Mapping/sensor1.csv", "18:26:30.5750", "18:27:12.2880");
|
||||
PlayNcFile("NC/file1.nc")
|
||||
TrainMillingPara(Fx|Fy|Fz, "StainlessSteel.mp");
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>以智慧刀把資料為例,輸出校正銑削係數</strong></p>
|
||||
<pre><code>ClearTimeMappingData();
|
||||
AddTimeDataByFile( "lineA", "Mapping/sensor1.csv", "18:25:51.7100", "18:26:12.9910");
|
||||
AddTimeDataByFile( "lineB", "Mapping/sensor1.csv", "18:26:30.5750", "18:27:12.2880");
|
||||
PlayNcFile("NC/file1.nc")
|
||||
ReTrainMillingPara(Fz|Mx|My|Mz, "StainlessSteel.mp");
|
||||
</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>
|
||||
<h2 id="訓練品質指標">訓練品質指標</h2>
|
||||
<p>訓練完成後,系統會計算以下品質指標:</p>
|
||||
<h3 id="相關係數-correlation-coefficient-r">相關係數 (Correlation Coefficient, R)</h3>
|
||||
<p>相關係數 <span class="math">\(R\)</span> 是整體訓練結果的單一數值,用於評估訓練後模擬值與量測值的線性相關程度,範圍為 <span class="math">\(0\)</span> 到 <span class="math">\(1\)</span>,越接近 <span class="math">\(1\)</span> 表示訓練結果越好。新刀的相關係數通常介於 0.95 至 0.999 之間。</p>
|
||||
<h3 id="訓練誤差比-trainingerrratio">訓練誤差比 (TrainingErrRatio)</h3>
|
||||
<p>訓練誤差比是在執行 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_TrainMillingPara_">TrainMillingPara</a><small>(API)</small> 或 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ReTrainMillingPara_">ReTrainMillingPara</a><small>(API)</small> 後,動態註冊並設置到訓練區域內各步的<a href="../StepVariables/index.html">步變數</a>,用於評估該步的模擬與量測之間的誤差程度,數值越小表示該步的訓練品質越好。</p>
|
||||
<div class="math">
|
||||
\[
|
||||
\text{TrainingErrRatio} = \sqrt{\frac{\sum_{i} e_i^2}{\sqrt{\sum_{i} y_i^2 \cdot \sum_{i} \hat{y}_i^2}}}
|
||||
\]</div>
|
||||
<p>其中:</p>
|
||||
<ul>
|
||||
<li><span class="math">\(e_i = y_i - \hat{y}_i\)</span>:第 <span class="math">\(i\)</span> 個樣本的誤差</li>
|
||||
<li><span class="math">\(y_i\)</span>:量測值</li>
|
||||
<li><span class="math">\(\hat{y}_i\)</span>:模擬預測值</li>
|
||||
</ul>
|
||||
<p>此指標會嵌入到每個加工步驟的輸出資料中,可用於識別訓練品質較差的段落。</p>
|
||||
<h3 id="角度偏移-angleoffset">角度偏移 (AngleOffset)</h3>
|
||||
<p>角度偏移是在執行訓練函數後,動態註冊並設置到訓練區域內各步的<a href="../StepVariables/index.html">步變數</a>。<span class="math">\(\theta_{offset}\)</span> 表示該步量測資料與模擬資料之間的刀刃旋轉相位差。系統會自動對齊相位以獲得最佳訓練結果。</p>
|
||||
<div class="math">
|
||||
\[
|
||||
\theta_{offset} = \frac{2\pi \cdot i_{min}}{N_{div}}
|
||||
\]</div>
|
||||
<p>其中:</p>
|
||||
<ul>
|
||||
<li><span class="math">\(i_{min}\)</span>:使預測誤差最小的角度索引</li>
|
||||
<li><span class="math">\(N_{div}\)</span>:一轉的角度分割數,即 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MillingCycleDivisionNum">MillingCycleDivisionNum</a><small>(API)</small></li>
|
||||
</ul>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>如果同一批訓練中各段落的 AngleOffset 差異過大,可能表示主軸旋轉突然放慢或放快或資料缺失,或系統無法準確分析樣本並導致不理想訓練的結果。</p>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>較大的 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MillingCycleDivisionNum">MillingCycleDivisionNum</a><small>(API)</small> 設定可以得到更準確的 AngleOffset 結果,進而訓練出更準確的銑削係數。</p>
|
||||
</div>
|
||||
<h2 id="範例專案">範例專案</h2>
|
||||
<ul>
|
||||
<li><a href="../../examples/milling-training-dynamometer/index.html">動力計訓練銑削係數</a></li>
|
||||
<li><a href="../../examples/mapping-demo/index.html">串聯控制器資料及感測器資料至模擬數控路徑並更新銑削係數</a></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>
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,364 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NC優化 | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="NC優化 | 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="Cmd-NcOptimization">
|
||||
<h1 id="nc優化">NC優化</h1>
|
||||
|
||||
<p>組態在NC仿真前設定,然後執行<strong>輸出優化NC檔</strong>指令。</p>
|
||||
<p>可同時參考閱讀說明章節<a class="xref" href="../../optimization/index.html">NC優化</a>。</p>
|
||||
<h2 id="組態">組態</h2>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">OptEnableFeedrate = <布林值>;
|
||||
OptEnableInterpolation = <布林值>;
|
||||
OptRapidFeed_mmdmin = <實數>;
|
||||
OptMinFeedrate_mmdmin = <實數>;
|
||||
OptMaxFeedrate_mmdmin = <實數>;
|
||||
OptMaxAcceleration_mmds2 = <實數>;
|
||||
OptExtendedPreDistance_mm = <實數>;
|
||||
OptExtendedPostDistance_mm = <實數>;
|
||||
OptSpindlePowerSafetyFactor = <實數>;
|
||||
OptSpindleTorqueSafetyFactor = <實數>;
|
||||
OptThermalYieldSafetyFactor = <實數>;
|
||||
OptPreferedForce_N = <實數>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<ul>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableFeedrate">OptEnableFeedrate</a><small>(API)</small>:啟用順序式(Sequential)進給率優化。</p>
|
||||
<p>順序式係指該功能從下指令開始作用。與其相對的設定在刀具端,刀具端也能設定進給率優化,但是在裝刀時才會發揮作用。</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableFeedrate">OptEnableFeedrate</a><small>(API)</small>與所有其他啟用進給率優化的指令需同時為真,進給率優化才會啟用。
|
||||
即與刀具設定端必須同時為真(true),進給率優化才會啟用。</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableFeedrate">OptEnableFeedrate</a><small>(API)</small>預設值為真。</p>
|
||||
</li>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableInterpolation">OptEnableInterpolation</a><small>(API)</small>:優化程序用重新插補。</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>重新插捕後NC碼會增加,可以更好地控制加減速。</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptFeedrateAssignmentRatio">OptFeedrateAssignmentRatio</a><small>(API)</small>:進給賦值倍率。</li>
|
||||
</ul>
|
||||
<p>當優化程序用重新插補並且進給率變化超過進給賦值倍率時,系統會依據<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxAcceleration_mmds2">OptMaxAcceleration_mmds2</a><small>(API)</small>插入附帶進給率指令的NC碼。</p>
|
||||
<p>進給賦值倍率越小,插補點越密集。進給賦值倍率越大,則偏離優化標的的程度越大。</p>
|
||||
<p>在改進給賦值倍率的同時也要對應加大安全係數。
|
||||
進給賦值倍率若是0.01,就是1%,每變更1%進給率就會給個新的插補點。
|
||||
如果改大,比方說10%,可能會變成該處理論值應該是F100,可是優化後卻是F110,所以要配合安全係數修改。</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptRapidFeed_mmdmin">OptRapidFeed_mmdmin</a><small>(API)</small>:優化程序中的無切削區域進給率。單位mm/min。</li>
|
||||
</ul>
|
||||
<p>沒有切到工件的NC路徑,為無切削區域。優化後該路徑將採用無切削區域進給率。</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMinFeedrate_mmdmin">OptMinFeedrate_mmdmin</a><small>(API)</small>:優化程序中的有切削區域最小進給。單位mm/min。</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxFeedrate_mmdmin">OptMaxFeedrate_mmdmin</a><small>(API)</small>:優化程序中的有切削區域最大進給。單位mm/min。</li>
|
||||
</ul>
|
||||
<p>有切到工件的NC路徑,為有切削區域。有切削區域的最大最小進給的設定通常依據經驗法則。</p>
|
||||
<ul>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxAcceleration_mmds2">OptMaxAcceleration_mmds2</a><small>(API)</small>:優化程序中的加減速限制。優化後NC碼的F值變化在該限制之內。單位 <span class="math">\(mm/s^2\)</span>。</p>
|
||||
</li>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPreDistance_mm">OptExtendedPreDistance_mm</a><small>(API)</small>:優化程序中的有切削區域等效計算的前長度。單位mm。</p>
|
||||
</li>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPostDistance_mm">OptExtendedPostDistance_mm</a><small>(API)</small>:優化程序中的有切削區域等效計算的後長度。單位mm。</p>
|
||||
</li>
|
||||
</ul>
|
||||
<figure>
|
||||
<img src="OptExtendedDistance.jpg" alt="OptExtendedDistance">
|
||||
<figcaption>優化程序中的有切削區域等效計算的長度</figcaption>
|
||||
</figure>
|
||||
<ul>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptSpindlePowerSafetyFactor">OptSpindlePowerSafetyFactor</a><small>(API)</small>:主軸功率安全係數。</p>
|
||||
<p>於優化後的NC碼,主軸功率將盡可能趨近於目標值。</p>
|
||||
<p>設為0則忽略此限制。</p>
|
||||
</li>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptSpindleTorqueSafetyFactor">OptSpindleTorqueSafetyFactor</a><small>(API)</small>:主軸扭力安全係數。</p>
|
||||
<p>優化後的NC碼,主軸扭力將盡可能趨近於目標值。</p>
|
||||
<p>設為0則忽略此限制。</p>
|
||||
</li>
|
||||
<li><p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptThermalYieldSafetyFactor">OptThermalYieldSafetyFactor</a><small>(API)</small>:刀刃熱降伏安全係數。</p>
|
||||
<p>刀刃表面溫度超過一定值時,刀刃表面會因溫差產生的壓力造成塑性變形。</p>
|
||||
<p>優化後的NC碼,刀刃表面度將盡可能趨近於目標值。</p>
|
||||
<p>設為0則忽略此限制。</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>目標值算法</strong></p>
|
||||
<p>目標值 = 100% / 安全係數</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptPreferedForce_N">OptPreferedForce_N</a><small>(API)</small>:優化程中的目標力。單位N。
|
||||
在符合所有限制的條件下,優化程序中的加工路徑產生的力會盡可能的趨近目標力。</li>
|
||||
</ul>
|
||||
<h2 id="限制的優先序">限制的優先序</h2>
|
||||
<p>在有切削區域中:</p>
|
||||
<p><strong>進給率的直接限制</strong> 優先於 <strong>加減速限制</strong>(<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxAcceleration_mmds2">OptMaxAcceleration_mmds2</a><small>(API)</small>) 優先於 <strong>基於物理特性算出的限制</strong>。</p>
|
||||
<ul>
|
||||
<li><p><strong>進給率的直接限制</strong> 包含</p>
|
||||
<ul>
|
||||
<li>腳本指令
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMinFeedrate_mmdmin">OptMinFeedrate_mmdmin</a><small>(API)</small></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxFeedrate_mmdmin">OptMaxFeedrate_mmdmin</a><small>(API)</small></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>刀具設定
|
||||
<ul>
|
||||
<li>每刃最小進給</li>
|
||||
<li>每刃最大進給</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><strong>基於物理特性算出的進給率限制</strong> 包含</p>
|
||||
<ul>
|
||||
<li>腳本指令
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptSpindlePowerSafetyFactor">OptSpindlePowerSafetyFactor</a><small>(API)</small></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptSpindleTorqueSafetyFactor">OptSpindleTorqueSafetyFactor</a><small>(API)</small></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptThermalYieldSafetyFactor">OptThermalYieldSafetyFactor</a><small>(API)</small></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptPreferedForce_N">OptPreferedForce_N</a><small>(API)</small></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>刀具設定
|
||||
<ul>
|
||||
<li>降伏力安全係數</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>若同級項目中的限制有衝突,則採取其中的最低進給率。</p>
|
||||
<h2 id="nc碼中的優化腳本指令">NC碼中的優化腳本指令</h2>
|
||||
<h3 id="於指定nc行不啟用優化">於指定NC行不啟用優化</h3>
|
||||
<p>在執行 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Preserve_">Preserve</a><small>(API)</small>() 的NC行中,不啟用優化。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<p>在 <code>N0140</code> 行不啟用優化。</p>
|
||||
<pre><code class="lang-nc">...
|
||||
N0130 X-1.965 Y17.053
|
||||
N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@Preserve();)
|
||||
N0150 G01 X-3.068 Y40.776
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="於指定nc範圍不啟用優化">於指定NC範圍不啟用優化</h3>
|
||||
<p>使用<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_BeginPreserve_">BeginPreserve</a><small>(API)</small>()的NC行及<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EndPreserve_">EndPreserve</a><small>(API)</small>()的NC行及包含的NC範圍,不啟用優化。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<p>在 <code>N0140</code>、<code>N0150</code>、<code>N0160</code> 行不啟用優化。</p>
|
||||
<pre><code class="lang-nc">...
|
||||
N0130 X-1.965 Y17.053
|
||||
N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@BeginPreserve();)
|
||||
N0150 G01 X-3.068 Y40.776
|
||||
N0160 X-3.555 Y43.338 (;@EndPreserve();)
|
||||
N0170 X-4.125 Y45.875
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="優化日誌">優化日誌</h2>
|
||||
<p>優化過程提供兩種日誌功能,方便分析與除錯。</p>
|
||||
<h3 id="優化過程日誌檔">優化過程日誌檔</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnableIndividualStepAdjustmentLog_">EnableIndividualStepAdjustmentLog</a><small>(API)</small>:啟用優化過程日誌檔輸出。預設為真。</p>
|
||||
<p>啟用後,優化過程會為每個NC檔輸出一個 <code>.flatproc.log</code> 檔案,記錄各步階的優化條件經<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPreDistance_mm">OptExtendedPreDistance_mm</a><small>(API)</small>及<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPostDistance_mm">OptExtendedPostDistance_mm</a><small>(API)</small>展開後獨立優化計算的資訊(不包含步階間的交互關係,如加減速)。</p>
|
||||
<p>日誌檔案內容依步階順序輸出(即使平行計算時也會保持順序),每行包含:</p>
|
||||
<ul>
|
||||
<li>原始NC行位置與步階索引</li>
|
||||
<li>各項優化限制的計算結果,例如:
|
||||
<ul>
|
||||
<li><code>FrtByPreferedForce_mm</code>: 依目標力計算的每刃進給</li>
|
||||
<li><code>FrtByYieldingStressRatio_mm</code>: 依降伏應力比計算的每刃進給</li>
|
||||
<li><code>FrtBySpindleTorqueRatio_mm</code>: 依主軸扭力比計算的每刃進給</li>
|
||||
<li><code>FrtBySpindlePowerRatio_mm</code>: 依主軸功率比計算的每刃進給</li>
|
||||
<li><code>FrtByThermalYieldingRatio_mm</code>: 依熱降伏比計算的每刃進給</li>
|
||||
<li><code>FrtByReliefAngle_mm</code>: 依餘隙角碰撞計算的每刃進給</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3 id="嵌入式日誌註解">嵌入式日誌註解</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EmbeddedLogMode_">EmbeddedLogMode</a><small>(API)</small>:設定嵌入式日誌模式。預設為<a class="xref" href="../../../../api/Hi.NcOpt.NcOptimizationEmbeddedLogMode.html#Hi_NcOpt_NcOptimizationEmbeddedLogMode_SimpleLog">SimpleLog</a><small>(API)</small>。</p>
|
||||
<p>可用模式:</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.NcOpt.NcOptimizationEmbeddedLogMode.html#Hi_NcOpt_NcOptimizationEmbeddedLogMode_None">None</a><small>(API)</small>: 不添加日誌註解</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.NcOpt.NcOptimizationEmbeddedLogMode.html#Hi_NcOpt_NcOptimizationEmbeddedLogMode_SimpleLog">SimpleLog</a><small>(API)</small>: 只在重新插補的行添加 <code>StepIndex</code>,原始行的最後一個插補行添加 <code>LineNo</code></li>
|
||||
<li><a class="xref" href="../../../../api/Hi.NcOpt.NcOptimizationEmbeddedLogMode.html#Hi_NcOpt_NcOptimizationEmbeddedLogMode_FullLog">FullLog</a><small>(API)</small>: 所有行都添加 <code>StepIndex</code> 和 <code>LineNo</code></li>
|
||||
</ul>
|
||||
<p>啟用後,優化後的NC檔中會在NC行後方加上 <code>(src(...))</code> 註解,包含:</p>
|
||||
<ul>
|
||||
<li><code>LineNo</code>: 原始NC檔的行號</li>
|
||||
<li><code>StepIndex</code>: 對應的步階索引</li>
|
||||
</ul>
|
||||
<p>例如:<code>G01 X10.0 Y20.0 F500 (src(LineNo: 140, StepIndex: 256))</code></p>
|
||||
<p>此功能方便對照原始NC碼與優化後的NC碼,並可追蹤每行NC碼對應的步階資訊。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">EnableIndividualStepAdjustmentLog = <布林值>;
|
||||
EmbeddedLogMode = <NcOptimizationEmbeddedLogMode>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="輸出優化nc檔">輸出優化NC檔</h2>
|
||||
<p>使用 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptimizeToFiles_">OptimizeToFiles</a><small>(API)</small> 方法輸出優化後的NC檔。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">OptimizeToFiles(<路徑樣板>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><路徑樣板>支援 <a href="../Doc-Task/index.html#FileTemplate">檔案路徑樣板</a>。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">OptEnableFeedrate = true;
|
||||
OptEnableInterpolation = true;
|
||||
OptRapidFeed_mmdmin = 4000;
|
||||
OptMinFeedrate_mmdmin = 100;
|
||||
OptMaxFeedrate_mmdmin = 4000;
|
||||
OptMaxAcceleration_mmds2 = 10;
|
||||
OptExtendedPreDistance_mm = 3;
|
||||
OptExtendedPostDistance_mm = 2;
|
||||
OptSpindlePowerSafetyFactor = 1.5;
|
||||
OptSpindleTorqueSafetyFactor = 1.5;
|
||||
OptThermalYieldSafetyFactor = 0;
|
||||
OptPreferedForce_N = double.PositiveInfinity;
|
||||
PlayNcFile("NC/file1.nc");
|
||||
|
||||
OptRapidFeed_mmdmin = 8000;
|
||||
PlayNcFile("NC/file2.nc");
|
||||
|
||||
OptimizeToFiles("Cache/Opt-[NcName]");
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>組態設定可以穿插在NC仿真間,將會作用在組態設定後的NC仿真。</p>
|
||||
<div class="WARNING">
|
||||
<h5>Warning</h5>
|
||||
<p>在 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningStepBuilt">MachiningStepBuilt</a><small>(API)</small> 事件內使用 <a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_UpdateNcOptOption_">UpdateNcOptOption</a><small>(API)</small> 時,不能與NC碼內嵌優化指令併用,否則可能因平行計算產生未定義行為。</p>
|
||||
</div>
|
||||
<p>以上範例為例,優化後的NC程式file1.nc的無切削區域快速進給為4000,file2.nc則為8000。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>NC碼中的優化指令範例</strong></p>
|
||||
<pre><code class="lang-nc">...
|
||||
N0110 X-3.064 Y6.378 (;@OptMaxAcceleration_mmds2=10;)
|
||||
N0120 X-2.411 Y11.712
|
||||
N0130 X-1.965 Y17.053
|
||||
N0140 G03 X-2.66 Y38.193 I-103.796 J7.172 (;@Preserve();)
|
||||
N0150 G01 X-3.068 Y40.776 (;@OptMaxAcceleration_mmds2=100; OptMaxFeedrate_mmdmin=12000;)
|
||||
N0160 X-3.555 Y43.338
|
||||
N0170 X-4.125 Y45.875
|
||||
...
|
||||
</code></pre>
|
||||
<p>N0110至N0150前,優化區加速度設為10 <span class="math">\(mm/s^2\)</span>;
|
||||
N0140單行不做優化;
|
||||
N0150及以後,優化區加速度設為100 <span class="math">\(mm/s^2\)</span>;
|
||||
N0150及以後,優化區切削區域最大進給設為12000 <span class="math">\(mm/min\)</span>;</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,224 @@
|
||||
<!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 "{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="Cmd-Physics">
|
||||
<h1 id="物理仿真設定">物理仿真設定</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個屬性來配置物理仿真的行為。</p>
|
||||
<h2 id="enablephysics">EnablePhysics</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePhysics">EnablePhysics</a><small>(API)</small> 啟用或停用銑削力評估。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">EnablePhysics = true; // 或 false
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 啟用物理仿真
|
||||
EnablePhysics = true;
|
||||
PlayNcFile("NC/file1.nc");
|
||||
|
||||
// 停用物理仿真(僅幾何仿真)
|
||||
EnablePhysics = false;
|
||||
PlayNcFile("NC/file2.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="enableweareffect">EnableWearEffect</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnableWearEffect">EnableWearEffect</a><small>(API)</small> 啟用或停用刀具磨耗效應。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">EnableWearEffect = true; // 或 false
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 啟用磨耗效應
|
||||
EnableWearEffect = true;
|
||||
PlayNcFile("NC/file1.nc");
|
||||
|
||||
// 停用磨耗效應
|
||||
EnableWearEffect = false;
|
||||
PlayNcFile("NC/file2.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="millingforcecycledivisionnum">MillingForceCycleDivisionNum</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MillingForceCycleDivisionNum">MillingForceCycleDivisionNum</a><small>(API)</small> 設定銑削力計算的每轉分割數。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">MillingForceCycleDivisionNum = <分割數>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 設定每轉分割數為360(每度一個計算點)
|
||||
MillingForceCycleDivisionNum = 360;
|
||||
|
||||
// 此設定應在執行 TrainMillingPara 之前設定
|
||||
PlayNcFile("NC/file1.nc");
|
||||
TrainMillingPara(Fx|Fy|Fz, "output.mp");
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>此屬性應在執行 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_TrainMillingPara_">TrainMillingPara</a><small>(API)</small> 之前設定,以確保訓練過程使用正確的分割數。</p>
|
||||
</div>
|
||||
<h2 id="initspindletemperature_c">InitSpindleTemperature_C</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_InitSpindleTemperature_C">InitSpindleTemperature_C</a><small>(API)</small> 設定初始主軸溫度(攝氏度)。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">InitSpindleTemperature_C = <溫度>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 設定初始主軸溫度為25度
|
||||
InitSpindleTemperature_C = 25.0;
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="enablepauseonfailure">EnablePauseOnFailure</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePauseOnFailure">EnablePauseOnFailure</a><small>(API)</small> 啟用或停用在失敗時暫停執行。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">EnablePauseOnFailure = true; // 或 false
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 啟用失敗時暫停
|
||||
EnablePauseOnFailure = true;
|
||||
EnableCollisionDetection = true;
|
||||
PlayNcFile("NC/file1.nc"); // 如果發生碰撞,會暫停執行
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="使用建議">使用建議</h2>
|
||||
<ul>
|
||||
<li><strong>EnablePhysics</strong>: 需要計算銑削力時啟用,會增加計算時間</li>
|
||||
<li><strong>EnableWearEffect</strong>: 需要模擬刀具磨耗時啟用</li>
|
||||
<li><strong>MillingForceCycleDivisionNum</strong>: 數值越大,計算越精確但速度越慢</li>
|
||||
<li><strong>InitSpindleTemperature_C</strong>: 用於熱仿真,影響刀具溫度計算</li>
|
||||
<li><strong>EnablePauseOnFailure</strong>: 用於除錯,當發生錯誤(如碰撞)時暫停執行</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>物理仿真會增加計算時間,但可以提供更準確的加工力、溫度等資訊。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>執行CSV檔 | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="執行CSV檔 | 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="Cmd-PlayCsvFile">
|
||||
<h1 id="執行csv檔">執行CSV檔</h1>
|
||||
|
||||
<p>以CSV格式檔案驅動仿真。</p>
|
||||
<p>執行NC檔指令為 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayCsvFile_">PlayCsvFile</a><small>(API)</small>,<檔案路徑> 的根目錄為專案目錄。</p>
|
||||
<p>指令格式:</p>
|
||||
<pre><code class="lang-csharp">PlayCsvFile(<檔案路徑>);
|
||||
</code></pre>
|
||||
<p>指令範例:</p>
|
||||
<pre><code class="lang-csharp">PlayCsvFile("Data/file1.csv");
|
||||
</code></pre>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>本撥放器可直接讀取<a class="xref" href="../WriteStepFiles/index.html">輸出步資料檔案</a>匯出之檔案。</p>
|
||||
</div>
|
||||
<h2 id="檔案格式">檔案格式</h2>
|
||||
<p>驅動的CSV檔案為逗號分隔,第一列須為標頭列。其餘每列為一步。標頭大小寫不同,會被視為不同資料。</p>
|
||||
<h2 id="驅動欄位">驅動欄位</h2>
|
||||
<p>依預設設定,關鍵的 CSV 欄位標題如下。這些欄位的資料會驅動模擬。欄位順序可自由更動。
|
||||
這些欄位標題可以在 <code>.hincproj</code> 的 <code>CsvRunnerConfig</code> 中更改。</p>
|
||||
<ul>
|
||||
<li>機械座標
|
||||
<code>MC.X</code>, <code>MC.Y</code>, <code>MC.Z</code>, <code>MC.A</code>, <code>MC.B</code>, <code>MC.C</code>
|
||||
如無可略過,比方說三軸機台就不需要旋轉軸欄位<code>MC.A</code>, <code>MC.B</code>, <code>MC.C</code></li>
|
||||
<li>刀號 <code>ToolId</code></li>
|
||||
<li>轉速 <code>SpindleSpeed_rpm</code></li>
|
||||
<li>進給率 <code>Feedrate_mmdmin</code></li>
|
||||
</ul>
|
||||
<h3 id="時間欄位">時間欄位</h3>
|
||||
<ul>
|
||||
<li>實際加工時間 <code>ActualTime</code>
|
||||
如已有<code>StepDuration</code>,本欄位可略過,系統將自動計算步時長。
|
||||
如僅有<code>ActualTime</code>而無<code>StepDuration</code>,系統會自動從連續的實際時間計算步時長。</li>
|
||||
<li>步時長 <code>StepDuration</code>
|
||||
如已有<code>ActualTime</code>,本欄位可略過。</li>
|
||||
</ul>
|
||||
<p>實際加工時間與步時長欄位可同時存在。系統會優先使用<code>StepDuration</code>,若無則從<code>ActualTime</code>自動計算。</p>
|
||||
<h2 id="自訂欄位">自訂欄位</h2>
|
||||
<p>其他資料如感測器、事後分析資料等也可放入CSV檔中,系統支援該資料的工件顏色梯度圖、時間序列圖、點選追蹤功能。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><a href="example.csv">本範例檔案</a>為可驅動系統的CSV檔案。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>執行NC碼字串 | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="執行NC碼字串 | 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="Cmd-PlayNc">
|
||||
<h1 id="執行nc碼字串">執行NC碼字串</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayNc_">PlayNc</a><small>(API)</small> 允許直接執行NC碼字串,無需從檔案讀取。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNc(<NC碼字串>, <檔案名稱替代>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNc("G01 X10 Y20 F100", "Direct Command");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="參數說明">參數說明</h2>
|
||||
<ul>
|
||||
<li><code><NC碼字串></code>: 要執行的NC碼內容</li>
|
||||
<li><code><檔案名稱替代></code>: 在日誌中顯示的名稱(可選,預設為 "–")</li>
|
||||
</ul>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>動態生成NC碼範例</strong></p>
|
||||
<pre><code class="lang-csharp">double x = 10.0;
|
||||
double y = 20.0;
|
||||
double feedrate = 100.0;
|
||||
PlayNc($"G01 X{x} Y{y} F{feedrate}", "Generated Command");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="與-playncfile-的差異">與 PlayNcFile 的差異</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../PlayNcFile/index.html">執行NC檔</a>: 從檔案讀取並執行NC碼</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayNc_">PlayNc</a><small>(API)</small>: 直接執行字串形式的NC碼</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>
|
||||
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>執行NC檔 | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="執行NC檔 | 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="Cmd-PlayNcFile">
|
||||
<h1 id="執行nc檔">執行NC檔</h1>
|
||||
|
||||
<p>執行NC檔指令為 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayNcFile_">PlayNcFile</a><small>(API)</small>,<檔案路徑> 的根目錄為專案目錄。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile(<檔案路徑>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,178 @@
|
||||
<!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 "{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="Cmd-PlayerControl">
|
||||
<h1 id="播放器控制">播放器控制</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個方法來控制加工模擬的播放器行為。</p>
|
||||
<h2 id="pace">Pace</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pace_">Pace</a><small>(API)</small> 是播放過程中的可暫停標記點。此函數使 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pause_">Pause</a><small>(API)</small> 能夠生效。執行時會等待播放器發出下一個步調信號。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">Pace();
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 在執行NC檔案時插入可暫停標記點
|
||||
var actions = RunNcFile("NC/file1.nc");
|
||||
foreach (var action in actions)
|
||||
{
|
||||
action();
|
||||
Pace(); // 插入可暫停標記點,使 Pause() 能夠在此處生效
|
||||
}
|
||||
</code></pre>
|
||||
<p>相關 API:<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_RunNcFile_">RunNcFile</a><small>(API)</small></p>
|
||||
</div>
|
||||
<h2 id="pause">Pause</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pause_">Pause</a><small>(API)</small> 暫停播放器執行。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">Pause();
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
// 在某個條件下暫停
|
||||
if (someCondition)
|
||||
{
|
||||
Pause();
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="reset">Reset</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Reset_">Reset</a><small>(API)</small> 重置播放器狀態。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">Reset();
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 重置播放器並重新開始
|
||||
Reset();
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="使用場景">使用場景</h2>
|
||||
<ul>
|
||||
<li><strong>Pace</strong>: 用於在執行過程中插入可暫停標記點,使 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pause_">Pause</a><small>(API)</small> 能夠生效,例如與 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_RunNcFile_">RunNcFile</a><small>(API)</small> 或 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_RunNc_">RunNc</a><small>(API)</small> 配合使用</li>
|
||||
<li><strong>Pause</strong>: 用於在特定條件下暫停執行</li>
|
||||
<li><strong>Reset</strong>: 用於重置播放器狀態,準備重新執行</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>
|
||||
@@ -0,0 +1,164 @@
|
||||
<!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 "{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="Cmd-Properties">
|
||||
<h1 id="屬性設定">屬性設定</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個屬性用於配置加工參數和行為。</p>
|
||||
<h2 id="系統屬性">系統屬性</h2>
|
||||
<h3 id="global">Global</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Global">Global</a><small>(API)</small> 全域變數字典,用於在腳本執行期間儲存和共享資料。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">Global["key"] = value;
|
||||
var value = Global["key"];
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 儲存全域變數
|
||||
Global["workpieceMaterial"] = "Steel";
|
||||
Global["cuttingSpeed"] = 100.0;
|
||||
|
||||
// 讀取全域變數
|
||||
var material = Global["workpieceMaterial"];
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="machiningsession">MachiningSession</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningSession">MachiningSession</a><small>(API)</small> 取得當前的加工會話物件。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var session = MachiningSession;
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="工件與夾具">工件與夾具</h2>
|
||||
<h3 id="workpiece">Workpiece</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Workpiece">Workpiece</a><small>(API)</small> 取得或設定工件物件。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var workpiece = Workpiece;
|
||||
Workpiece = newWorkpiece;
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="fixture">Fixture</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Fixture">Fixture</a><small>(API)</small> 取得或設定夾具物件。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var fixture = Fixture;
|
||||
Fixture = newFixture;
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,189 @@
|
||||
<!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 "{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="Cmd-Resolution">
|
||||
<h1 id="仿真解析度">仿真解析度</h1>
|
||||
|
||||
<p>仿真解析度可分為<a href="../RuntimeGeom/index.html">程序幾何</a>的<strong>實體解析度</strong>、程序幾何的<strong>顯示解析度</strong>、<strong>加工運動解析度</strong>。</p>
|
||||
<h2 id="程序幾何實體解析度">程序幾何實體解析度</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningResolution_mm">MachiningResolution_mm</a><small>(API)</small> 設定程序幾何實體解析度。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">MachiningResolution_mm = <實數>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">MachiningResolution_mm = 0.125;
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>工件網格由正立方體組成,工件實體解析度為最小工件網格立方體的寬度。</p>
|
||||
<p>網格立方體的寬度僅能為2的指數,包含 ..., 4, 2, 1, 0.5, 0.25, 0.125, ... 。如果設置的值不是2的指數,則系統會將其調整為2的指數。</p>
|
||||
<p>工件實體解析度越高,切削時計算量越大、仿真速度越慢。</p>
|
||||
<p>工件實體解析度每增加一倍,需要至多8倍的材料移除演算時間與RAM記憶體空間。</p>
|
||||
<h2 id="工件顯示暫存組態">工件顯示暫存組態</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_DispCache_Mb">DispCache_Mb</a><small>(API)</small> 設定工件顯示暫存組態。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">DispCache_Mb = <實數(Mb)>;
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">DispCache_Mb = 260;
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>工件網格的顯示解析度由暫存空間的大小決定。</p>
|
||||
<p>顯示網格是基於實體網格,所以顯示網格不會小於實體網格。</p>
|
||||
<p>數值設置越大,顯示延遲越長,建議數值不超過1000Mb。</p>
|
||||
<h2 id="加工運動解析度">加工運動解析度</h2>
|
||||
<p><a id="MotionResolution"></a></p>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningMotionResolution">MachiningMotionResolution</a><small>(API)</small> 設定加工運動解析度,決定仿真的每步間隔。
|
||||
有以下項目可選擇,預設值為<strong>每刃進給</strong>。</p>
|
||||
<ul>
|
||||
<li><strong>每轉進給</strong>(Feed Per Cycle)
|
||||
一步為主軸一轉。</li>
|
||||
<li><strong>縮放每轉進給</strong>(Scaled Feed Per Cycle)
|
||||
一步為主軸一轉乘以縮放係數。例如縮放係數為0.5時,一步為主軸半轉。</li>
|
||||
<li><strong>每刃進給</strong>(Feed Per Tooth)
|
||||
一步為刀刃一轉。</li>
|
||||
<li><strong>固定解析度</strong>(Fixed Resolution)
|
||||
固定解析度在仿真時採用<strong>掃掠</strong>,兩步間沒有殘丘。
|
||||
其中<strong>線性解析度</strong>(Linear Resolution)為兩步間最大直線距離;<strong>旋轉解析度</strong>(Rotary Resolution)為兩步間最大旋轉角度。</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">MachiningMotionResolution = <運動解析度物件>;
|
||||
|
||||
MachiningMotionResolution = FeedPerCycle;
|
||||
MachiningMotionResolution = ScaledFeedPerCycle(<縮放係數>);
|
||||
MachiningMotionResolution = FeedPerTooth;
|
||||
MachiningMotionResolution = FixedPace(<線性解析度(mm)>, <旋轉解析度(deg)>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">MachiningMotionResolution = FeedPerCycle;
|
||||
MachiningMotionResolution = ScaledFeedPerCycle(0.5);
|
||||
MachiningMotionResolution = FixedPace(1, 15);
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="仿真效率">仿真效率</h2>
|
||||
<p>物理仿真採用平行處理,在大部分情況下不影響仿真速度,持續的高解析度大面積切削會出現暫時卡頓。</p>
|
||||
<p>與市面其他仿真軟件不同,HiNC的仿真使用體模型,刀具與工件接觸範圍越小,仿真速度越快。
|
||||
五軸切削仿真的速度會快於大面銑刀的仿真速度。</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>
|
||||
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1,151 @@
|
||||
<!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 "{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="Cmd-RuntimeGeom">
|
||||
<h1 id="程序幾何">程序幾何</h1>
|
||||
|
||||
<p>程序幾何(RuntimeGeom)是工件幾何在HiNC仿真運作期間的資料格式,由大小不一的正立方線架構網格組成。</p>
|
||||
<figure class="alert text-bg-light">
|
||||
<img src="cubesolid.png" alt="cubesolid.png">
|
||||
<figcaption>程序幾何外觀</figcaption>
|
||||
</figure>
|
||||
<figure class="alert text-bg-light">
|
||||
<img src="cubewire.png" alt="cubewire.png">
|
||||
<figcaption>程序幾何的正立方線架構網格</figcaption>
|
||||
</figure>
|
||||
<h2 id="讀寫程序幾何">讀寫程序幾何</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ReadRuntimeGeom_">ReadRuntimeGeom</a><small>(API)</small>、<a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_WriteRuntimeGeom_">WriteRuntimeGeom</a><small>(API)</small>可以讀寫程序幾何至檔案。</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_WriteRuntimeGeomToStl_">WriteRuntimeGeomToStl</a><small>(API)</small>可以將程序幾何轉換為STL並寫入檔案。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">WriteRuntimeGeom(<檔案路徑>);
|
||||
ReadRuntimeGeom(<檔案路徑>);
|
||||
WriteRuntimeGeomToStl(<檔案路徑>, <解析度(mm)> = 0);
|
||||
</code></pre>
|
||||
<p><檔案路徑> 的根目錄為專案目錄。</p>
|
||||
<p><解析度> 輸出STL時依據的最小工件網格立方體寬度。
|
||||
該寬度不小於<a href="../Resolution/index.html">實體解析度</a>。若設定本參數小於實體解析度,則等同於設定為實體解析度。
|
||||
預設值為0,意同採用實體解析度。
|
||||
解析度越大,則檔案生成速度越快、佔用記憶體空間越小。</p>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">ReadRuntimeGeom("Cache/init.wct");
|
||||
PlayNcFile("NC/file1.nc");
|
||||
WriteRuntimeGeom("Cache/file1.wct");
|
||||
WriteRuntimeGeomToStl("Output/file1.stl");
|
||||
</code></pre>
|
||||
<p>在仿真開始時,會將幾何模型轉換為程序幾何,轉換時間會依照初始解析度及幾何複雜度有所不同。</p>
|
||||
<p>如果工件模型會重複使用且轉換時間很長,可以在腳本執行NC指令前搭配使用<code>ReadRuntimeGeom</code>、<code>WriteRuntimeGeom</code>,節省等待時間。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,152 @@
|
||||
<!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 "{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="Cmd-RuntimeManagement">
|
||||
<h1 id="運行時管理">運行時管理</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個方法來管理加工仿真的運行時狀態。</p>
|
||||
<h2 id="resetruntime">ResetRuntime</h2>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ResetRuntime_">ResetRuntime</a><small>(API)</small> 清除內部緩衝區和運行時狀態。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">ResetRuntime();
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 執行第一個NC檔案
|
||||
PlayNcFile("NC/file1.nc");
|
||||
WriteStepFiles("Output/file1.step.csv");
|
||||
|
||||
// 重置運行時狀態
|
||||
ResetRuntime();
|
||||
|
||||
// 執行第二個NC檔案(從乾淨狀態開始)
|
||||
PlayNcFile("NC/file2.nc");
|
||||
WriteStepFiles("Output/file2.step.csv");
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><code>ResetRuntime()</code> 會清除:</p>
|
||||
<ul>
|
||||
<li>事件處理器(<code>MachiningStepBuilt</code>、<code>MachiningStepSelected</code>)</li>
|
||||
<li>內部緩衝區</li>
|
||||
<li>運行時狀態</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2 id="使用場景">使用場景</h2>
|
||||
<ul>
|
||||
<li><strong>ResetRuntime</strong>: 用於在多個NC檔案之間重置狀態,確保每個檔案從乾淨狀態開始執行</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>
|
||||
@@ -0,0 +1,225 @@
|
||||
<!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 "{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="Cmd-StepVariables">
|
||||
<h1 id="加工步變數">加工步變數</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個方法來處理和存取加工步的變數。</p>
|
||||
<h2 id="預設步輸出資訊">預設步輸出資訊</h2>
|
||||
<p>每個加工步都包含豐富的預設輸出資訊,涵蓋來源行、運動學、載荷、力/力矩、功率、熱與磨耗等。</p>
|
||||
<p>完整的預設步輸出資訊說明,請參考 <a class="xref" href="../../output/simulation-step-output.html">仿真步輸出資訊(Simulation Step Output)</a>。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>存取預設步資訊範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
|
||||
// 取得步並存取預設資訊
|
||||
var step = GetMillingStep(100); // 見下方「存取步資訊」
|
||||
if (step != null)
|
||||
{
|
||||
// 存取預設的步資訊
|
||||
Message($"ToolId: {step.ToolId}");
|
||||
Message($"Feedrate: {step.Feedrate_mmdmin} mm/min");
|
||||
Message($"ChipVolume: {step.ChipVolume_mm3} mm³");
|
||||
Message($"MaxAbsForce: {step.MaxAbsForce_N} N");
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="註冊步變數">註冊步變數</h2>
|
||||
<p>除了預設的步輸出資訊外,您可以使用 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_RegisterStepVariable_">RegisterStepVariable</a><small>(API)</small> 註冊自訂的步變數,用於追蹤特定的計算結果或資料。</p>
|
||||
<p>註冊的步變數主要用於人類檢視,可透過工件幾何體上的顏色顯示數值分布。搭配 <a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_Item_System_String_">this[string]</a><small>(API)</small> 索引器可實現完整的資料檢查功能:</p>
|
||||
<ul>
|
||||
<li><code>RegisterStepVariable</code>:註冊變數供介面顯示及輸出</li>
|
||||
<li><code>MachiningStep[key]</code>:在腳本中讀寫步的自訂資料</li>
|
||||
</ul>
|
||||
<h3 id="registerstepvariable">RegisterStepVariable</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_RegisterStepVariable_">RegisterStepVariable</a><small>(API)</small> 註冊一個步變數,用於在執行過程中追蹤特定資料。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">RegisterStepVariable(<鍵值>, <名稱>, <單位>, <格式字串>, <變數函數>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 註冊一個計算切削體積的步變數
|
||||
RegisterStepVariable(
|
||||
"ChipVolume",
|
||||
"Chip Volume",
|
||||
"mm3",
|
||||
"F2",
|
||||
(step) => step.ChipVolume_mm3
|
||||
);
|
||||
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="參數說明">參數說明</h3>
|
||||
<ul>
|
||||
<li><code><鍵值></code>: 變數的唯一識別碼</li>
|
||||
<li><code><名稱></code>: 變數的顯示名稱</li>
|
||||
<li><code><單位></code>: 變數的物理單位(可為 null)</li>
|
||||
<li><code><格式字串></code>: 數值格式化字串(可為 null)</li>
|
||||
<li><code><變數函數></code>: 從步計算變數值的函數(可為 null)</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>註冊的步變數可以在輸出檔案(如 <a class="xref" href="../WriteStepFiles/index.html">輸出步資料檔案</a>)中使用,並在介面中顯示。</p>
|
||||
</div>
|
||||
<h2 id="存取步資訊">存取步資訊</h2>
|
||||
<h3 id="getmillingstep">GetMillingStep</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_GetMillingStep_">GetMillingStep</a><small>(API)</small> 取得指定索引的加工步。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var step = GetMillingStep(<步索引>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
|
||||
// 取得第100個步
|
||||
var step = GetMillingStep(100);
|
||||
if (step != null)
|
||||
{
|
||||
Message($"Step 100: ToolId={step.ToolId}, Feedrate={step.Feedrate_mmdmin}");
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="stepcount">StepCount</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_StepCount">StepCount</a><small>(API)</small> 取得總步數量。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var count = StepCount;
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">PlayNcFile("NC/file1.nc");
|
||||
|
||||
// 取得總步數
|
||||
var totalSteps = StepCount;
|
||||
Message($"Total steps: {totalSteps}");
|
||||
|
||||
// 遍歷所有步
|
||||
for (int i = 0; i < StepCount; i++)
|
||||
{
|
||||
var step = GetMillingStep(i);
|
||||
// 處理步...
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,197 @@
|
||||
<!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 "{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="Cmd-ToolSetup">
|
||||
<h1 id="刀具與智慧刀把設置">刀具與智慧刀把設置</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 提供了多個方法來設定和查詢刀具安裝參數及智慧刀把觀察位置。</p>
|
||||
<h2 id="刀具輪廓偏移角度">刀具輪廓偏移角度</h2>
|
||||
<h3 id="getuniformcontourtrayshiftangle_deg">GetUniformContourTrayShiftAngle_deg</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_GetUniformContourTrayShiftAngle_deg_">GetUniformContourTrayShiftAngle_deg</a><small>(API)</small> 取得指定刀具的輪廓偏移角度(度)。此角度用於調整刀具安裝時的初始角度位置。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var angle = GetUniformContourTrayShiftAngle_deg(<刀具ID>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 查詢刀具1的輪廓偏移角度
|
||||
var angle = GetUniformContourTrayShiftAngle_deg(1);
|
||||
Message($"刀具1的輪廓偏移角度: {angle} 度");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="setuniformcontourtrayshiftangle_deg">SetUniformContourTrayShiftAngle_deg</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_SetUniformContourTrayShiftAngle_deg_">SetUniformContourTrayShiftAngle_deg</a><small>(API)</small> 設定指定刀具的輪廓偏移角度(度)。當刀具安裝角度與預設值不同時,可使用此方法調整。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">SetUniformContourTrayShiftAngle_deg(<刀具ID>, <角度>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 設定刀具1的輪廓偏移角度為10度
|
||||
SetUniformContourTrayShiftAngle_deg(1, 10.0);
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="智慧刀把觀察高度">智慧刀把觀察高度</h2>
|
||||
<h3 id="getstickmachiningtoolobservationheight_mm">GetStickMachiningToolObservationHeight_mm</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_GetStickMachiningToolObservationHeight_mm_">GetStickMachiningToolObservationHeight_mm</a><small>(API)</small> 取得指定智慧刀把的觀察高度(毫米)。觀察高度是指智慧刀把感測器相對於安裝錨點的高度位置。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">var height = GetStickMachiningToolObservationHeight_mm(<刀具ID>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 查詢智慧刀把1的觀察高度
|
||||
var height = GetStickMachiningToolObservationHeight_mm(1);
|
||||
Message($"智慧刀把1的觀察高度: {height} 毫米");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h3 id="setstickmachiningtoolobservationheight_mm">SetStickMachiningToolObservationHeight_mm</h3>
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_SetStickMachiningToolObservationHeight_mm_">SetStickMachiningToolObservationHeight_mm</a><small>(API)</small> 設定指定智慧刀把的觀察高度(毫米)。當智慧刀把安裝位置與預設值不同時,可使用此方法調整觀察高度。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">SetStickMachiningToolObservationHeight_mm(<刀具ID>, <高度>);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">// 設定智慧刀把1的觀察高度為50毫米
|
||||
SetStickMachiningToolObservationHeight_mm(1, 50.0);
|
||||
PlayNcFile("NC/file1.nc");
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2 id="使用說明">使用說明</h2>
|
||||
<p>這些設置功能用於:</p>
|
||||
<ul>
|
||||
<li><strong>刀具安裝角度調整</strong>:當刀具實際安裝角度與刀具檔案中的預設角度不同時,可透過設定輪廓偏移角度來校正</li>
|
||||
<li><strong>智慧刀把安裝位置調整</strong>:當智慧刀把的感測器安裝高度與預設值不同時,可透過設定觀察高度來校正</li>
|
||||
<li><strong>動態配置</strong>:在腳本執行過程中根據實際安裝情況動態調整參數</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>這些參數通常應在刀具設定檔案中配置。只有在需要根據實際安裝情況動態調整時,才使用這些腳本指令。</p>
|
||||
</div>
|
||||
<div class="WARNING">
|
||||
<h5>Warning</h5>
|
||||
<p>如果指定的刀具不存在或不是支援的類型(如非銑刀或非智慧刀把),這些方法會拋出異常。</p>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,144 @@
|
||||
<!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 "{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="Cmd-WriteShotFiles">
|
||||
<h1 id="輸出波形資料檔案">輸出波形資料檔案</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_WriteShotFiles_">WriteShotFiles</a><small>(API)</small> 輸出波形資料檔案。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">WriteShotFiles(<路徑樣板="Output/[NcName].shot.csv">, <時間解析度(ms)> = 1);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><路徑樣板>支援 <a href="../Doc-Task/index.html#FileTemplate">檔案路徑樣板</a>。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">WriteShotFiles("Output/[NcName].shot.csv", 1);
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>輸出範例</strong></p>
|
||||
<pre><code class="lang-csv">FileNo,LineNo,Time,X,Y,Z,A,B,C,Tool.Fx,Tool.Fy,Tool.Fz,Workpiece.Fx,Workpiece.Fy,Workpiece.Fz,Spindle.Mx,Spindle.My,Spindle.Mz
|
||||
1,6,00:00:00,0,0,0,NaN,NaN,NaN,0,0,0,0,0,0,0,0,0
|
||||
1,6,00:00:00.0010000,0,0,0.3703703703703703,NaN,NaN,NaN,0,0,0,0,0,0,0,0,0
|
||||
1,6,00:00:00.0020000,0,0,0.7407407407407406,NaN,NaN,NaN,0,0,0,0,0,0,0,0,0
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><code>X</code>、<code>Y</code>、<code>Z</code>、<code>A</code>、<code>B</code>、<code>C</code> 為機械座標。</p>
|
||||
<p><code>Tool.Fx</code>、<code>Tool.Fy</code>、<code>Tool.Fz</code>為刀具行進座標上的刀具受力,單位N。</p>
|
||||
<p><code>Workpiece.Fx</code>、<code>Workpiece.Fy</code>、<code>Workpiece.Fz</code>為工件座標上的工件受力,單位N,相當於動力計輸出資料。</p>
|
||||
<p><code>Spindle.Mx</code>、<code>Spindle.My</code>、<code>Spindle.Mz</code>為觀察點上主軸旋轉座標的主軸受力矩,相當於智慧刀把輸出資料。</p>
|
||||
<p>座標系說明見<a href="../../theory-and-technique/milling-physics-coordinates.html">銑削物理座標系</a>。</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>
|
||||
@@ -0,0 +1,141 @@
|
||||
<!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 "{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="Cmd-WriteStepFiles">
|
||||
<h1 id="輸出步資料檔案">輸出步資料檔案</h1>
|
||||
|
||||
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_WriteStepFiles_">WriteStepFiles</a><small>(API)</small> 輸出步資料檔案。</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>指令格式</strong></p>
|
||||
<pre><code class="lang-csharp">WriteStepFiles(<路徑樣板="Output/[NcName].step.csv">);
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><路徑樣板>支援 <a href="../Doc-Task/index.html#FileTemplate">檔案路徑樣板</a>。</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>指令範例</strong></p>
|
||||
<pre><code class="lang-csharp">WriteStepFiles("Output/[NcName].step.csv");
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p><strong>輸出範例</strong></p>
|
||||
<pre><code class="lang-csv">AccumulatedCraterWear_um,AccumulatedFlankWearDepth_um,AccumulatedFlankWearWidth_um,AccumulatedSpindleEnergyConsumption_kWh,AccumulatedTime,AvgAbsMomentAboutSensorVec3d_Nm.X,AvgAbsMomentAboutSensorVec3d_Nm.Y,AvgAbsMomentAboutSensorVec3d_Nm.Z,AvgAbsMomentXAboutSensorOnSpindleRotationCoordinate_Nm,AvgAbsMomentXAboutToolTipOnSpindleRotationCoordinate_Nm,AvgAbsTorque_Nm,AvgAbsTorqueByMapping_Nm,AvgAbsTorqueErrorRatioWithMapping,AvgForceToToolOnToolRunningCoordinate_N.X,AvgForceToToolOnToolRunningCoordinate_N.Y,AvgForceToToolOnToolRunningCoordinate_N.Z,AvgMomentAboutSensor_Nm,AvgMomentAboutToolTip_Nm,AvgMomentAboutToolTipOnToolRunningCoordinate_Nm.X,AvgMomentAboutToolTipOnToolRunningCoordinate_Nm.Y,AvgMomentAboutToolTipOnToolRunningCoordinate_Nm.Z,AvgMomentAboutToolTipOnWorkpieceGeomCoordinate_Nm.X,AvgMomentAboutToolTipOnWorkpieceGeomCoordinate_Nm.Y,AvgMomentAboutToolTipOnWorkpieceGeomCoordinate_Nm.Z,AvgMomentXyAboutObservationPoint_Nm,AvgMomentXyByMapping_Nm,AvgMomentXyErrorRatioWithMapping,BeginSpindleAngle_deg,ChipMass_mg,ChipTemperature_C,ChipThickness_mm,ChipVolume_mm3,Cl.I,Cl.J,Cl.K,Cl.X,Cl.Y,Cl.Z,CutterBodyTemperature_C,CutterDermisTemperature_C,CuttingDepth_mm,CuttingSpeed_mmds,CuttingWidth_mm,DeltaTipDeflectionOnToolRunningCoordinate_um.X,DeltaTipDeflectionOnToolRunningCoordinate_um.Y,DeltaTipDeflectionOnToolRunningCoordinate_um.Z,FeedPerCycle_mm,FeedPerTooth_mm,Feedrate_mmdmin,FileNo,FilePath,FlagsText,InstantCraterWear_um,IsTouched,LineNo,LineText,MaxAbsForce_N,MaxMomentAboutSensor_Nm,MaxMomentAboutToolTip_Nm,MaxSpindlePowerRatio,MaxSpindleTorqueRatio,MaxTipDeflectionOnToolRunningCoordinate_um.X,MaxTipDeflectionOnToolRunningCoordinate_um.Y,MaxTipDeflectionOnToolRunningCoordinate_um.Z,MC.B,MC.C,MC.X,MC.Y,MC.Z,MoveOnWorkpieceCoordinate.X,MoveOnWorkpieceCoordinate.Y,MoveOnWorkpieceCoordinate.Z,MovingLength_mm,Mrr_mm3ds,ReCutDepth_um,Side-Ra,SideCusp_um,SpindleCyclePeriod_s,SpindleInputPower_W,SpindleOutputPower_W,SpindleSpeed_rpm,StepDuration,ThermalCrackRatio,ThermalStress_MPa,ToolId,ToothArcDuration_s,WorkpieceDermisTemperature_C,WorkpiecePlasticDepth_um,YieldingStressRatio
|
||||
0,0,0,0,"00:00:00",0,0,0,0,0,0,null,null,0,0,0,0,0,0,0,0,0,0,0,0,null,null,0,0,"NaN",null,0,0,0,1,-37.400000000000006,97.4,63.44,25,25,0,0,0,0,0,0,"Infinity","Infinity",20000,1,"NC-hs/hs.nc","G54 G01 G17 G40 G49 G69 G80 G91 G94 M06 SpindleStop",0,0,4,"T01 M06",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Infinity",0,0,0,"00:00:00",0,0,1,"Infinity",25,0,0
|
||||
0,0,0,0,"00:00:00.0300000",0,0,0,0,0,0,null,null,0,0,0,0,0,0,0,0,0,0,0,0,null,null,171.9,0,"NaN",null,0,0,0,1,-37.400000000000006,97.4,73.44,25,25,0,63.666666666666664,0,0,0,0,20.942408376963353,5.235602094240838,20000,1,"NC-hs/hs.nc","G54 G01 G17 G40 G43 G69 G80 G91 G94 SpindleCw H1",0,0,7,"G43 Z10. H01",0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,10,10,0,0,0,0,0.06282722513089005,0,0,955,"00:00:00.0300000",0,0,1,0.015706806282722512,25,0,0
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><code>Cl.X</code>、<code>Cl.Y</code>、<code>Cl.Z</code>、<code>Cl.I</code>、<code>Cl.J</code>、<code>Cl.K</code> 為刀尖點座標(Cutter Location)及刀軸向量。</p>
|
||||
<p><code>MC.X</code>、<code>MC.Y</code>、<code>MC.Z</code>、<code>MC.A</code>、<code>MC.B</code>、<code>MC.C</code> 為機械座標(Machine Coordinate)。</p>
|
||||
<p>座標系說明見<a href="../../theory-and-technique/milling-physics-coordinates.html">銑削物理座標系</a>。</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>
|
||||
@@ -0,0 +1,183 @@
|
||||
<!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 "{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="Doc-Script">
|
||||
<h1 id="腳本命令">腳本命令</h1>
|
||||
|
||||
<p>腳本命令是 HiNC 中執行加工仿真的核心功能。腳本使用 C# 語言編寫,可以直接調用 <a class="xref" href="../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 的成員屬性和成員函數。</p>
|
||||
<h2 id="快速開始">快速開始</h2>
|
||||
<p>如果您是第一次使用腳本功能,建議先閱讀:</p>
|
||||
<ol>
|
||||
<li><strong><a href="Doc-Task/index.html">文件任務</a></strong> - 了解腳本的基本語法、執行順序和檔案路徑樣板</li>
|
||||
<li><strong><a href="PlayNcFile/index.html">執行NC檔案</a></strong> - 學習如何執行 NC 檔案進行仿真</li>
|
||||
</ol>
|
||||
<h2 id="命令分類">命令分類</h2>
|
||||
<h3 id="執行與控制">執行與控制</h3>
|
||||
<ul>
|
||||
<li><strong><a href="Doc-Task/index.html">文件任務</a></strong> - 腳本語法、執行順序、檔案路徑樣板</li>
|
||||
<li><strong><a href="PlayNcFile/index.html">執行NC檔案</a></strong> - 執行 NC 檔案進行仿真</li>
|
||||
<li><strong><a href="PlayNc/index.html">執行NC碼字串</a></strong> - 直接執行 NC 碼字串</li>
|
||||
<li><strong><a href="PlayCsvFile/play-csv-file.html">執行CSV檔案</a></strong> - 以 CSV 格式檔案驅動仿真</li>
|
||||
<li><strong><a href="PlayerControl/index.html">播放器控制</a></strong> - 控制播放器的執行速度、暫停和重置</li>
|
||||
</ul>
|
||||
<h3 id="事件與訊息">事件與訊息</h3>
|
||||
<ul>
|
||||
<li><strong><a href="Events/index.html">事件處理</a></strong> - 在加工過程中執行自訂邏輯</li>
|
||||
<li><strong><a href="Messages/index.html">訊息處理</a></strong> - 顯示和管理訊息</li>
|
||||
</ul>
|
||||
<h3 id="屬性與變數">屬性與變數</h3>
|
||||
<ul>
|
||||
<li><strong><a href="Properties/index.html">屬性設定</a></strong> - 配置加工參數和行為</li>
|
||||
<li><strong><a href="StepVariables/index.html">步階變數</a></strong> - 處理和存取加工步階的變數</li>
|
||||
</ul>
|
||||
<h3 id="動作與操作">動作與操作</h3>
|
||||
<ul>
|
||||
<li><strong><a href="RuntimeManagement/index.html">運行時管理</a></strong> - 管理加工仿真的運行時狀態</li>
|
||||
<li><strong><a href="ActOperations/index.html">動作操作</a></strong> - 執行特定的加工動作</li>
|
||||
<li><strong><a href="RuntimeGeom/index.html">運行時幾何</a></strong> - 讀寫程序幾何檔案</li>
|
||||
<li><strong><a href="FlyPiece/index.html">離料</a></strong> - 移除五軸切削過程中的懸浮留料</li>
|
||||
</ul>
|
||||
<h3 id="幾何">幾何</h3>
|
||||
<ul>
|
||||
<li><strong><a href="Resolution/index.html">解析度</a></strong> - 設定仿真解析度(實體解析度、顯示解析度、加工運動解析度)</li>
|
||||
<li><strong><a href="Collision/index.html">碰撞檢測</a></strong> - 啟用碰撞檢測功能</li>
|
||||
<li><strong><a href="GeomDiff/index.html">幾何差異</a></strong> - 比對工件目標形狀與仿真後形狀</li>
|
||||
</ul>
|
||||
<h3 id="物理">物理</h3>
|
||||
<ul>
|
||||
<li><strong><a href="Physics/index.html">物理仿真設定</a></strong> - 配置物理仿真的行為</li>
|
||||
<li><strong><a href="LoadCuttingPara/index.html">載入切削參數</a></strong> - 從檔案載入切削參數到工件</li>
|
||||
</ul>
|
||||
<h3 id="外部資料與模型訓練">外部資料與模型訓練</h3>
|
||||
<ul>
|
||||
<li><strong><a href="Mapping/index.html">映射</a></strong> - 將外部資料對應於仿真路徑</li>
|
||||
<li><strong><a href="MillingTraining/index.html">銑削訓練</a></strong> - 訓練與校正銑削係數</li>
|
||||
</ul>
|
||||
<h3 id="優化">優化</h3>
|
||||
<ul>
|
||||
<li><strong><a href="NcOptimization/index.html">NC優化</a></strong> - NC 碼優化設定與輸出</li>
|
||||
</ul>
|
||||
<h3 id="輸出">輸出</h3>
|
||||
<ul>
|
||||
<li><strong><a href="WriteShotFiles/index.html">輸出Shot檔案</a></strong> - 輸出波形資料檔案</li>
|
||||
<li><strong><a href="WriteStepFiles/index.html">輸出Step檔案</a></strong> - 輸出步資料檔案</li>
|
||||
</ul>
|
||||
<h3 id="工具設定">工具設定</h3>
|
||||
<ul>
|
||||
<li><strong><a href="ToolSetup/index.html">刀具與智慧刀把設置</a></strong> - 設定刀具安裝參數及智慧刀把觀察位置</li>
|
||||
</ul>
|
||||
<h2 id="相關資源">相關資源</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> - 完整的 API 參考文件</li>
|
||||
<li><a href="../output/simulation-step-output.html">模擬步階輸出資訊</a> - 了解步階輸出的詳細資訊</li>
|
||||
<li><a href="../theory-and-technique/milling-physics-coordinates.html">銑削物理座標系</a> - 了解座標系定義</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>
|
||||