This commit is contained in:
2026-01-08 21:07:15 +08:00
parent f7f4fe0aac
commit f81f03cb13
279 changed files with 6575 additions and 5080 deletions
@@ -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 &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../../../../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../../../index.html">
<img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Cmd-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(&quot;NC/file1.nc&quot;);
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(&quot;NC/file1.nc&quot;);
// 在某個條件下暫停
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(&quot;NC/file1.nc&quot;);
</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>