Add RUN precondition gate for 5-axis simulation
This commit is contained in:
54
web-rtcp-5axis-sim-plan/working_run/README.md
Normal file
54
web-rtcp-5axis-sim-plan/working_run/README.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# working_run 运行功能测试与原理记录
|
||||
|
||||
生成时间:2026-06-22
|
||||
|
||||
本目录记录 `web-rtcp-5axis-sim-plan` 本地项目中 G-code 程序加载、解释、`RUN` 执行链路、task/HAL feedback 消费方式,以及当前测试发现的问题。
|
||||
|
||||
## 文件清单
|
||||
|
||||
| 文件 | 用途 |
|
||||
| --- | --- |
|
||||
| `01-run-gcode-execution-principle-and-test.md` | G-code 具体执行过程、`RUN` 执行原理、源码证据、测试观察和问题结论 |
|
||||
| `02-run-preconditions-test-and-implementation-steps.md` | `RUN` 前置条件、INI/机床/五轴运动学确认流程、详细测试用例和编写 `RUN` 程序步骤 |
|
||||
| `03-run-step1-preconditions-complete-next-steps.md` | 本轮已完成的 `RUN` 前置条件 gate、验证结果和下一步接续建议 |
|
||||
|
||||
## 结论摘要
|
||||
|
||||
`RUN` 不应作为第一步实现。正确顺序必须是:
|
||||
|
||||
```text
|
||||
1. 先确定明确的 LinuxCNC INI 文件。
|
||||
2. 由 INI/profile 确定机床类型、坐标轴、joint 配置、HAL/remap/tool-table 资产。
|
||||
3. 由 INI 的 [KINS] KINEMATICS 确定五轴运动学算法和 switchkins 映射。
|
||||
4. 验证对应 LinuxCNC kinematics WASM 已加载,并能产生 source-derived frame。
|
||||
5. 之后才进入 RUN:打开同一 INI 上下文下的 G-code,发送 task command,持续消费 task/HAL/motion feedback。
|
||||
```
|
||||
|
||||
当前项目明确支持的五轴机床上下文是:
|
||||
|
||||
| profile | INI | 机床类型 | 坐标 | 运动学 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `xyzac-trt` | `configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini` | table rotary tilting | `XYZAC` | `xyzac-trt-kins sparm=identityfirst` |
|
||||
| `xyzbc-trt` | `configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini` | table rotary tilting | `XYZBC` | `xyzbc-trt-kins sparm=identityfirst` |
|
||||
|
||||
当前实现已经能显示 G-code 程序文本、当前行、高亮行、DRO、runtime feedback 和 task/HAL 状态。
|
||||
|
||||
但按 `textbak` 接续文件的边界要求,当前 `RUN` 还不是连续的 task/HAL feedback 推送执行模型:
|
||||
|
||||
```text
|
||||
RUN 点击后:
|
||||
1. UI 发送 EMC_TASK_SET_STATE / EMC_TASK_SET_MODE / EMC_TASK_PLAN_RUN;
|
||||
2. store 调用 taskHalRuntime.runCycles({ taskCycles: 5 });
|
||||
3. 随后 readStatus() 一次;
|
||||
4. TASK_HAL_STATUS_APPLIED 将这一次 status 映射到 activeLine / axisPose / velocity / feedback;
|
||||
5. 没有看到 worker 主动持续 postMessage 推送 status;
|
||||
6. 如果没有再次调用 runCycles/readStatus,状态不会继续随真实时间推进。
|
||||
```
|
||||
|
||||
因此,当前问题重点不是“前端是否需要定时器”,而是:
|
||||
|
||||
```text
|
||||
task/HAL runtime 是否能在 G-code 执行期间持续产出状态;
|
||||
UI/store 是否持续消费这些 LinuxCNC-owned 状态;
|
||||
轴值、当前行、速度、DTG、程序时间是否都来自同一条 task/HAL/motion feedback 链。
|
||||
```
|
||||
Reference in New Issue
Block a user