按规划持续工作
结论:已将 vendored LinuxCNC impeller-7bl-xyzac.ngc 纳入五轴 TRT remap/tool-table/file 执行 baseline,native、Node WASM、browser 和 UI 均通过同源验证,未实现自有 M428/M429/M430 或运动学语义。
This commit is contained in:
@@ -109,12 +109,13 @@ Emscripten filesystem through the SDK and runs them through LinuxCNC
|
||||
`Interp::open()`, `Interp::read()`, and `Interp::execute()` to validate the
|
||||
file execution path. It also writes the vendored LinuxCNC `xyzac-trt` and
|
||||
`xyzbc-trt` table-rotary-tilting sample machine INI, `remap_subs/*.ngc`, and
|
||||
`xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc` plus `boat-xyzac.ngc` and
|
||||
`boat-xyzbc.ngc` demo files into the Emscripten filesystem, then validates the
|
||||
WASM C ABI/SDK path for vendored LinuxCNC `REMAP` parsing, vendored LinuxCNC
|
||||
tool-table loading from the machine INI, O-word remap execution, `M68`/`M66`
|
||||
HAL synchronization, and file `open()`/`read()`/`execute()` completion
|
||||
without JavaScript M-code or kinematics semantics. The same Node smoke writes
|
||||
`xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc`, `boat-xyzac.ngc`,
|
||||
`boat-xyzbc.ngc`, and `impeller-7bl-xyzac.ngc` demo files into the Emscripten
|
||||
filesystem, then validates the WASM C ABI/SDK path for vendored LinuxCNC
|
||||
`REMAP` parsing, vendored LinuxCNC tool-table loading from the machine INI,
|
||||
O-word remap execution, `M68`/`M66` HAL synchronization, and file
|
||||
`open()`/`read()`/`execute()` completion without JavaScript M-code or
|
||||
kinematics semantics. The same Node smoke writes
|
||||
LinuxCNC-format parameter files into the Emscripten filesystem and validates
|
||||
vendored `Interp::restore_parameters()` and `Interp::save_parameters()`,
|
||||
including the saved parameter values, missing required numeric parameter
|
||||
@@ -197,10 +198,10 @@ override INI-derived names before OPFS text is copied into the LinuxCNC-backed
|
||||
WASM filesystem, and that absent INI file-name values use the default OPFS
|
||||
parameter/tool-table paths in a real browser session. It also writes vendored
|
||||
LinuxCNC `xyzac-trt`/`xyzbc-trt` INI, remap subroutines, and switchkins demo
|
||||
files, including the larger `boat-xyzac.ngc` and `boat-xyzbc.ngc` demos, into
|
||||
the browser WASM filesystem and verifies `runFiveAxisRemapFile()` for both
|
||||
sample machines through the exported LinuxCNC remap/tool-table/file execution
|
||||
path.
|
||||
files, including the larger `boat-xyzac.ngc`, `boat-xyzbc.ngc`, and
|
||||
`impeller-7bl-xyzac.ngc` demos, into the browser WASM filesystem and verifies
|
||||
`runFiveAxisRemapFile()` for both sample machines through the exported
|
||||
LinuxCNC remap/tool-table/file execution path.
|
||||
|
||||
The aggregate host smoke script builds the INI, interpreter-core, and
|
||||
trajectory-planner WASM artifacts once, then runs the Node WASM smokes, the
|
||||
@@ -230,7 +231,7 @@ The validation fails if:
|
||||
| `linuxcnc_interp_init_harness` | Validates vendored LinuxCNC `Interp::init()` emits canonical initialization boundaries, reads metric/inch machine units, and synchronizes current/selected tool slots through standalone status adapters. |
|
||||
| `linuxcnc_indexer_harness` | Validates vendored LinuxCNC single-axis rotary indexer dispatch emits lock/unlock and motion boundaries through the standalone event sink. |
|
||||
| `linuxcnc_remap_hal_sync_harness` | Validates vendored LinuxCNC `M68`/`M66` execution can drive the standalone HAL adapter boundary used by 5-axis switchkins remap files, including `_hal[motion.switchkins-type]` readback. |
|
||||
| `linuxcnc_5axis_remap_execute_harness` | Validates vendored LinuxCNC `REMAP` parsing plus NGC remap execution for the 5-axis `M429 -> M428 -> M430 -> M429` switchkins path in the `xyzac-trt` and `xyzbc-trt` sample machines, loads vendored machine tool tables through LinuxCNC `tooldata_load()`, then runs vendored `xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`, `xyzac_switchkins_test_1.ngc`, `xyzac_switchkins_test_3.ngc`, `boat-xyzac.ngc`, and `boat-xyzbc.ngc` through the LinuxCNC file `open/read/execute` path. |
|
||||
| `linuxcnc_5axis_remap_execute_harness` | Validates vendored LinuxCNC `REMAP` parsing plus NGC remap execution for the 5-axis `M429 -> M428 -> M430 -> M429` switchkins path in the `xyzac-trt` and `xyzbc-trt` sample machines, loads vendored machine tool tables through LinuxCNC `tooldata_load()`, then runs vendored `xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`, `xyzac_switchkins_test_1.ngc`, `xyzac_switchkins_test_3.ngc`, `boat-xyzac.ngc`, `boat-xyzbc.ngc`, and `impeller-7bl-xyzac.ngc` through the LinuxCNC file `open/read/execute` path. |
|
||||
| `linuxcnc_tp_api_probe` | Validates vendored LinuxCNC trajectory planner calls for linear, arc, and queued motion paths. |
|
||||
| `linuxcnc_kinematics_probe` | Validates vendored LinuxCNC `trivkins.c` plus `kins_util.c` initialize and perform identity forward/inverse mapping through the standalone HAL/RTAPI boundary. |
|
||||
| `linuxcnc_5axis_kinematics_probe` | Validates vendored LinuxCNC `5axiskins.c` through `switchkins.c`, including 5-axis forward/inverse round-trip behavior and switching to identity kinematics. |
|
||||
|
||||
@@ -806,13 +806,13 @@ Current five-axis switchkins status:
|
||||
vendored machine tool tables through LinuxCNC `tooldata_load()`, and runs
|
||||
vendored `xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`,
|
||||
`xyzac_switchkins_test_1.ngc`, `xyzac_switchkins_test_3.ngc`,
|
||||
`boat-xyzac.ngc`, and `boat-xyzbc.ngc` through LinuxCNC remap/file
|
||||
execution paths.
|
||||
`boat-xyzac.ngc`, `boat-xyzbc.ngc`, and `impeller-7bl-xyzac.ngc` through
|
||||
LinuxCNC remap/file execution paths.
|
||||
7. The WASM interpreter core now links vendored `interp_remap.cc` plus the
|
||||
Python-only runtime edge stub, and the Node WASM smoke runs vendored
|
||||
`xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`, `boat-xyzac.ngc`, and
|
||||
`boat-xyzbc.ngc` through the SDK C ABI without JavaScript M-code or
|
||||
kinematics semantics.
|
||||
`boat-xyzbc.ngc`, plus `impeller-7bl-xyzac.ngc` through the SDK C ABI
|
||||
without JavaScript M-code or kinematics semantics.
|
||||
8. Browser smoke and the INI panel UI now expose the same validated 5-axis
|
||||
remap execution path by copying vendored LinuxCNC sample-machine files into
|
||||
the interpreter WASM filesystem and calling the SDK C ABI.
|
||||
@@ -821,9 +821,9 @@ Next work:
|
||||
|
||||
1. Continue broadening five-axis fixture coverage through the same
|
||||
source-backed execution boundary.
|
||||
2. Evaluate remaining larger vendored LinuxCNC TRT demos such as impeller
|
||||
after the boat demos are stable in native, Node WASM, browser, and UI
|
||||
remap paths.
|
||||
2. Evaluate additional vendored LinuxCNC five-axis sample machines and demos
|
||||
after the TRT boat and impeller demos are stable in native, Node WASM,
|
||||
browser, and UI remap paths.
|
||||
|
||||
Involved LinuxCNC source:
|
||||
|
||||
|
||||
@@ -229,6 +229,12 @@ int main()
|
||||
"configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/boat-xyzbc.ngc",
|
||||
true,
|
||||
true);
|
||||
ok &= check_text_mcodes(
|
||||
"xyzac_trt_impeller",
|
||||
"configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/"
|
||||
"impeller-7bl-xyzac.ngc",
|
||||
true,
|
||||
true);
|
||||
|
||||
print_bool("fiveaxis_remap_assets_from_linuxcnc", ok);
|
||||
return ok ? 0 : 1;
|
||||
|
||||
@@ -53,7 +53,7 @@ void print_interp_error(Interp &interp, const std::string &label, int rc)
|
||||
std::cout << label << "_blocktext=" << interp._setup.blocktext << "\n";
|
||||
}
|
||||
|
||||
constexpr int kMaxDemoFileSteps = 4096;
|
||||
constexpr int kMaxDemoFileSteps = 8192;
|
||||
|
||||
void seed_switchkins_hal()
|
||||
{
|
||||
@@ -328,6 +328,12 @@ int main()
|
||||
"boat-xyzbc.ngc",
|
||||
0.0,
|
||||
},
|
||||
{
|
||||
"impeller_7bl_xyzac",
|
||||
"configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/"
|
||||
"impeller-7bl-xyzac.ngc",
|
||||
0.0,
|
||||
},
|
||||
};
|
||||
|
||||
ok &= execute_demo_file(cases[0], demos[0]);
|
||||
@@ -336,6 +342,7 @@ int main()
|
||||
ok &= execute_demo_file(cases[0], demos[3]);
|
||||
ok &= execute_demo_file(cases[0], demos[4]);
|
||||
ok &= execute_demo_file(cases[1], demos[5]);
|
||||
ok &= execute_demo_file(cases[0], demos[6]);
|
||||
|
||||
print_bool("fiveaxis_linuxcnc_remap_execute_path", ok);
|
||||
return ok ? 0 : 1;
|
||||
|
||||
@@ -485,7 +485,7 @@ char *lcinterp_run_fiveaxis_remap_file(const char *path, const char *ini_path)
|
||||
return copy_result(output.str());
|
||||
}
|
||||
|
||||
constexpr int max_file_steps = 4096;
|
||||
constexpr int max_file_steps = 8192;
|
||||
int file_read_count = 0;
|
||||
int file_execute_count = 0;
|
||||
int file_finish_count = 0;
|
||||
|
||||
@@ -179,8 +179,8 @@ async function writeFiveAxisTrtMachineFiles(interp) {
|
||||
}
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${FIVEAXIS_TRT_SOURCE_PATH}/demos/boat-xyzac.ngc`,
|
||||
`${FIVEAXIS_TRT_WASM_DIR}/demos/boat-xyzac.ngc`,
|
||||
`${FIVEAXIS_TRT_SOURCE_PATH}/demos/impeller-7bl-xyzac.ngc`,
|
||||
`${FIVEAXIS_TRT_WASM_DIR}/demos/impeller-7bl-xyzac.ngc`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ document.getElementById("run-fiveaxis-remap").addEventListener("click", async ()
|
||||
const interp = requireInterpSdk();
|
||||
await writeFiveAxisTrtMachineFiles(interp);
|
||||
const iniPath = `${FIVEAXIS_TRT_WASM_DIR}/xyzac-trt.ini`;
|
||||
const programPath = `${FIVEAXIS_TRT_WASM_DIR}/demos/boat-xyzac.ngc`;
|
||||
const programPath = `${FIVEAXIS_TRT_WASM_DIR}/demos/impeller-7bl-xyzac.ngc`;
|
||||
const result = interp.runFiveAxisRemapFile(programPath, iniPath);
|
||||
setField("fiveaxisRemap", "ok");
|
||||
setCanonicalEvents(result.trim());
|
||||
|
||||
@@ -374,7 +374,8 @@ TOOL_TABLE = browser-tool.tbl
|
||||
if (
|
||||
!remapLog.includes("fiveaxis_ini_open=1") ||
|
||||
!remapLog.includes("fiveaxis_tool_table_load=0") ||
|
||||
!remapLog.includes("fiveaxis_file_read_count=1927") ||
|
||||
!remapLog.includes("fiveaxis_file_read_count=4558") ||
|
||||
!remapLog.includes("fiveaxis_file_finish_count=2") ||
|
||||
!remapLog.includes("fiveaxis_hal_switchkins: rc=0 found=1 value=0") ||
|
||||
!remapLog.includes("fiveaxis_linuxcnc_remap_file_execute=1")
|
||||
) {
|
||||
|
||||
@@ -145,6 +145,11 @@
|
||||
`${sourceDir}/demos/boat-xyzbc.ngc`,
|
||||
`${wasmDir}/demos/boat-xyzbc.ngc`,
|
||||
);
|
||||
await writeFetchedTextFile(
|
||||
interp,
|
||||
`${sourceDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
`${wasmDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
);
|
||||
|
||||
return wasmDir;
|
||||
}
|
||||
@@ -453,6 +458,28 @@
|
||||
"fiveaxis_linuxcnc_remap_file_execute=1",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"browser_fiveaxis_impeller_7bl_xyzac",
|
||||
interp.runFiveAxisRemapFile(
|
||||
`${fiveAxisTrtDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
`${fiveAxisTrtDir}/xyzac-trt.ini`,
|
||||
),
|
||||
[
|
||||
"fiveaxis_ini_open=1",
|
||||
"fiveaxis_tool_table_load=0",
|
||||
"fiveaxis_parse_remap_1=0",
|
||||
"fiveaxis_parse_remap_2=0",
|
||||
"fiveaxis_parse_remap_3=0",
|
||||
"fiveaxis_file_open=0",
|
||||
"fiveaxis_file_read_count=4558",
|
||||
"fiveaxis_file_execute_count=4558",
|
||||
"fiveaxis_file_finish_count=2",
|
||||
"fiveaxis_file_final_rc=1",
|
||||
"fiveaxis_file_reached_exit=1",
|
||||
"fiveaxis_hal_switchkins: rc=0 found=1 value=0",
|
||||
"fiveaxis_linuxcnc_remap_file_execute=1",
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
verifyExpectedOutput(
|
||||
"restore_parameters_missing_file",
|
||||
|
||||
@@ -350,6 +350,14 @@ grep -Fq "xyzbc_trt_boat_xyzbc_file_final_rc=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_boat_xyzbc_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_boat_xyzbc__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_boat_xyzbc_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_file_open=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_file_read_count=4558" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_file_execute_count=4558" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_file_finish_count=2" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_file_final_rc=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_impeller_7bl_xyzac_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "fiveaxis_linuxcnc_remap_execute_path=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
|
||||
NAMEDPARAM_STDOUT="$BUILD_DIR/linuxcnc_namedparam_harness.run.stdout.log"
|
||||
|
||||
@@ -129,6 +129,10 @@ function writeFiveAxisTrtMachineFiles() {
|
||||
resolve(sourceDir, "demos/boat-xyzbc.ngc"),
|
||||
`${wasmDir}/demos/boat-xyzbc.ngc`,
|
||||
);
|
||||
writeVendorTextFile(
|
||||
resolve(sourceDir, "demos/impeller-7bl-xyzac.ngc"),
|
||||
`${wasmDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
);
|
||||
|
||||
return wasmDir;
|
||||
}
|
||||
@@ -442,6 +446,28 @@ verifyExpectedOutput(
|
||||
"fiveaxis_linuxcnc_remap_file_execute=1",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"fiveaxis_impeller_7bl_xyzac_wasm",
|
||||
interp.runFiveAxisRemapFile(
|
||||
`${fiveAxisTrtDir}/demos/impeller-7bl-xyzac.ngc`,
|
||||
`${fiveAxisTrtDir}/xyzac-trt.ini`,
|
||||
),
|
||||
[
|
||||
"fiveaxis_ini_open=1",
|
||||
"fiveaxis_tool_table_load=0",
|
||||
"fiveaxis_parse_remap_1=0",
|
||||
"fiveaxis_parse_remap_2=0",
|
||||
"fiveaxis_parse_remap_3=0",
|
||||
"fiveaxis_file_open=0",
|
||||
"fiveaxis_file_read_count=4558",
|
||||
"fiveaxis_file_execute_count=4558",
|
||||
"fiveaxis_file_finish_count=2",
|
||||
"fiveaxis_file_final_rc=1",
|
||||
"fiveaxis_file_reached_exit=1",
|
||||
"fiveaxis_hal_switchkins: rc=0 found=1 value=0",
|
||||
"fiveaxis_linuxcnc_remap_file_execute=1",
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
const parameterFilePath = "/work/rs274ngc.var";
|
||||
interp.writeTextFile(
|
||||
|
||||
Reference in New Issue
Block a user