Files
cnc_wams/web-rtcp-5axis-sim-plan/working_run/08-linuxcnc-source-test-assets.md
2026-07-02 08:01:34 -04:00

132 lines
3.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 08 LinuxCNC 源程序测试资产
生成时间2026-06-22
## 1. 选择结果
本轮按用户要求,从 `/home/mes123456/cnc_wams/linuxcnc` LinuxCNC 源程序中选定一组更适合项目测试的真实 RTCP/五轴资产:
```text
INI:
/home/mes123456/cnc_wams/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
G-code:
/home/mes123456/cnc_wams/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/impeller-7bl-xyzac.ngc
```
已复制到 `working_run`
```text
web-rtcp-5axis-sim-plan/working_run/test_linuxcnc_source/xyzac-trt.ini
web-rtcp-5axis-sim-plan/working_run/test_linuxcnc_source/impeller-7bl-xyzac.ngc
```
已移除不合适的短程序副本:
```text
web-rtcp-5axis-sim-plan/working_run/test_linuxcnc_source/xyzac_switchkins_test_1.ngc
```
## 2. 选择原因
选择 `xyzac-trt.ini` + `impeller-7bl-xyzac.ngc`,原因:
```text
1. INI 是 LinuxCNC 官方 5axis table-rotary-tilting 仿真配置。
2. 坐标为 XYZAC与当前项目默认 profile `xyzac-trt` 一致。
3. KINEMATICS = xyzac-trt-kins sparm=identityfirst。
4. 包含完整 M428/M429/M430 remap contract。
5. 包含 HAL_PIN_VARS=1。
6. 包含 motion.analog-out-03 => motion.switchkins-type HALCMD。
7. G-code 以 M428 ;TCP:xyzac 进入 TCP/RTCP kinematics。
8. G-code 使用 G93 inverse-time feed。
9. G-code 包含大量 XYZAC 五轴联动段。
10. G-code 共 4510 行,比短 switchkins test 程序更适合测试项目功能完整性。
11. G-code 来自 /home/mes123456/cnc_wams/linuxcnc 源程序,不是项目手写 fixture。
```
## 3. 源文件哈希
当前副本与 `/home/mes123456/cnc_wams/linuxcnc` 源文件逐字节一致:
```text
xyzac-trt.ini
sha256=4b7fa6cb8d3e7031e769b3e0c779b586b67cfd45d715985f40d4ec23c662dc97
impeller-7bl-xyzac.ngc
sha256=e90f0b4b6c43809da94a8170ee1029b5afc3e1bbe9bf2ae66298a8baefad013c
```
验证结果:
```text
ini_cmp=0
ngc_cmp=0
```
## 4. 测试覆盖点
这组资产覆盖:
```text
1. LinuxCNC INI definition contract。
2. profile/INI 坐标一致性XYZAC。
3. kinematics module 一致性xyzac-trt。
4. RTCP/TCP kinematics
M428 -> xyzac TCP
5. inverse-time feed
G93
6. 长路径五轴联动:
XYZAC motion lines with A/C rotary axes
7. machine-file staging。
8. taskHalRuntime.openProgram(programPath)。
9. RUN command sequence。
10. taskHalStatusLoop feedback。
11. UI activeLine/DRO/RTCP/runtime feedback same-snapshot 证据。
12. 长路径 preview、执行轨迹、rapid/feed 与五轴姿态变化。
```
## 5. 已运行验证
执行:
```bash
node web-rtcp-5axis-sim-plan/tests/node/verify_real_linuxcnc_5axis_program_cases.mjs
```
结果:
```text
linuxcnc_source_program_case_count=8
all_cases_program_preview_points=ok
all_cases_executed_path_points=ok_after_run_or_step
all_cases_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
all_cases_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
all_switchkins_cases_rtcp_state_changes_verified=1
all_cases_source_guard=linuxcnc_vendored_5axis_gcode_source_file
fixture_toolpath_fallback_not_promoted=1
real_linuxcnc_5axis_program_cases_smoke=ok
```
## 6. 后续使用方式
后续新增测试时优先引用这组资产:
```text
working_run/test_linuxcnc_source/xyzac-trt.ini
working_run/test_linuxcnc_source/impeller-7bl-xyzac.ngc
```
如果要测试短 switchkins identity/TCP 循环,再补充:
```text
/home/mes123456/cnc_wams/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins_test_1.ngc
```
如果要测试 xyzbc 对称链路,再补充:
```text
/home/mes123456/cnc_wams/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini
/home/mes123456/cnc_wams/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/boat-xyzbc.ngc
```