按规划持续工作

结论:五轴 TRT boat demo 已通过 LinuxCNC vendored remap/tool-table/file 执行路径纳入 native、Node WASM、browser 和 UI 验证,未在 JS 或自有代码中实现 M428/M429/M430 或运动学语义。
This commit is contained in:
2026-06-08 18:30:09 +08:00
parent 7cdfc458f9
commit c6c60c4866
9 changed files with 206 additions and 28 deletions

View File

@@ -109,15 +109,16 @@ Emscripten filesystem through the SDK and runs them through LinuxCNC
`Interp::open()`, `Interp::read()`, and `Interp::execute()` to validate the `Interp::open()`, `Interp::read()`, and `Interp::execute()` to validate the
file execution path. It also writes the vendored LinuxCNC `xyzac-trt` and file execution path. It also writes the vendored LinuxCNC `xyzac-trt` and
`xyzbc-trt` table-rotary-tilting sample machine INI, `remap_subs/*.ngc`, and `xyzbc-trt` table-rotary-tilting sample machine INI, `remap_subs/*.ngc`, and
`xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc` demo files into the Emscripten `xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc` plus `boat-xyzac.ngc` and
filesystem, then validates the WASM C ABI/SDK path for vendored LinuxCNC `boat-xyzbc.ngc` demo files into the Emscripten filesystem, then validates the
`REMAP` parsing, O-word remap execution, `M68`/`M66` HAL synchronization, and WASM C ABI/SDK path for vendored LinuxCNC `REMAP` parsing, vendored LinuxCNC
file `open()`/`read()`/`execute()` completion without JavaScript M-code or tool-table loading from the machine INI, O-word remap execution, `M68`/`M66`
kinematics semantics. The same Node smoke writes LinuxCNC-format parameter HAL synchronization, and file `open()`/`read()`/`execute()` completion
files into the Emscripten filesystem and validates vendored without JavaScript M-code or kinematics semantics. The same Node smoke writes
`Interp::restore_parameters()` and `Interp::save_parameters()`, including the LinuxCNC-format parameter files into the Emscripten filesystem and validates
saved parameter values, missing required numeric parameter defaulting, and the vendored `Interp::restore_parameters()` and `Interp::save_parameters()`,
`.bak` backup file boundary. It also writes the including the saved parameter values, missing required numeric parameter
defaulting, and the `.bak` backup file boundary. It also writes the
negative G-code fixtures into the Emscripten filesystem and verifies their negative G-code fixtures into the Emscripten filesystem and verifies their
LinuxCNC-produced error text through the `Interp::open()`/`read()`/`execute()` LinuxCNC-produced error text through the `Interp::open()`/`read()`/`execute()`
file path. file path.
@@ -162,8 +163,8 @@ when a machine session is copied into the interpreter WASM filesystem. It also
clicks the INI panel's 5-axis remap demo action and verifies that the UI clicks the INI panel's 5-axis remap demo action and verifies that the UI
copies vendored LinuxCNC `xyzac-trt` machine/remap/demo files into the copies vendored LinuxCNC `xyzac-trt` machine/remap/demo files into the
interpreter WASM filesystem, calls the LinuxCNC-backed SDK remap execution interpreter WASM filesystem, calls the LinuxCNC-backed SDK remap execution
path, and displays the resulting `fiveaxis_*` status lines without JavaScript path for the vendored `boat-xyzac.ngc` demo, and displays the resulting
M-code or kinematics semantics. `fiveaxis_*` status lines without JavaScript M-code or kinematics semantics.
The browser interpreter smoke script serves `wasm-port/` over localhost and The browser interpreter smoke script serves `wasm-port/` over localhost and
runs Chromium headless against a test page that loads the interpreter-core runs Chromium headless against a test page that loads the interpreter-core
@@ -196,8 +197,9 @@ 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 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 parameter/tool-table paths in a real browser session. It also writes vendored
LinuxCNC `xyzac-trt`/`xyzbc-trt` INI, remap subroutines, and switchkins demo LinuxCNC `xyzac-trt`/`xyzbc-trt` INI, remap subroutines, and switchkins demo
files into the browser WASM filesystem and verifies `runFiveAxisRemapFile()` files, including the larger `boat-xyzac.ngc` and `boat-xyzbc.ngc` demos, into
for both sample machines through the exported LinuxCNC remap/file execution the browser WASM filesystem and verifies `runFiveAxisRemapFile()` for both
sample machines through the exported LinuxCNC remap/tool-table/file execution
path. path.
The aggregate host smoke script builds the INI, interpreter-core, and The aggregate host smoke script builds the INI, interpreter-core, and
@@ -228,7 +230,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_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_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_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, then runs vendored `xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`, `xyzac_switchkins_test_1.ngc`, and `xyzac_switchkins_test_3.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`, and `boat-xyzbc.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_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_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. | | `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. |

View File

@@ -802,24 +802,28 @@ Current five-axis switchkins status:
5. `linuxcnc_remap_hal_sync_harness` validates vendored LinuxCNC `M68` and 5. `linuxcnc_remap_hal_sync_harness` validates vendored LinuxCNC `M68` and
`M66` synchronization through the standalone HAL adapter boundary. `M66` synchronization through the standalone HAL adapter boundary.
6. `linuxcnc_5axis_remap_execute_harness` executes the `xyzac-trt` and 6. `linuxcnc_5axis_remap_execute_harness` executes the `xyzac-trt` and
`xyzbc-trt` switchkins `M429 -> M428 -> M430 -> M429` paths plus vendored `xyzbc-trt` switchkins `M429 -> M428 -> M430 -> M429` paths, loads
`xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`, vendored machine tool tables through LinuxCNC `tooldata_load()`, and runs
`xyzac_switchkins_test_1.ngc`, and `xyzac_switchkins_test_3.ngc` through vendored `xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`,
LinuxCNC remap/file execution paths. `xyzac_switchkins_test_1.ngc`, `xyzac_switchkins_test_3.ngc`,
`boat-xyzac.ngc`, and `boat-xyzbc.ngc` through LinuxCNC remap/file
execution paths.
7. The WASM interpreter core now links vendored `interp_remap.cc` plus the 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 Python-only runtime edge stub, and the Node WASM smoke runs vendored
`xyzac_switchkins.ngc` and `xyzbc_switchkins.ngc` through the SDK C ABI `xyzac_switchkins.ngc`, `xyzbc_switchkins.ngc`, `boat-xyzac.ngc`, and
without JavaScript M-code or kinematics semantics. `boat-xyzbc.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 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 remap execution path by copying vendored LinuxCNC sample-machine files into
the interpreter WASM filesystem and calling the SDK C ABI. the interpreter WASM filesystem and calling the SDK C ABI.
Next work: Next work:
1. Continue broadening five-axis fixture coverage after the native, Node WASM, 1. Continue broadening five-axis fixture coverage through the same
browser, and UI remap paths are stable. source-backed execution boundary.
2. Evaluate larger vendored LinuxCNC TRT demos such as boat/impeller through 2. Evaluate remaining larger vendored LinuxCNC TRT demos such as impeller
the same source-backed execution boundary. after the boat demos are stable in native, Node WASM, browser, and UI
remap paths.
Involved LinuxCNC source: Involved LinuxCNC source:

View File

@@ -14,6 +14,7 @@
#include "emc/rs274ngc/interp_internal.hh" #include "emc/rs274ngc/interp_internal.hh"
#include "linuxcnc_hal_adapter.hh" #include "linuxcnc_hal_adapter.hh"
#include "linuxcnc_tool_adapter.hh" #include "linuxcnc_tool_adapter.hh"
#include "tooldata.hh"
#ifndef LINUXCNC_VENDOR_DIR #ifndef LINUXCNC_VENDOR_DIR
#error "LINUXCNC_VENDOR_DIR must point at wasm-port/vendor/linuxcnc" #error "LINUXCNC_VENDOR_DIR must point at wasm-port/vendor/linuxcnc"
@@ -119,6 +120,16 @@ bool parse_machine_remaps(Interp &interp, const MachineCase &machine)
interp._setup.subroutines[0] = strstore(remap_dir.c_str()); interp._setup.subroutines[0] = strstore(remap_dir.c_str());
bool ok = true; bool ok = true;
if (auto tool_table = ini.findString("TOOL_TABLE", "EMCIO")) {
const auto tool_path = machine_dir / *tool_table;
tooldata_init(false);
tooldata_set_db(DB_NOTUSED);
const int tool_rc = tooldata_load(tool_path.c_str());
std::cout << machine.label << "_tool_table_load=" << tool_rc << "\n";
ok &= tool_rc == 0;
ok &= interp.load_tool_table() == INTERP_OK;
}
int remap_count = 0; int remap_count = 0;
int line_number = 0; int line_number = 0;
while (auto remap = ini.findString(++remap_count, "REMAP", "RS274NGC")) { while (auto remap = ini.findString(++remap_count, "REMAP", "RS274NGC")) {
@@ -305,12 +316,26 @@ int main()
"xyzac_switchkins_test_3.ngc", "xyzac_switchkins_test_3.ngc",
0.0, 0.0,
}, },
{
"boat_xyzac",
"configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/"
"boat-xyzac.ngc",
0.0,
},
{
"boat_xyzbc",
"configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/"
"boat-xyzbc.ngc",
0.0,
},
}; };
ok &= execute_demo_file(cases[0], demos[0]); ok &= execute_demo_file(cases[0], demos[0]);
ok &= execute_demo_file(cases[1], demos[1]); ok &= execute_demo_file(cases[1], demos[1]);
ok &= execute_demo_file(cases[0], demos[2]); ok &= execute_demo_file(cases[0], demos[2]);
ok &= execute_demo_file(cases[0], demos[3]); ok &= execute_demo_file(cases[0], demos[3]);
ok &= execute_demo_file(cases[0], demos[4]);
ok &= execute_demo_file(cases[1], demos[5]);
print_bool("fiveaxis_linuxcnc_remap_execute_path", ok); print_bool("fiveaxis_linuxcnc_remap_execute_path", ok);
return ok ? 0 : 1; return ok ? 0 : 1;

View File

@@ -287,6 +287,16 @@ bool parse_machine_remaps(Interp &interp, std::ostringstream &output, const char
interp._setup.subroutines[0] = strstore(remap_dir.c_str()); interp._setup.subroutines[0] = strstore(remap_dir.c_str());
bool ok = true; bool ok = true;
if (auto tool_table = ini.findString("TOOL_TABLE", "EMCIO")) {
const std::string tool_path = machine_dir + "/" + *tool_table;
tooldata_init(false);
tooldata_set_db(DB_NOTUSED);
const int tool_rc = tooldata_load(tool_path.c_str());
output << "fiveaxis_tool_table_load=" << tool_rc << "\n";
ok &= tool_rc == 0;
ok &= interp.load_tool_table() == INTERP_OK;
}
int remap_count = 0; int remap_count = 0;
while (auto remap = ini.findString(++remap_count, "REMAP", "RS274NGC")) { while (auto remap = ini.findString(++remap_count, "REMAP", "RS274NGC")) {
const int line_number = ini.lineOf(remap_count, "REMAP", "RS274NGC").second; const int line_number = ini.lineOf(remap_count, "REMAP", "RS274NGC").second;

View File

@@ -165,6 +165,11 @@ async function writeFiveAxisTrtMachineFiles(interp) {
`${FIVEAXIS_TRT_SOURCE_PATH}/xyzac-trt.ini`, `${FIVEAXIS_TRT_SOURCE_PATH}/xyzac-trt.ini`,
`${FIVEAXIS_TRT_WASM_DIR}/xyzac-trt.ini`, `${FIVEAXIS_TRT_WASM_DIR}/xyzac-trt.ini`,
); );
await writeFetchedTextFile(
interp,
`${FIVEAXIS_TRT_SOURCE_PATH}/xyzac-trt.tbl`,
`${FIVEAXIS_TRT_WASM_DIR}/xyzac-trt.tbl`,
);
for (const filename of FIVEAXIS_REMAP_FILES) { for (const filename of FIVEAXIS_REMAP_FILES) {
await writeFetchedTextFile( await writeFetchedTextFile(
interp, interp,
@@ -174,8 +179,8 @@ async function writeFiveAxisTrtMachineFiles(interp) {
} }
await writeFetchedTextFile( await writeFetchedTextFile(
interp, interp,
`${FIVEAXIS_TRT_SOURCE_PATH}/demos/xyzac_switchkins.ngc`, `${FIVEAXIS_TRT_SOURCE_PATH}/demos/boat-xyzac.ngc`,
`${FIVEAXIS_TRT_WASM_DIR}/demos/xyzac_switchkins.ngc`, `${FIVEAXIS_TRT_WASM_DIR}/demos/boat-xyzac.ngc`,
); );
} }
@@ -306,7 +311,7 @@ document.getElementById("run-fiveaxis-remap").addEventListener("click", async ()
const interp = requireInterpSdk(); const interp = requireInterpSdk();
await writeFiveAxisTrtMachineFiles(interp); await writeFiveAxisTrtMachineFiles(interp);
const iniPath = `${FIVEAXIS_TRT_WASM_DIR}/xyzac-trt.ini`; const iniPath = `${FIVEAXIS_TRT_WASM_DIR}/xyzac-trt.ini`;
const programPath = `${FIVEAXIS_TRT_WASM_DIR}/demos/xyzac_switchkins.ngc`; const programPath = `${FIVEAXIS_TRT_WASM_DIR}/demos/boat-xyzac.ngc`;
const result = interp.runFiveAxisRemapFile(programPath, iniPath); const result = interp.runFiveAxisRemapFile(programPath, iniPath);
setField("fiveaxisRemap", "ok"); setField("fiveaxisRemap", "ok");
setCanonicalEvents(result.trim()); setCanonicalEvents(result.trim());

View File

@@ -373,7 +373,8 @@ TOOL_TABLE = browser-tool.tbl
const remapLog = uiDocument.getElementById("log").textContent; const remapLog = uiDocument.getElementById("log").textContent;
if ( if (
!remapLog.includes("fiveaxis_ini_open=1") || !remapLog.includes("fiveaxis_ini_open=1") ||
!remapLog.includes("fiveaxis_file_read_count=620") || !remapLog.includes("fiveaxis_tool_table_load=0") ||
!remapLog.includes("fiveaxis_file_read_count=1927") ||
!remapLog.includes("fiveaxis_hal_switchkins: rc=0 found=1 value=0") || !remapLog.includes("fiveaxis_hal_switchkins: rc=0 found=1 value=0") ||
!remapLog.includes("fiveaxis_linuxcnc_remap_file_execute=1") !remapLog.includes("fiveaxis_linuxcnc_remap_file_execute=1")
) { ) {

View File

@@ -114,6 +114,8 @@
await writeFetchedTextFile(interp, `${sourceDir}/xyzac-trt.ini`, `${wasmDir}/xyzac-trt.ini`); await writeFetchedTextFile(interp, `${sourceDir}/xyzac-trt.ini`, `${wasmDir}/xyzac-trt.ini`);
await writeFetchedTextFile(interp, `${sourceDir}/xyzbc-trt.ini`, `${wasmDir}/xyzbc-trt.ini`); await writeFetchedTextFile(interp, `${sourceDir}/xyzbc-trt.ini`, `${wasmDir}/xyzbc-trt.ini`);
await writeFetchedTextFile(interp, `${sourceDir}/xyzac-trt.tbl`, `${wasmDir}/xyzac-trt.tbl`);
await writeFetchedTextFile(interp, `${sourceDir}/xyzbc-trt.tbl`, `${wasmDir}/xyzbc-trt.tbl`);
for (const filename of remapFiles) { for (const filename of remapFiles) {
await writeFetchedTextFile( await writeFetchedTextFile(
@@ -133,6 +135,16 @@
`${sourceDir}/demos/xyzbc_switchkins.ngc`, `${sourceDir}/demos/xyzbc_switchkins.ngc`,
`${wasmDir}/demos/xyzbc_switchkins.ngc`, `${wasmDir}/demos/xyzbc_switchkins.ngc`,
); );
await writeFetchedTextFile(
interp,
`${sourceDir}/demos/boat-xyzac.ngc`,
`${wasmDir}/demos/boat-xyzac.ngc`,
);
await writeFetchedTextFile(
interp,
`${sourceDir}/demos/boat-xyzbc.ngc`,
`${wasmDir}/demos/boat-xyzbc.ngc`,
);
return wasmDir; return wasmDir;
} }
@@ -363,6 +375,7 @@
), ),
[ [
"fiveaxis_ini_open=1", "fiveaxis_ini_open=1",
"fiveaxis_tool_table_load=0",
"fiveaxis_parse_remap_1=0", "fiveaxis_parse_remap_1=0",
"fiveaxis_parse_remap_2=0", "fiveaxis_parse_remap_2=0",
"fiveaxis_parse_remap_3=0", "fiveaxis_parse_remap_3=0",
@@ -383,6 +396,7 @@
), ),
[ [
"fiveaxis_ini_open=1", "fiveaxis_ini_open=1",
"fiveaxis_tool_table_load=0",
"fiveaxis_parse_remap_1=0", "fiveaxis_parse_remap_1=0",
"fiveaxis_parse_remap_2=0", "fiveaxis_parse_remap_2=0",
"fiveaxis_parse_remap_3=0", "fiveaxis_parse_remap_3=0",
@@ -395,6 +409,50 @@
"fiveaxis_linuxcnc_remap_file_execute=1", "fiveaxis_linuxcnc_remap_file_execute=1",
].join("\n"), ].join("\n"),
); );
verifyExpectedOutput(
"browser_fiveaxis_boat_xyzac",
interp.runFiveAxisRemapFile(
`${fiveAxisTrtDir}/demos/boat-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=1927",
"fiveaxis_file_execute_count=1927",
"fiveaxis_file_finish_count=3",
"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(
"browser_fiveaxis_boat_xyzbc",
interp.runFiveAxisRemapFile(
`${fiveAxisTrtDir}/demos/boat-xyzbc.ngc`,
`${fiveAxisTrtDir}/xyzbc-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=1913",
"fiveaxis_file_execute_count=1913",
"fiveaxis_file_finish_count=3",
"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( verifyExpectedOutput(
"restore_parameters_missing_file", "restore_parameters_missing_file",

View File

@@ -334,6 +334,22 @@ grep -Fq "xyzac_trt_xyzac_switchkins_test_3_file_final_rc=1" "$FIVEAXIS_REMAP_EX
grep -Fq "xyzac_trt_xyzac_switchkins_test_3_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT" grep -Fq "xyzac_trt_xyzac_switchkins_test_3_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_xyzac_switchkins_test_3__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT" grep -Fq "xyzac_trt_xyzac_switchkins_test_3__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_xyzac_switchkins_test_3_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT" grep -Fq "xyzac_trt_xyzac_switchkins_test_3_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_file_open=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_file_read_count=1927" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_file_execute_count=1927" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_file_finish_count=3" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_file_final_rc=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzac_trt_boat_xyzac_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzbc_trt_boat_xyzbc_file_open=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzbc_trt_boat_xyzbc_file_read_count=1913" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzbc_trt_boat_xyzbc_file_execute_count=1913" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
grep -Fq "xyzbc_trt_boat_xyzbc_file_finish_count=3" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
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 "fiveaxis_linuxcnc_remap_execute_path=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" NAMEDPARAM_STDOUT="$BUILD_DIR/linuxcnc_namedparam_harness.run.stdout.log"

View File

@@ -101,6 +101,8 @@ function writeFiveAxisTrtMachineFiles() {
writeVendorTextFile(resolve(sourceDir, "xyzac-trt.ini"), `${wasmDir}/xyzac-trt.ini`); writeVendorTextFile(resolve(sourceDir, "xyzac-trt.ini"), `${wasmDir}/xyzac-trt.ini`);
writeVendorTextFile(resolve(sourceDir, "xyzbc-trt.ini"), `${wasmDir}/xyzbc-trt.ini`); writeVendorTextFile(resolve(sourceDir, "xyzbc-trt.ini"), `${wasmDir}/xyzbc-trt.ini`);
writeVendorTextFile(resolve(sourceDir, "xyzac-trt.tbl"), `${wasmDir}/xyzac-trt.tbl`);
writeVendorTextFile(resolve(sourceDir, "xyzbc-trt.tbl"), `${wasmDir}/xyzbc-trt.tbl`);
for (const filename of readdirSync(resolve(sourceDir, "remap_subs"))) { for (const filename of readdirSync(resolve(sourceDir, "remap_subs"))) {
if (filename.endsWith(".ngc")) { if (filename.endsWith(".ngc")) {
@@ -119,6 +121,14 @@ function writeFiveAxisTrtMachineFiles() {
resolve(sourceDir, "demos/xyzbc_switchkins.ngc"), resolve(sourceDir, "demos/xyzbc_switchkins.ngc"),
`${wasmDir}/demos/xyzbc_switchkins.ngc`, `${wasmDir}/demos/xyzbc_switchkins.ngc`,
); );
writeVendorTextFile(
resolve(sourceDir, "demos/boat-xyzac.ngc"),
`${wasmDir}/demos/boat-xyzac.ngc`,
);
writeVendorTextFile(
resolve(sourceDir, "demos/boat-xyzbc.ngc"),
`${wasmDir}/demos/boat-xyzbc.ngc`,
);
return wasmDir; return wasmDir;
} }
@@ -347,6 +357,7 @@ verifyExpectedOutput(
), ),
[ [
"fiveaxis_ini_open=1", "fiveaxis_ini_open=1",
"fiveaxis_tool_table_load=0",
"fiveaxis_parse_remap_1=0", "fiveaxis_parse_remap_1=0",
"fiveaxis_parse_remap_2=0", "fiveaxis_parse_remap_2=0",
"fiveaxis_parse_remap_3=0", "fiveaxis_parse_remap_3=0",
@@ -370,6 +381,7 @@ verifyExpectedOutput(
), ),
[ [
"fiveaxis_ini_open=1", "fiveaxis_ini_open=1",
"fiveaxis_tool_table_load=0",
"fiveaxis_parse_remap_1=0", "fiveaxis_parse_remap_1=0",
"fiveaxis_parse_remap_2=0", "fiveaxis_parse_remap_2=0",
"fiveaxis_parse_remap_3=0", "fiveaxis_parse_remap_3=0",
@@ -386,6 +398,51 @@ verifyExpectedOutput(
].join("\n"), ].join("\n"),
); );
verifyExpectedOutput(
"fiveaxis_boat_xyzac_wasm",
interp.runFiveAxisRemapFile(
`${fiveAxisTrtDir}/demos/boat-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=1927",
"fiveaxis_file_execute_count=1927",
"fiveaxis_file_finish_count=3",
"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(
"fiveaxis_boat_xyzbc_wasm",
interp.runFiveAxisRemapFile(
`${fiveAxisTrtDir}/demos/boat-xyzbc.ngc`,
`${fiveAxisTrtDir}/xyzbc-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=1913",
"fiveaxis_file_execute_count=1913",
"fiveaxis_file_finish_count=3",
"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"; const parameterFilePath = "/work/rs274ngc.var";
interp.writeTextFile( interp.writeTextFile(
parameterFilePath, parameterFilePath,