提交 xyzbc-trt 界面与验证更新
This commit is contained in:
2
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/core/linuxcnc_interp.js
vendored
Normal file
2
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/core/linuxcnc_interp.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/core/linuxcnc_interp.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/core/linuxcnc_interp.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_5axiskins_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_5axiskins_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_corexy_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_corexy_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_genhex_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_genhex_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_genser_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_genser_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_lineardelta_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_lineardelta_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_max_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_max_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_pentakins_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_pentakins_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_puma_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_puma_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_rose_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_rose_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_rotarydelta_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_rotarydelta_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_rotate_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_rotate_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_scara_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_scara_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_scorbot_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_scorbot_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_tripod_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_tripod_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_trivkins_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_trivkins_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_xyzac_trt_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_xyzac_trt_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_xyzbc_trt_kinematics.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/kinematics/linuxcnc_xyzbc_trt_kinematics.wasm
vendored
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/task-hal/linuxcnc_task_hal.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/task-hal/linuxcnc_task_hal.wasm
vendored
Executable file
Binary file not shown.
2
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/tp/linuxcnc_tp.js
vendored
Normal file
2
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/tp/linuxcnc_tp.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/tp/linuxcnc_tp.wasm
vendored
Executable file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/build/wasm/tp/linuxcnc_tp.wasm
vendored
Executable file
Binary file not shown.
4573
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-hal.js
vendored
Normal file
4573
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-hal.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
228
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-interp.js
vendored
Normal file
228
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-interp.js
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
import createLinuxCncInterpModule from "../../../build/wasm/core/linuxcnc_interp.js";
|
||||
import { createVirtualHalWasmBridgeSnapshot } from "./linuxcnc-hal.js";
|
||||
|
||||
function allocCString(mod, value) {
|
||||
const bytes = mod.lengthBytesUTF8(value) + 1;
|
||||
const ptr = mod._malloc(bytes);
|
||||
mod.stringToUTF8(value, ptr, bytes);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
function ensureParentPath(mod, path) {
|
||||
const parts = path.split("/").filter(Boolean);
|
||||
let current = "";
|
||||
for (const part of parts.slice(0, -1)) {
|
||||
current += `/${part}`;
|
||||
try {
|
||||
mod.FS.mkdir(current);
|
||||
} catch {
|
||||
// Directory already exists.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function copyResultString(mod, resultPtr, functionName) {
|
||||
if (!resultPtr) {
|
||||
throw new Error(`${functionName} returned null`);
|
||||
}
|
||||
return mod.UTF8ToString(resultPtr);
|
||||
}
|
||||
|
||||
function callStringResult(mod, functionName, ...values) {
|
||||
const ptrs = values.map((value) => allocCString(mod, value));
|
||||
let resultPtr = 0;
|
||||
try {
|
||||
resultPtr = mod[`_${functionName}`](...ptrs);
|
||||
return copyResultString(mod, resultPtr, functionName);
|
||||
} finally {
|
||||
if (resultPtr) {
|
||||
mod._lcinterp_free_string(resultPtr);
|
||||
}
|
||||
for (const ptr of ptrs) {
|
||||
mod._free(ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function requireWasmFunction(mod, functionName) {
|
||||
const fn = mod[`_${functionName}`];
|
||||
if (typeof fn !== "function") {
|
||||
throw new Error(`linuxcnc interpreter WASM missing ${functionName}; rebuild wasm-port/tools/build_wasm_core.sh`);
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
|
||||
function callVoidWithStringsAndNumbers(mod, functionName, strings, numbers = []) {
|
||||
const fn = requireWasmFunction(mod, functionName);
|
||||
const ptrs = strings.map((value) => allocCString(mod, value));
|
||||
try {
|
||||
return fn(...ptrs, ...numbers);
|
||||
} finally {
|
||||
for (const ptr of ptrs) {
|
||||
mod._free(ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function createLinuxCncInterpSdk(moduleOptions = {}) {
|
||||
const mod = await createLinuxCncInterpModule(moduleOptions);
|
||||
|
||||
return {
|
||||
module: mod,
|
||||
|
||||
hasWasmFunction(functionName) {
|
||||
return typeof mod[`_${functionName}`] === "function";
|
||||
},
|
||||
|
||||
writeTextFile(path, text) {
|
||||
ensureParentPath(mod, path);
|
||||
mod.FS.writeFile(path, text, { encoding: "utf8" });
|
||||
},
|
||||
|
||||
readTextFile(path) {
|
||||
return mod.FS.readFile(path, { encoding: "utf8" });
|
||||
},
|
||||
|
||||
runSimConfigProgram({
|
||||
iniPath,
|
||||
programPath,
|
||||
files = [],
|
||||
executionMode = "fileWithIni",
|
||||
}) {
|
||||
for (const file of files) {
|
||||
ensureParentPath(mod, file.path);
|
||||
mod.FS.writeFile(file.path, file.text, { encoding: "utf8" });
|
||||
if (file.executable) {
|
||||
mod.FS.chmod(file.path, 0o755);
|
||||
}
|
||||
}
|
||||
|
||||
if (executionMode === "fiveAxisRemap") {
|
||||
return callStringResult(
|
||||
mod,
|
||||
"lcinterp_run_fiveaxis_remap_file",
|
||||
programPath,
|
||||
iniPath,
|
||||
);
|
||||
}
|
||||
if (executionMode === "fileWithIni") {
|
||||
return callStringResult(mod, "lcinterp_run_file_with_ini", programPath, iniPath);
|
||||
}
|
||||
throw new Error(`unsupported sim config execution mode: ${executionMode}`);
|
||||
},
|
||||
|
||||
runProgram(programText) {
|
||||
return callStringResult(mod, "lcinterp_run_program", programText);
|
||||
},
|
||||
|
||||
runProgramWithIni(programText, iniPath) {
|
||||
return callStringResult(mod, "lcinterp_run_program_with_ini", programText, iniPath);
|
||||
},
|
||||
|
||||
runFile(path) {
|
||||
return callStringResult(mod, "lcinterp_run_file", path);
|
||||
},
|
||||
|
||||
runFileWithIni(path, iniPath) {
|
||||
return callStringResult(mod, "lcinterp_run_file_with_ini", path, iniPath);
|
||||
},
|
||||
|
||||
runFileWithIniContinueOnError(path, iniPath) {
|
||||
return callStringResult(
|
||||
mod,
|
||||
"lcinterp_run_file_with_ini_continue_on_error",
|
||||
path,
|
||||
iniPath,
|
||||
);
|
||||
},
|
||||
|
||||
runFiveAxisRemapFile(path, iniPath) {
|
||||
return callStringResult(mod, "lcinterp_run_fiveaxis_remap_file", path, iniPath);
|
||||
},
|
||||
|
||||
runRemapFile(path, iniPath) {
|
||||
return callStringResult(mod, "lcinterp_run_remap_file", path, iniPath);
|
||||
},
|
||||
|
||||
runRemapFileContinueOnError(path, iniPath) {
|
||||
return callStringResult(mod, "lcinterp_run_remap_file_continue_on_error", path, iniPath);
|
||||
},
|
||||
|
||||
runRemapIoMdiSequence(iniPath) {
|
||||
return callStringResult(mod, "lcinterp_run_remap_io_mdi_sequence", iniPath);
|
||||
},
|
||||
|
||||
restoreParameters(path) {
|
||||
return callStringResult(mod, "lcinterp_restore_parameters", path);
|
||||
},
|
||||
|
||||
saveParameters(path, values) {
|
||||
const assignments = Object.entries(values)
|
||||
.map(([parameter, value]) => `${parameter} ${value}`)
|
||||
.join("\n");
|
||||
return callStringResult(mod, "lcinterp_save_parameters", path, assignments);
|
||||
},
|
||||
|
||||
loadToolTable(path, options = {}) {
|
||||
const functionName = options.randomToolChanger
|
||||
? "lcinterp_load_tool_table_random"
|
||||
: "lcinterp_load_tool_table";
|
||||
return callStringResult(mod, functionName, path);
|
||||
},
|
||||
|
||||
saveToolTable(path) {
|
||||
return callStringResult(mod, "lcinterp_save_tool_table", path);
|
||||
},
|
||||
|
||||
probeInitAndSynch() {
|
||||
return callStringResult(mod, "lcinterp_probe_init_and_synch");
|
||||
},
|
||||
|
||||
probeIndexer() {
|
||||
return callStringResult(mod, "lcinterp_probe_indexer");
|
||||
},
|
||||
|
||||
probeNamedParameters(iniPath) {
|
||||
return callStringResult(mod, "lcinterp_probe_named_parameters", iniPath);
|
||||
},
|
||||
|
||||
resetHal() {
|
||||
requireWasmFunction(mod, "lcinterp_hal_reset")();
|
||||
},
|
||||
|
||||
setHalValue({ kind = "pin", name, type = "HAL_FLOAT", value = 0, connected = true }) {
|
||||
if (!name) {
|
||||
throw new Error("setHalValue requires a HAL name");
|
||||
}
|
||||
return callVoidWithStringsAndNumbers(
|
||||
mod,
|
||||
"lcinterp_hal_set_value",
|
||||
[kind, name, type],
|
||||
[Number(value) || 0, connected === false ? 0 : 1],
|
||||
);
|
||||
},
|
||||
|
||||
applyVirtualHalSnapshot(snapshot, options = {}) {
|
||||
if (options.reset !== false) {
|
||||
this.resetHal();
|
||||
}
|
||||
for (const value of snapshot?.values ?? []) {
|
||||
this.setHalValue(value);
|
||||
}
|
||||
return {
|
||||
apiName: "linuxcnc-wasm-hal-apply-result",
|
||||
applied: snapshot?.values?.length ?? 0,
|
||||
reset: options.reset !== false,
|
||||
source: snapshot?.source ?? "unknown",
|
||||
};
|
||||
},
|
||||
|
||||
applyVirtualHalState(halState, options = {}) {
|
||||
return this.applyVirtualHalSnapshot(createVirtualHalWasmBridgeSnapshot(halState), options);
|
||||
},
|
||||
|
||||
probeHalNamed(name) {
|
||||
return callStringResult(mod, "lcinterp_probe_hal_named", name);
|
||||
},
|
||||
};
|
||||
}
|
||||
206
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-kinematics.js
vendored
Normal file
206
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-kinematics.js
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
import createLinuxCncTrivkinsKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_trivkins_kinematics.js";
|
||||
import createLinuxCnc5axiskinsKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_5axiskins_kinematics.js";
|
||||
import createLinuxCncXyzacTrtKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_xyzac_trt_kinematics.js";
|
||||
import createLinuxCncXyzbcTrtKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_xyzbc_trt_kinematics.js";
|
||||
import createLinuxCncCorexyKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_corexy_kinematics.js";
|
||||
import createLinuxCncRotateKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_rotate_kinematics.js";
|
||||
import createLinuxCncRoseKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_rose_kinematics.js";
|
||||
import createLinuxCncMaxKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_max_kinematics.js";
|
||||
import createLinuxCncLineardeltaKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_lineardelta_kinematics.js";
|
||||
import createLinuxCncRotarydeltaKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_rotarydelta_kinematics.js";
|
||||
import createLinuxCncScorbotKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_scorbot_kinematics.js";
|
||||
import createLinuxCncTripodKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_tripod_kinematics.js";
|
||||
import createLinuxCncScaraKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_scara_kinematics.js";
|
||||
import createLinuxCncPumaKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_puma_kinematics.js";
|
||||
import createLinuxCncGenserKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_genser_kinematics.js";
|
||||
import createLinuxCncGenhexKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_genhex_kinematics.js";
|
||||
import createLinuxCncPentakinsKinematicsModule from "../../../build/wasm/kinematics/linuxcnc_pentakins_kinematics.js";
|
||||
|
||||
export const LINUXCNC_KINEMATICS_MODULES = [
|
||||
{ id: "trivkins", wasmFile: "linuxcnc_trivkins_kinematics.wasm", factory: createLinuxCncTrivkinsKinematicsModule },
|
||||
{ id: "5axiskins", wasmFile: "linuxcnc_5axiskins_kinematics.wasm", factory: createLinuxCnc5axiskinsKinematicsModule },
|
||||
{ id: "xyzac-trt", wasmFile: "linuxcnc_xyzac_trt_kinematics.wasm", factory: createLinuxCncXyzacTrtKinematicsModule },
|
||||
{ id: "xyzbc-trt", wasmFile: "linuxcnc_xyzbc_trt_kinematics.wasm", factory: createLinuxCncXyzbcTrtKinematicsModule },
|
||||
{ id: "corexy", wasmFile: "linuxcnc_corexy_kinematics.wasm", factory: createLinuxCncCorexyKinematicsModule },
|
||||
{ id: "rotate", wasmFile: "linuxcnc_rotate_kinematics.wasm", factory: createLinuxCncRotateKinematicsModule },
|
||||
{ id: "rose", wasmFile: "linuxcnc_rose_kinematics.wasm", factory: createLinuxCncRoseKinematicsModule },
|
||||
{ id: "max", wasmFile: "linuxcnc_max_kinematics.wasm", factory: createLinuxCncMaxKinematicsModule },
|
||||
{ id: "lineardelta", wasmFile: "linuxcnc_lineardelta_kinematics.wasm", factory: createLinuxCncLineardeltaKinematicsModule },
|
||||
{ id: "rotarydelta", wasmFile: "linuxcnc_rotarydelta_kinematics.wasm", factory: createLinuxCncRotarydeltaKinematicsModule },
|
||||
{ id: "scorbot", wasmFile: "linuxcnc_scorbot_kinematics.wasm", factory: createLinuxCncScorbotKinematicsModule },
|
||||
{ id: "tripod", wasmFile: "linuxcnc_tripod_kinematics.wasm", factory: createLinuxCncTripodKinematicsModule },
|
||||
{ id: "scara", wasmFile: "linuxcnc_scara_kinematics.wasm", factory: createLinuxCncScaraKinematicsModule },
|
||||
{ id: "puma", wasmFile: "linuxcnc_puma_kinematics.wasm", factory: createLinuxCncPumaKinematicsModule },
|
||||
{ id: "genser", wasmFile: "linuxcnc_genser_kinematics.wasm", factory: createLinuxCncGenserKinematicsModule },
|
||||
{ id: "genhex", wasmFile: "linuxcnc_genhex_kinematics.wasm", factory: createLinuxCncGenhexKinematicsModule },
|
||||
{ id: "pentakins", wasmFile: "linuxcnc_pentakins_kinematics.wasm", factory: createLinuxCncPentakinsKinematicsModule },
|
||||
];
|
||||
|
||||
const MODULES_BY_ID = new Map(LINUXCNC_KINEMATICS_MODULES.map((entry) => [entry.id, entry]));
|
||||
|
||||
function requireWasmFunction(mod, functionName) {
|
||||
const fn = mod[`_${functionName}`];
|
||||
if (typeof fn !== "function") {
|
||||
throw new Error(`linuxcnc kinematics WASM missing ${functionName}; rebuild wasm-port/tools/build_kinematics_wasm.sh`);
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
|
||||
function writeDoubleArray(mod, values) {
|
||||
const bytes = values.length * 8;
|
||||
const ptr = mod._malloc(bytes);
|
||||
mod.HEAPF64.set(values, ptr / 8);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
function readDoubleArray(mod, ptr, length) {
|
||||
return Array.from(mod.HEAPF64.subarray(ptr / 8, ptr / 8 + length));
|
||||
}
|
||||
|
||||
function poseValuesFromObject(pose = {}) {
|
||||
return [
|
||||
Number(pose.x ?? pose.tran?.x ?? 0),
|
||||
Number(pose.y ?? pose.tran?.y ?? 0),
|
||||
Number(pose.z ?? pose.tran?.z ?? 0),
|
||||
Number(pose.a ?? 0),
|
||||
Number(pose.b ?? 0),
|
||||
Number(pose.c ?? 0),
|
||||
Number(pose.u ?? 0),
|
||||
Number(pose.v ?? 0),
|
||||
Number(pose.w ?? 0),
|
||||
];
|
||||
}
|
||||
|
||||
function poseObjectFromValues(values) {
|
||||
return {
|
||||
x: values[0],
|
||||
y: values[1],
|
||||
z: values[2],
|
||||
a: values[3],
|
||||
b: values[4],
|
||||
c: values[5],
|
||||
u: values[6],
|
||||
v: values[7],
|
||||
w: values[8],
|
||||
};
|
||||
}
|
||||
|
||||
export function supportedLinuxCncKinematicsModules() {
|
||||
return LINUXCNC_KINEMATICS_MODULES.map((entry) => entry.id);
|
||||
}
|
||||
|
||||
export function linuxCncKinematicsWasmFile(moduleId) {
|
||||
return MODULES_BY_ID.get(moduleId)?.wasmFile || null;
|
||||
}
|
||||
|
||||
export async function createLinuxCncKinematicsSdk({
|
||||
moduleId = "xyzac-trt",
|
||||
moduleOptions = {},
|
||||
} = {}) {
|
||||
const entry = MODULES_BY_ID.get(moduleId);
|
||||
if (!entry) {
|
||||
throw new Error(`unsupported LinuxCNC kinematics module: ${moduleId}`);
|
||||
}
|
||||
|
||||
const mod = await entry.factory(moduleOptions);
|
||||
requireWasmFunction(mod, "lckins_init")();
|
||||
|
||||
return {
|
||||
apiName: "linuxcnc-kinematics-wasm-sdk",
|
||||
moduleId,
|
||||
module: mod,
|
||||
wasmFile: entry.wasmFile,
|
||||
|
||||
hasWasmFunction(functionName) {
|
||||
return typeof mod[`_${functionName}`] === "function";
|
||||
},
|
||||
|
||||
type() {
|
||||
return requireWasmFunction(mod, "lckins_type")();
|
||||
},
|
||||
|
||||
switchable() {
|
||||
return requireWasmFunction(mod, "lckins_switchable")();
|
||||
},
|
||||
|
||||
switchKinematics(switchkinsType) {
|
||||
return requireWasmFunction(mod, "lckins_switch")(Number(switchkinsType) || 0);
|
||||
},
|
||||
|
||||
forward(joints, options = {}) {
|
||||
const jointValues = Array.from(joints, Number);
|
||||
const jointsPtr = writeDoubleArray(mod, jointValues);
|
||||
const posePtr = writeDoubleArray(mod, poseValuesFromObject(options.seedPose));
|
||||
const fflagsPtr = mod._malloc(8);
|
||||
const iflagsPtr = mod._malloc(8);
|
||||
mod.HEAPU32[fflagsPtr / 4] = 0;
|
||||
mod.HEAPU32[iflagsPtr / 4] = 0;
|
||||
try {
|
||||
const rc = requireWasmFunction(mod, "lckins_forward")(
|
||||
jointsPtr,
|
||||
jointValues.length,
|
||||
posePtr,
|
||||
fflagsPtr,
|
||||
iflagsPtr,
|
||||
);
|
||||
return {
|
||||
rc,
|
||||
pose: poseObjectFromValues(readDoubleArray(mod, posePtr, 9)),
|
||||
fflags: mod.HEAPU32[fflagsPtr / 4],
|
||||
iflags: mod.HEAPU32[iflagsPtr / 4],
|
||||
};
|
||||
} finally {
|
||||
mod._free(jointsPtr);
|
||||
mod._free(posePtr);
|
||||
mod._free(fflagsPtr);
|
||||
mod._free(iflagsPtr);
|
||||
}
|
||||
},
|
||||
|
||||
inverse(pose, jointCount = 5, options = {}) {
|
||||
const posePtr = writeDoubleArray(mod, poseValuesFromObject(pose));
|
||||
const jointsPtr = mod._malloc(jointCount * 8);
|
||||
const iflagsPtr = mod._malloc(8);
|
||||
const fflagsPtr = mod._malloc(8);
|
||||
const seedJoints = Array.isArray(options.seedJoints)
|
||||
? options.seedJoints.map(Number)
|
||||
: [];
|
||||
mod.HEAPF64.fill(0, jointsPtr / 8, jointsPtr / 8 + jointCount);
|
||||
mod.HEAPF64.set(seedJoints.slice(0, jointCount), jointsPtr / 8);
|
||||
mod.HEAPU32[iflagsPtr / 4] = 0;
|
||||
mod.HEAPU32[fflagsPtr / 4] = 0;
|
||||
try {
|
||||
const rc = requireWasmFunction(mod, "lckins_inverse")(
|
||||
posePtr,
|
||||
jointsPtr,
|
||||
jointCount,
|
||||
iflagsPtr,
|
||||
fflagsPtr,
|
||||
);
|
||||
return {
|
||||
rc,
|
||||
joints: readDoubleArray(mod, jointsPtr, jointCount),
|
||||
iflags: mod.HEAPU32[iflagsPtr / 4],
|
||||
fflags: mod.HEAPU32[fflagsPtr / 4],
|
||||
};
|
||||
} finally {
|
||||
mod._free(posePtr);
|
||||
mod._free(jointsPtr);
|
||||
mod._free(iflagsPtr);
|
||||
mod._free(fflagsPtr);
|
||||
}
|
||||
},
|
||||
|
||||
runProbe() {
|
||||
const resultPtr = requireWasmFunction(mod, "lckins_run_probe")();
|
||||
if (!resultPtr) {
|
||||
throw new Error("lckins_run_probe returned null");
|
||||
}
|
||||
try {
|
||||
return mod.UTF8ToString(resultPtr);
|
||||
} finally {
|
||||
requireWasmFunction(mod, "lckins_free_string")(resultPtr);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
132
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-task-hal.js
vendored
Normal file
132
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-task-hal.js
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
import createLinuxCncTaskHalModule from "../../../build/wasm/task-hal/linuxcnc_task_hal.js";
|
||||
|
||||
const SEMANTIC_BOUNDARY = "linuxcnc_task_motion_hal_wasm_phase4_minimal";
|
||||
|
||||
function allocCString(mod, value) {
|
||||
const text = String(value ?? "");
|
||||
const bytes = mod.lengthBytesUTF8(text) + 1;
|
||||
const ptr = mod._malloc(bytes);
|
||||
mod.stringToUTF8(text, ptr, bytes);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
function withCString(mod, value, fn) {
|
||||
const ptr = allocCString(mod, value);
|
||||
try {
|
||||
return fn(ptr);
|
||||
} finally {
|
||||
mod._free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
function requireWasmFunction(mod, functionName) {
|
||||
const fn = mod[`_${functionName}`];
|
||||
if (typeof fn !== "function") {
|
||||
throw new Error(`linuxcnc task/HAL WASM missing ${functionName}; rebuild wasm-port/tools/build_task_hal_wasm.sh`);
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
|
||||
function readJson(mod, functionName) {
|
||||
const fn = requireWasmFunction(mod, functionName);
|
||||
let bytes = 131072;
|
||||
for (let attempt = 0; attempt < 2; attempt += 1) {
|
||||
const ptr = mod._malloc(bytes);
|
||||
try {
|
||||
const rc = fn(ptr, bytes);
|
||||
if (rc === 0) {
|
||||
return JSON.parse(mod.UTF8ToString(ptr));
|
||||
}
|
||||
if (rc > bytes) {
|
||||
bytes = rc;
|
||||
continue;
|
||||
}
|
||||
throw new Error(`${functionName} failed with rc=${rc}`);
|
||||
} finally {
|
||||
mod._free(ptr);
|
||||
}
|
||||
}
|
||||
throw new Error(`${functionName} output exceeded buffer`);
|
||||
}
|
||||
|
||||
function callWithJson(mod, functionName, payload) {
|
||||
const fn = requireWasmFunction(mod, functionName);
|
||||
return withCString(mod, JSON.stringify(payload ?? {}), (ptr) => fn(ptr));
|
||||
}
|
||||
|
||||
export async function createLinuxCncTaskHalSdk(moduleOptions = {}) {
|
||||
const mod = await createLinuxCncTaskHalModule(moduleOptions);
|
||||
|
||||
return {
|
||||
apiName: "linuxcnc-task-hal-wasm-sdk",
|
||||
semanticBoundary: SEMANTIC_BOUNDARY,
|
||||
module: mod,
|
||||
|
||||
readiness() {
|
||||
return {
|
||||
apiName: "linuxcnc-task-hal-wasm-sdk-readiness",
|
||||
loaded: true,
|
||||
semanticBoundary: SEMANTIC_BOUNDARY,
|
||||
taskRuntimeReady: typeof mod._lctask_init_session === "function",
|
||||
motionRuntimeReady: typeof mod._lcmot_step_servo === "function",
|
||||
halRuntimeReady: typeof mod._lchal_get_snapshot_json === "function",
|
||||
nativeTaskReady: false,
|
||||
nativeHalSyncReady: false,
|
||||
};
|
||||
},
|
||||
|
||||
initSession(session = {}) {
|
||||
const rc = callWithJson(mod, "lctask_init_session", session);
|
||||
if (rc !== 0) {
|
||||
throw new Error(`lctask_init_session failed with rc=${rc}`);
|
||||
}
|
||||
return rc;
|
||||
},
|
||||
|
||||
stageFile(path, text) {
|
||||
return withCString(mod, path, (pathPtr) =>
|
||||
withCString(mod, text, (textPtr) =>
|
||||
requireWasmFunction(mod, "lctask_stage_file")(pathPtr, textPtr),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
openProgram(path) {
|
||||
return withCString(mod, path, (pathPtr) =>
|
||||
requireWasmFunction(mod, "lctask_open_program")(pathPtr),
|
||||
);
|
||||
},
|
||||
|
||||
loadProgramMotionPlan(plan) {
|
||||
return callWithJson(mod, "lctask_load_program_motion_plan_json", plan);
|
||||
},
|
||||
|
||||
sendCommand(command) {
|
||||
return callWithJson(mod, "lctask_send_command_json", command);
|
||||
},
|
||||
|
||||
runCycles({
|
||||
taskPeriodNs = 10000000,
|
||||
servoPeriodNs = 1000000,
|
||||
taskCycles = 1,
|
||||
} = {}) {
|
||||
return requireWasmFunction(mod, "lctask_run_cycles")(
|
||||
Number(taskPeriodNs) || 10000000,
|
||||
Number(servoPeriodNs) || 1000000,
|
||||
Number(taskCycles) || 0,
|
||||
);
|
||||
},
|
||||
|
||||
readStatus() {
|
||||
return readJson(mod, "lctask_read_status_json");
|
||||
},
|
||||
|
||||
readEvents() {
|
||||
return readJson(mod, "lctask_read_events_json");
|
||||
},
|
||||
|
||||
resetSession() {
|
||||
return requireWasmFunction(mod, "lctask_reset_session")();
|
||||
},
|
||||
};
|
||||
}
|
||||
228
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-tp.js
vendored
Normal file
228
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/linuxcnc-tp.js
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
import createLinuxCncTpModule from "../../../build/wasm/tp/linuxcnc_tp.js";
|
||||
|
||||
const SEMANTIC_BOUNDARY = "linuxcnc_tp_queue_runtime_timing_from_canonical_motion";
|
||||
|
||||
function allocCString(mod, value) {
|
||||
const bytes = mod.lengthBytesUTF8(value) + 1;
|
||||
const ptr = mod._malloc(bytes);
|
||||
mod.stringToUTF8(value, ptr, bytes);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
function callTiming(mod, payload) {
|
||||
const inputPtr = allocCString(mod, JSON.stringify(payload));
|
||||
let resultPtr = 0;
|
||||
try {
|
||||
resultPtr = mod._lctp_run_canonical_motion_timing(inputPtr);
|
||||
if (!resultPtr) {
|
||||
throw new Error("lctp_run_canonical_motion_timing returned null");
|
||||
}
|
||||
const text = mod.UTF8ToString(resultPtr);
|
||||
const result = JSON.parse(text);
|
||||
if (result.ok !== true) {
|
||||
throw new Error(result.error || "LinuxCNC TP queue timing failed");
|
||||
}
|
||||
return result;
|
||||
} finally {
|
||||
if (resultPtr) mod._lctp_free_string(resultPtr);
|
||||
mod._free(inputPtr);
|
||||
}
|
||||
}
|
||||
|
||||
export async function createLinuxCncTpSdk(moduleOptions = {}) {
|
||||
const mod = await createLinuxCncTpModule(moduleOptions);
|
||||
|
||||
return {
|
||||
apiName: "linuxcnc-tp-wasm-sdk",
|
||||
semanticBoundary: SEMANTIC_BOUNDARY,
|
||||
module: mod,
|
||||
|
||||
readiness() {
|
||||
return {
|
||||
apiName: "linuxcnc-tp-wasm-sdk-readiness",
|
||||
loaded: true,
|
||||
semanticBoundary: SEMANTIC_BOUNDARY,
|
||||
runCanonicalMotionTimingReady: typeof mod._lctp_run_canonical_motion_timing === "function",
|
||||
};
|
||||
},
|
||||
|
||||
runCanonicalMotionTiming({ motion = [], options = {} } = {}) {
|
||||
const result = callTiming(mod, {
|
||||
...options,
|
||||
motion: motion.map((event, index) => ({
|
||||
index,
|
||||
line: Number.isFinite(Number(event.line)) ? Number(event.line) : -1,
|
||||
type: event.type,
|
||||
feedRate: Number.isFinite(Number(event.feedRate)) ? Number(event.feedRate) : 0,
|
||||
x: numberOrZero(event.axes?.x),
|
||||
y: numberOrZero(event.axes?.y),
|
||||
z: numberOrZero(event.axes?.z),
|
||||
a: numberOrZero(event.axes?.a),
|
||||
b: numberOrZero(event.axes?.b),
|
||||
c: numberOrZero(event.axes?.c),
|
||||
u: numberOrZero(event.axes?.u),
|
||||
v: numberOrZero(event.axes?.v),
|
||||
w: numberOrZero(event.axes?.w),
|
||||
plane: numberOrZero(event.axes?.arc?.plane),
|
||||
centerFirst: numberOrZero(event.axes?.arc?.centerFirst),
|
||||
centerSecond: numberOrZero(event.axes?.arc?.centerSecond),
|
||||
rotation: numberOrZero(event.axes?.arc?.rotation),
|
||||
axisEndPoint: numberOrZero(event.axes?.arc?.axisEndPoint),
|
||||
})),
|
||||
});
|
||||
return normalizeTimingResult(result, motion);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeTimingResult(result, motion) {
|
||||
const rawSegmentsByIndex = new Map((result.segments || []).map((segment) => [segment.index, segment]));
|
||||
let elapsedSeconds = 0;
|
||||
const segments = motion.map((event, index) => {
|
||||
const raw = rawSegmentsByIndex.get(index);
|
||||
const durationSeconds = Math.max(Number(raw?.durationSeconds) || 0, 0);
|
||||
elapsedSeconds += durationSeconds;
|
||||
return {
|
||||
index,
|
||||
line: event.line ?? null,
|
||||
type: event.type,
|
||||
motionClass: event.type === "STRAIGHT_TRAVERSE" ? "rapid" : "feed",
|
||||
durationSeconds,
|
||||
elapsedSeconds,
|
||||
currentVelocity: Number(raw?.velocity) || 0,
|
||||
velocityMmPerMin: (Number(raw?.velocity) || 0) * 60,
|
||||
queueDepth: Number(raw?.queueDepth) || 0,
|
||||
activeDepth: Number(raw?.activeDepth) || 0,
|
||||
cycles: Number(raw?.cycles) || 0,
|
||||
axes: event.axes || {},
|
||||
runtimeAxes: axesFromRuntimeRecord(raw, event.axes || {}),
|
||||
tp: raw || null,
|
||||
};
|
||||
});
|
||||
const rawSamples = Array.isArray(result.samples) && result.samples.length > 0
|
||||
? result.samples
|
||||
: synthesizeSamplesFromSegments(result.segments || []);
|
||||
const samples = normalizeSamples(rawSamples);
|
||||
|
||||
const feedSeconds = segments
|
||||
.filter((segment) => segment.motionClass === "feed")
|
||||
.reduce((total, segment) => total + segment.durationSeconds, 0);
|
||||
const rapidSeconds = segments
|
||||
.filter((segment) => segment.motionClass === "rapid")
|
||||
.reduce((total, segment) => total + segment.durationSeconds, 0);
|
||||
|
||||
return {
|
||||
apiName: "web-rtcp-5axis-linuxcnc-tp-program-timing",
|
||||
semanticBoundary: SEMANTIC_BOUNDARY,
|
||||
sourceBasis: "LinuxCNC interpreter canonical motion events queued through LinuxCNC src/emc/tp WASM",
|
||||
plannerRuntimeReady: result.ok === true
|
||||
&& result.addFailures === 0
|
||||
&& result.tpDone === 1
|
||||
&& segments.length === motion.length,
|
||||
sampleCount: Number(result.sampleCount) || samples.length,
|
||||
samples,
|
||||
totalSeconds: elapsedSeconds,
|
||||
totalMinutes: elapsedSeconds / 60,
|
||||
feedSeconds,
|
||||
rapidSeconds,
|
||||
motionCount: motion.length,
|
||||
emittedMotionCount: result.emittedMotionCount || 0,
|
||||
acceptedMotionCount: result.acceptedMotionCount || 0,
|
||||
totalCycles: result.totalCycles || 0,
|
||||
cycleTime: result.cycleTime || 0.001,
|
||||
addFailures: result.addFailures || 0,
|
||||
tpDone: result.tpDone === 1,
|
||||
finalQueueDepth: result.finalQueueDepth || 0,
|
||||
segments,
|
||||
raw: result,
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeSamples(samples) {
|
||||
return samples.map((sample, index) => ({
|
||||
sampleIndex: Number(sample.sampleIndex ?? index),
|
||||
cycle: Number(sample.cycle) || 0,
|
||||
timeSeconds: Number(sample.timeSeconds) || 0,
|
||||
motionIndex: Number(sample.motionIndex) || 0,
|
||||
line: Number.isFinite(Number(sample.line)) ? Number(sample.line) : null,
|
||||
type: sample.type || "-",
|
||||
axes: {
|
||||
x: numberOrZero(sample.x),
|
||||
y: numberOrZero(sample.y),
|
||||
z: numberOrZero(sample.z),
|
||||
a: numberOrZero(sample.a),
|
||||
b: numberOrZero(sample.b),
|
||||
c: numberOrZero(sample.c),
|
||||
u: numberOrZero(sample.u),
|
||||
v: numberOrZero(sample.v),
|
||||
w: numberOrZero(sample.w),
|
||||
},
|
||||
currentVelocity: numberOrZero(sample.currentVelocity),
|
||||
currentVelocityMmPerMin: numberOrZero(sample.currentVelocity) * 60,
|
||||
requestedVelocity: numberOrZero(sample.requestedVelocity),
|
||||
requestedVelocityMmPerMin: numberOrZero(sample.requestedVelocity) * 60,
|
||||
distanceToGo: numberOrZero(sample.distanceToGo),
|
||||
dtg: {
|
||||
x: numberOrZero(sample.dtgX),
|
||||
y: numberOrZero(sample.dtgY),
|
||||
z: numberOrZero(sample.dtgZ),
|
||||
},
|
||||
queueDepth: Number(sample.queueDepth) || 0,
|
||||
activeDepth: Number(sample.activeDepth) || 0,
|
||||
}));
|
||||
}
|
||||
|
||||
function synthesizeSamplesFromSegments(segments) {
|
||||
return segments.map((segment, index) => ({
|
||||
sampleIndex: index,
|
||||
cycle: Number(segment.cycles) || 0,
|
||||
timeSeconds: Number(segment.elapsedSeconds) || 0,
|
||||
motionIndex: Number(segment.index) || index,
|
||||
line: segment.line,
|
||||
type: segment.type,
|
||||
x: segment.x,
|
||||
y: segment.y,
|
||||
z: segment.z,
|
||||
a: segment.a,
|
||||
b: segment.b,
|
||||
c: segment.c,
|
||||
u: segment.u,
|
||||
v: segment.v,
|
||||
w: segment.w,
|
||||
currentVelocity: segment.velocity,
|
||||
requestedVelocity: segment.velocity,
|
||||
distanceToGo: segment.distanceToGo ?? 0,
|
||||
dtgX: segment.dtgX ?? 0,
|
||||
dtgY: segment.dtgY ?? 0,
|
||||
dtgZ: segment.dtgZ ?? 0,
|
||||
queueDepth: segment.queueDepth,
|
||||
activeDepth: segment.activeDepth,
|
||||
}));
|
||||
}
|
||||
|
||||
function axesFromRuntimeRecord(record, fallback = {}) {
|
||||
return {
|
||||
x: numberOrFallback(record?.x, fallback.x, 0),
|
||||
y: numberOrFallback(record?.y, fallback.y, 0),
|
||||
z: numberOrFallback(record?.z, fallback.z, 0),
|
||||
a: numberOrFallback(record?.a, fallback.a, 0),
|
||||
b: numberOrFallback(record?.b, fallback.b, 0),
|
||||
c: numberOrFallback(record?.c, fallback.c, 0),
|
||||
u: numberOrFallback(record?.u, fallback.u, 0),
|
||||
v: numberOrFallback(record?.v, fallback.v, 0),
|
||||
w: numberOrFallback(record?.w, fallback.w, 0),
|
||||
};
|
||||
}
|
||||
|
||||
function numberOrFallback(...values) {
|
||||
for (const value of values) {
|
||||
const number = Number(value);
|
||||
if (Number.isFinite(number)) return number;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function numberOrZero(value) {
|
||||
const number = Number(value);
|
||||
return Number.isFinite(number) ? number : 0;
|
||||
}
|
||||
486
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/sim-config-staging.js
vendored
Normal file
486
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/runtime/sdk/src/sim-config-staging.js
vendored
Normal file
@@ -0,0 +1,486 @@
|
||||
function cleanManifest(manifestText) {
|
||||
return manifestText
|
||||
.split("\n")
|
||||
.map((line) => line.trim())
|
||||
.filter((line) => line && !line.startsWith("#"));
|
||||
}
|
||||
|
||||
function normalizeRel(path) {
|
||||
const parts = [];
|
||||
for (const part of path.split("/")) {
|
||||
if (!part || part === ".") {
|
||||
continue;
|
||||
}
|
||||
if (part === "..") {
|
||||
parts.pop();
|
||||
continue;
|
||||
}
|
||||
parts.push(part);
|
||||
}
|
||||
return parts.join("/");
|
||||
}
|
||||
|
||||
function dirname(path) {
|
||||
const clean = normalizeRel(path);
|
||||
const index = clean.lastIndexOf("/");
|
||||
return index === -1 ? "" : clean.slice(0, index);
|
||||
}
|
||||
|
||||
function basename(path) {
|
||||
const clean = normalizeRel(path);
|
||||
const index = clean.lastIndexOf("/");
|
||||
return index === -1 ? clean : clean.slice(index + 1);
|
||||
}
|
||||
|
||||
function stripIniComment(line) {
|
||||
const hash = line.indexOf("#");
|
||||
const semicolon = line.indexOf(";");
|
||||
const indexes = [hash, semicolon].filter((index) => index >= 0);
|
||||
if (indexes.length === 0) {
|
||||
return line;
|
||||
}
|
||||
return line.slice(0, Math.min(...indexes));
|
||||
}
|
||||
|
||||
function parseIni(iniText) {
|
||||
const values = new Map();
|
||||
let section = "";
|
||||
for (const rawLine of iniText.split("\n")) {
|
||||
const sectionMatch = rawLine.match(/^\s*\[([^\]]+)\]/);
|
||||
if (sectionMatch) {
|
||||
section = sectionMatch[1].trim().toUpperCase();
|
||||
continue;
|
||||
}
|
||||
|
||||
const line = stripIniComment(rawLine);
|
||||
const equals = line.indexOf("=");
|
||||
if (equals === -1 || !section) {
|
||||
continue;
|
||||
}
|
||||
const key = line.slice(0, equals).trim().toUpperCase();
|
||||
const value = line.slice(equals + 1).trim();
|
||||
if (!key || !value) {
|
||||
continue;
|
||||
}
|
||||
const mapKey = `${section}.${key}`;
|
||||
const existing = values.get(mapKey) ?? [];
|
||||
existing.push(value);
|
||||
values.set(mapKey, existing);
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
function firstIniValue(values, section, key) {
|
||||
return values.get(`${section.toUpperCase()}.${key.toUpperCase()}`)?.[0] ?? null;
|
||||
}
|
||||
|
||||
function allIniValues(values, section, key) {
|
||||
return values.get(`${section.toUpperCase()}.${key.toUpperCase()}`) ?? [];
|
||||
}
|
||||
|
||||
function splitSearchPath(value) {
|
||||
return value.split(":").map((entry) => entry.trim()).filter(Boolean);
|
||||
}
|
||||
|
||||
function sourceRelFor(machineRel, path) {
|
||||
return normalizeRel(`configs/sim/${machineRel}/${path}`);
|
||||
}
|
||||
|
||||
function targetPathFor(wasmDir, targetRel) {
|
||||
return `${wasmDir}/${normalizeRel(targetRel)}`;
|
||||
}
|
||||
|
||||
function isUserMCodePath(path) {
|
||||
return /^M1\d\d$/i.test(basename(path));
|
||||
}
|
||||
|
||||
function isSubroutinePath(path) {
|
||||
return path.toLowerCase().endsWith(".ngc");
|
||||
}
|
||||
|
||||
function findUpwardByBasename(manifestSet, sourceDir, fileName, searchRootRel) {
|
||||
let current = sourceDir;
|
||||
while (!searchRootRel || current === searchRootRel || current.startsWith(`${searchRootRel}/`)) {
|
||||
const candidate = normalizeRel(`${current}/${fileName}`);
|
||||
if (manifestSet.has(candidate)) {
|
||||
return candidate;
|
||||
}
|
||||
if (!current || current === searchRootRel) {
|
||||
break;
|
||||
}
|
||||
current = dirname(current);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function sourceForReference(manifestSet, sourceDir, reference, searchRootRel) {
|
||||
if (!reference || reference.startsWith("/")) {
|
||||
return null;
|
||||
}
|
||||
const sourceRel = normalizeRel(`${sourceDir}/${reference}`);
|
||||
if (manifestSet.has(sourceRel)) {
|
||||
return sourceRel;
|
||||
}
|
||||
return findUpwardByBasename(manifestSet, sourceDir, basename(reference), searchRootRel);
|
||||
}
|
||||
|
||||
function addPlannedFile(plan, manifestSet, sourceRel, targetRel, options = {}) {
|
||||
if (!sourceRel || !manifestSet.has(sourceRel)) {
|
||||
if (options.required) {
|
||||
throw new Error(`missing vendored sim-config file: ${sourceRel}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const existing = plan.get(sourceRel);
|
||||
const executable = options.executable || isUserMCodePath(sourceRel);
|
||||
if (existing) {
|
||||
existing.executable ||= executable;
|
||||
return;
|
||||
}
|
||||
|
||||
plan.set(sourceRel, {
|
||||
sourceRel,
|
||||
wasmPath: targetPathFor(options.wasmDir, targetRel),
|
||||
path: targetPathFor(options.wasmDir, targetRel),
|
||||
executable,
|
||||
});
|
||||
}
|
||||
|
||||
function addDirectoryFiles(plan, manifestEntries, manifestSet, sourceDir, targetDir, predicate, options) {
|
||||
const prefix = sourceDir ? `${sourceDir}/` : "";
|
||||
for (const sourceRel of manifestEntries) {
|
||||
if (!sourceRel.startsWith(prefix)) {
|
||||
continue;
|
||||
}
|
||||
const childRel = sourceRel.slice(prefix.length);
|
||||
if (childRel.includes("/") || !predicate(sourceRel)) {
|
||||
continue;
|
||||
}
|
||||
addPlannedFile(plan, manifestSet, sourceRel, normalizeRel(`${targetDir}/${childRel}`), options);
|
||||
}
|
||||
}
|
||||
|
||||
function remapNgcNames(iniValues) {
|
||||
const names = [];
|
||||
for (const remap of allIniValues(iniValues, "RS274NGC", "REMAP")) {
|
||||
const match = remap.match(/(?:^|\s)ngc=([^\s]+)/i);
|
||||
if (match) {
|
||||
names.push(`${match[1]}.ngc`);
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
function sectionValues(iniValues, section) {
|
||||
const prefix = `${section.toUpperCase()}.`;
|
||||
const values = [];
|
||||
for (const [key, entries] of iniValues.entries()) {
|
||||
if (!key.startsWith(prefix)) {
|
||||
continue;
|
||||
}
|
||||
for (const value of entries) {
|
||||
values.push({ key: key.slice(prefix.length), value });
|
||||
}
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
function valuesMatching(iniValues, section, keys) {
|
||||
const wanted = new Set(keys.map((key) => key.toUpperCase()));
|
||||
return sectionValues(iniValues, section)
|
||||
.filter((entry) => wanted.has(entry.key))
|
||||
.map((entry) => entry.value);
|
||||
}
|
||||
|
||||
function looksLikePythonReference(value) {
|
||||
return /(^|\s|=|:)["']?[^"'\s]*\.py(["'\s]|$)/i.test(value);
|
||||
}
|
||||
|
||||
function userMCodesInText(text) {
|
||||
const codes = new Set();
|
||||
for (const match of text.matchAll(/(?<![A-Za-z0-9_])M\s*(1\d\d)(?![0-9])/gi)) {
|
||||
codes.add(`M${match[1]}`);
|
||||
}
|
||||
return [...codes].sort();
|
||||
}
|
||||
|
||||
function vendoredUserMCodes({
|
||||
manifestEntries,
|
||||
sourceDir,
|
||||
normalizedSearchRoot,
|
||||
userMPathValues,
|
||||
}) {
|
||||
const manifestSet = new Set(manifestEntries);
|
||||
const executableCodes = new Set();
|
||||
for (const dirEntry of userMPathValues.flatMap(splitSearchPath)) {
|
||||
if (dirEntry.startsWith("/")) {
|
||||
continue;
|
||||
}
|
||||
const sourceUserMDir = normalizeRel(`${sourceDir}/${dirEntry}`);
|
||||
const prefix = sourceUserMDir ? `${sourceUserMDir}/` : "";
|
||||
for (const sourceRel of manifestEntries) {
|
||||
if (
|
||||
sourceRel.startsWith(prefix) &&
|
||||
!sourceRel.slice(prefix.length).includes("/") &&
|
||||
isUserMCodePath(sourceRel)
|
||||
) {
|
||||
executableCodes.add(basename(sourceRel).toUpperCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const dirEntry of userMPathValues.flatMap(splitSearchPath)) {
|
||||
if (dirEntry.startsWith("/")) {
|
||||
continue;
|
||||
}
|
||||
const sourceUserMDir = normalizeRel(`${sourceDir}/${dirEntry}`);
|
||||
for (let code = 100; code <= 199; code += 1) {
|
||||
const candidate = findUpwardByBasename(
|
||||
manifestSet,
|
||||
sourceUserMDir,
|
||||
`M${code}`,
|
||||
normalizedSearchRoot,
|
||||
);
|
||||
if (candidate) {
|
||||
executableCodes.add(`M${code}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [...executableCodes].sort();
|
||||
}
|
||||
|
||||
export function analyzeIniRuntimeBoundaries({
|
||||
manifestText = "",
|
||||
sourceRootRel,
|
||||
sourceSearchRootRel = sourceRootRel,
|
||||
iniFile = "",
|
||||
iniText,
|
||||
executionTexts = [],
|
||||
}) {
|
||||
const manifestEntries = cleanManifest(manifestText);
|
||||
const iniValues = parseIni(iniText);
|
||||
const normalizedSourceRoot = normalizeRel(sourceRootRel);
|
||||
const normalizedSearchRoot = normalizeRel(sourceSearchRootRel);
|
||||
const sourceDir = normalizeRel(`${normalizedSourceRoot}/${dirname(iniFile)}`);
|
||||
const userMPathValues = allIniValues(iniValues, "RS274NGC", "USER_M_PATH");
|
||||
const halValues = valuesMatching(iniValues, "HAL", [
|
||||
"HALFILE",
|
||||
"HALCMD",
|
||||
"POSTGUI_HALFILE",
|
||||
"HALUI",
|
||||
]);
|
||||
const displayValues = valuesMatching(iniValues, "DISPLAY", [
|
||||
"DISPLAY",
|
||||
"PYVCP",
|
||||
"GLADEVCP",
|
||||
"EMBED_TAB_COMMAND",
|
||||
]);
|
||||
const halUiMdiCommands = allIniValues(iniValues, "HALUI", "MDI_COMMAND");
|
||||
const dbProgram = firstIniValue(iniValues, "EMCIO", "DB_PROGRAM");
|
||||
const remapValues = allIniValues(iniValues, "RS274NGC", "REMAP");
|
||||
const pythonRemapReferences = [
|
||||
...sectionValues(iniValues, "PYTHON").map((entry) => entry.value),
|
||||
...remapValues.filter((value) => /(?:^|\s)python=/i.test(value)),
|
||||
];
|
||||
const pythonUiReferences = [
|
||||
...displayValues.filter(looksLikePythonReference),
|
||||
...(dbProgram && looksLikePythonReference(dbProgram) ? [dbProgram] : []),
|
||||
];
|
||||
const pythonReferences = [...pythonRemapReferences, ...pythonUiReferences];
|
||||
const vendoredUserMCodeList = vendoredUserMCodes({
|
||||
manifestEntries,
|
||||
sourceDir,
|
||||
normalizedSearchRoot,
|
||||
userMPathValues,
|
||||
});
|
||||
const vendoredUserMCodeSet = new Set(vendoredUserMCodeList);
|
||||
const hasUserMPath = userMPathValues.length > 0;
|
||||
const executionUserMCodes = [...new Set(executionTexts.flatMap(userMCodesInText))].sort();
|
||||
const unstagedExecutionUserMCodes = executionUserMCodes
|
||||
.filter((code) => !vendoredUserMCodeSet.has(code));
|
||||
const hasExternalUserMUse = hasUserMPath && unstagedExecutionUserMCodes.length > 0;
|
||||
|
||||
const dependencies = [];
|
||||
if (dbProgram) {
|
||||
dependencies.push("tool_database_process");
|
||||
}
|
||||
if (halValues.length > 0) {
|
||||
dependencies.push("hal_process");
|
||||
}
|
||||
if (displayValues.some((value) => !/^axis$/i.test(value))) {
|
||||
dependencies.push("ui_process");
|
||||
}
|
||||
if (halUiMdiCommands.length > 0) {
|
||||
dependencies.push("halui_mdi_process");
|
||||
}
|
||||
if (pythonReferences.length > 0) {
|
||||
dependencies.push("python_runtime");
|
||||
}
|
||||
if (hasExternalUserMUse) {
|
||||
dependencies.push("external_user_m_process");
|
||||
}
|
||||
|
||||
let recommendedBlockedKind = "-";
|
||||
if (dbProgram && dbProgram !== "./db_nonran.py") {
|
||||
recommendedBlockedKind = "L4-TOOL-DB";
|
||||
} else if (hasExternalUserMUse) {
|
||||
recommendedBlockedKind = "L4-USER-M-PROCESS";
|
||||
} else if (pythonRemapReferences.length > 0) {
|
||||
recommendedBlockedKind = "L4-PYTHON-REMAP";
|
||||
}
|
||||
|
||||
return {
|
||||
dependencies: [...new Set(dependencies)].sort(),
|
||||
recommendedBlockedKind,
|
||||
toolDatabaseProgram: dbProgram ?? "",
|
||||
halRuntime: {
|
||||
values: halValues,
|
||||
requiresProcess: halValues.length > 0,
|
||||
},
|
||||
uiRuntime: {
|
||||
values: displayValues,
|
||||
requiresProcess: displayValues.some((value) => !/^axis$/i.test(value)),
|
||||
},
|
||||
haluiRuntime: {
|
||||
mdiCommands: halUiMdiCommands,
|
||||
requiresProcess: halUiMdiCommands.length > 0,
|
||||
},
|
||||
userMRuntime: {
|
||||
paths: userMPathValues,
|
||||
vendoredExecutableCount: vendoredUserMCodeList.length,
|
||||
executionCodes: executionUserMCodes,
|
||||
unstagedExecutionCodes: unstagedExecutionUserMCodes,
|
||||
requiresExternalProcess: hasExternalUserMUse,
|
||||
},
|
||||
pythonRuntime: {
|
||||
references: pythonReferences,
|
||||
remapReferences: pythonRemapReferences,
|
||||
uiReferences: pythonUiReferences,
|
||||
requiresProcess: pythonReferences.length > 0,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function planSimConfigStaging({
|
||||
manifestText,
|
||||
machineRel,
|
||||
iniFile,
|
||||
iniText,
|
||||
programFile = null,
|
||||
wasmDir = `/work/sim/${machineRel}`,
|
||||
}) {
|
||||
return planIniFileContextStaging({
|
||||
manifestText,
|
||||
sourceRootRel: `configs/sim/${machineRel}`,
|
||||
sourceSearchRootRel: "configs/sim",
|
||||
iniFile,
|
||||
iniText,
|
||||
programFile,
|
||||
wasmDir,
|
||||
});
|
||||
}
|
||||
|
||||
export function planIniFileContextStaging({
|
||||
manifestText,
|
||||
sourceRootRel,
|
||||
iniFile,
|
||||
iniText,
|
||||
programFile = null,
|
||||
wasmDir,
|
||||
sourceSearchRootRel = sourceRootRel,
|
||||
}) {
|
||||
const manifestEntries = cleanManifest(manifestText);
|
||||
const manifestSet = new Set(manifestEntries);
|
||||
const iniValues = parseIni(iniText);
|
||||
const plan = new Map();
|
||||
const normalizedSourceRoot = normalizeRel(sourceRootRel);
|
||||
const normalizedSearchRoot = normalizeRel(sourceSearchRootRel);
|
||||
const sourceDir = normalizeRel(`${normalizedSourceRoot}/${dirname(iniFile)}`);
|
||||
const iniSourceRel = normalizeRel(`${normalizedSourceRoot}/${iniFile}`);
|
||||
const programReference = programFile ?? firstIniValue(iniValues, "DISPLAY", "OPEN_FILE");
|
||||
|
||||
addPlannedFile(plan, manifestSet, iniSourceRel, iniFile, { wasmDir, required: true });
|
||||
if (programReference) {
|
||||
const programSourceRel = sourceForReference(
|
||||
manifestSet,
|
||||
sourceDir,
|
||||
programReference,
|
||||
normalizedSearchRoot,
|
||||
);
|
||||
addPlannedFile(plan, manifestSet, programSourceRel, programReference, {
|
||||
wasmDir,
|
||||
required: true,
|
||||
});
|
||||
}
|
||||
|
||||
for (const [section, key] of [
|
||||
["EMCIO", "TOOL_TABLE"],
|
||||
["RS274NGC", "PARAMETER_FILE"],
|
||||
]) {
|
||||
const reference = firstIniValue(iniValues, section, key);
|
||||
if (!reference) {
|
||||
continue;
|
||||
}
|
||||
const sourceRel = sourceForReference(manifestSet, sourceDir, reference, normalizedSearchRoot);
|
||||
addPlannedFile(plan, manifestSet, sourceRel, reference, { wasmDir });
|
||||
}
|
||||
|
||||
const subroutineDirs = allIniValues(iniValues, "RS274NGC", "SUBROUTINE_PATH")
|
||||
.flatMap(splitSearchPath);
|
||||
for (const dirEntry of subroutineDirs) {
|
||||
if (dirEntry.startsWith("/")) {
|
||||
continue;
|
||||
}
|
||||
const sourceSubdir = normalizeRel(`${sourceDir}/${dirEntry}`);
|
||||
const targetSubdir = normalizeRel(dirEntry);
|
||||
addDirectoryFiles(
|
||||
plan,
|
||||
manifestEntries,
|
||||
manifestSet,
|
||||
sourceSubdir,
|
||||
targetSubdir,
|
||||
isSubroutinePath,
|
||||
{ wasmDir },
|
||||
);
|
||||
}
|
||||
|
||||
for (const dirEntry of allIniValues(iniValues, "RS274NGC", "USER_M_PATH").flatMap(splitSearchPath)) {
|
||||
if (dirEntry.startsWith("/")) {
|
||||
continue;
|
||||
}
|
||||
const sourceUserMDir = normalizeRel(`${sourceDir}/${dirEntry}`);
|
||||
const targetUserMDir = normalizeRel(dirEntry);
|
||||
addDirectoryFiles(
|
||||
plan,
|
||||
manifestEntries,
|
||||
manifestSet,
|
||||
sourceUserMDir,
|
||||
targetUserMDir,
|
||||
isUserMCodePath,
|
||||
{ wasmDir, executable: true },
|
||||
);
|
||||
}
|
||||
|
||||
for (const remapName of remapNgcNames(iniValues)) {
|
||||
for (const dirEntry of subroutineDirs) {
|
||||
const sourceRel = sourceForReference(
|
||||
manifestSet,
|
||||
normalizeRel(`${sourceDir}/${dirEntry}`),
|
||||
remapName,
|
||||
normalizedSearchRoot,
|
||||
);
|
||||
addPlannedFile(plan, manifestSet, sourceRel, normalizeRel(`${dirEntry}/${remapName}`), {
|
||||
wasmDir,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
wasmDir,
|
||||
iniPath: targetPathFor(wasmDir, iniFile),
|
||||
programPath: programReference ? targetPathFor(wasmDir, programReference) : null,
|
||||
files: [...plan.values()],
|
||||
};
|
||||
}
|
||||
648
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/tools/source-manifest.txt
vendored
Normal file
648
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/wasm-port/tools/source-manifest.txt
vendored
Normal file
@@ -0,0 +1,648 @@
|
||||
src/emc/ini/inifile.cc
|
||||
src/emc/ini/inifile.h
|
||||
src/emc/ini/inifile.hh
|
||||
src/rtapi/rtapi_stdint.h
|
||||
src/rtapi/rtapi_bool.h
|
||||
src/rtapi/rtapi_limits.h
|
||||
src/rtapi/rtapi_atomic.h
|
||||
src/rtapi/rtapi_slab.h
|
||||
src/rtapi/rtapi_string.h
|
||||
src/rtapi/rtapi_gfp.h
|
||||
src/rtapi/rtapi_math.h
|
||||
src/rtapi/rtapi_byteorder.h
|
||||
src/rtapi/rtapi_app.h
|
||||
src/rtapi/rtapi_ctype.h
|
||||
src/emc/nml_intf/emcpos.h
|
||||
src/emc/nml_intf/emcpose.h
|
||||
src/emc/nml_intf/emcpose.c
|
||||
src/emc/nml_intf/motion_types.h
|
||||
src/emc/linuxcnc.h
|
||||
src/emc/nml_intf/canon.hh
|
||||
src/emc/nml_intf/canon_position.hh
|
||||
src/emc/nml_intf/emc.hh
|
||||
src/emc/nml_intf/emctool.h
|
||||
src/emc/nml_intf/debugflags.h
|
||||
src/emc/nml_intf/interp_return.hh
|
||||
src/emc/tooldata/tooldata_common.cc
|
||||
src/emc/motion/state_tag.h
|
||||
src/emc/motion/emcmotcfg.h
|
||||
src/emc/motion/simple_tp.h
|
||||
src/emc/motion/motion.h
|
||||
src/emc/motion/mot_priv.h
|
||||
src/emc/motion/axis.h
|
||||
src/emc/kinematics/kinematics.h
|
||||
src/emc/kinematics/cubic.c
|
||||
src/emc/kinematics/cubic.h
|
||||
src/emc/kinematics/kins_util.c
|
||||
src/emc/kinematics/trivkins.c
|
||||
src/emc/kinematics/switchkins.h
|
||||
src/emc/kinematics/switchkins.c
|
||||
src/emc/kinematics/userkfuncs.c
|
||||
src/emc/kinematics/5axiskins.c
|
||||
src/emc/kinematics/trtfuncs.c
|
||||
src/emc/kinematics/xyzac-trt-kins.c
|
||||
src/emc/kinematics/xyzbc-trt-kins.c
|
||||
src/emc/kinematics/corexykins.c
|
||||
src/emc/kinematics/rotatekins.c
|
||||
src/emc/kinematics/rosekins.c
|
||||
src/emc/kinematics/maxkins.c
|
||||
src/emc/kinematics/lineardeltakins-common.h
|
||||
src/emc/kinematics/lineardeltakins.c
|
||||
src/emc/kinematics/rotarydeltakins-common.h
|
||||
src/emc/kinematics/rotarydeltakins.c
|
||||
src/emc/kinematics/scorbot-kins.c
|
||||
src/emc/kinematics/tripodkins.c
|
||||
src/emc/kinematics/scarakins.c
|
||||
src/emc/kinematics/pumakins.h
|
||||
src/emc/kinematics/pumakins.c
|
||||
src/emc/kinematics/genhexkins.h
|
||||
src/emc/kinematics/genhexkins.c
|
||||
src/emc/kinematics/genserkins.h
|
||||
src/emc/kinematics/genserfuncs.c
|
||||
src/emc/kinematics/genserkins.c
|
||||
src/emc/kinematics/ugenserkins.c
|
||||
src/emc/kinematics/pentakins.h
|
||||
src/emc/kinematics/pentakins.c
|
||||
src/emc/tp/tp.h
|
||||
src/emc/tp/tp_types.h
|
||||
src/emc/tp/tc.h
|
||||
src/emc/tp/tc_types.h
|
||||
src/emc/tp/tcq.h
|
||||
src/emc/tp/spherical_arc.h
|
||||
src/emc/tp/blendmath.h
|
||||
src/emc/tp/sp_scurve.h
|
||||
src/emc/tp/ruckig_wrapper.h
|
||||
src/emc/tp/tp_debug.h
|
||||
src/emc/tp/tp.c
|
||||
src/emc/tp/tc.c
|
||||
src/emc/tp/tcq.c
|
||||
src/emc/tp/spherical_arc.c
|
||||
src/emc/tp/blendmath.c
|
||||
src/emc/tp/sp_scurve.c
|
||||
src/emc/tp/ruckig_wrapper.c
|
||||
src/emc/tp/cruckig/block.h
|
||||
src/emc/tp/cruckig/brake.h
|
||||
src/emc/tp/cruckig/calculator.h
|
||||
src/emc/tp/cruckig/cruckig.h
|
||||
src/emc/tp/cruckig/cruckig_internal.h
|
||||
src/emc/tp/cruckig/input_parameter.h
|
||||
src/emc/tp/cruckig/output_parameter.h
|
||||
src/emc/tp/cruckig/position.h
|
||||
src/emc/tp/cruckig/profile.h
|
||||
src/emc/tp/cruckig/result.h
|
||||
src/emc/tp/cruckig/roots.h
|
||||
src/emc/tp/cruckig/trajectory.h
|
||||
src/emc/tp/cruckig/utils.h
|
||||
src/emc/tp/cruckig/velocity.h
|
||||
src/emc/tp/cruckig/block.c
|
||||
src/emc/tp/cruckig/brake.c
|
||||
src/emc/tp/cruckig/calculator.c
|
||||
src/emc/tp/cruckig/cruckig.c
|
||||
src/emc/tp/cruckig/input_parameter.c
|
||||
src/emc/tp/cruckig/output_parameter.c
|
||||
src/emc/tp/cruckig/profile.c
|
||||
src/emc/tp/cruckig/roots.c
|
||||
src/emc/tp/cruckig/trajectory.c
|
||||
src/emc/tp/cruckig/position_first_step1.c
|
||||
src/emc/tp/cruckig/position_first_step2.c
|
||||
src/emc/tp/cruckig/position_second_step1.c
|
||||
src/emc/tp/cruckig/position_second_step2.c
|
||||
src/emc/tp/cruckig/position_third_step1.c
|
||||
src/emc/tp/cruckig/position_third_step2.c
|
||||
src/emc/tp/cruckig/velocity_second_step1.c
|
||||
src/emc/tp/cruckig/velocity_second_step2.c
|
||||
src/emc/tp/cruckig/velocity_third_step1.c
|
||||
src/emc/tp/cruckig/velocity_third_step2.c
|
||||
src/emc/rs274ngc/modal_state.hh
|
||||
src/emc/rs274ngc/modal_state.cc
|
||||
src/libnml/posemath/posemath.h
|
||||
src/libnml/posemath/posemath.cc
|
||||
src/libnml/posemath/_posemath.c
|
||||
src/libnml/posemath/gomath.c
|
||||
src/libnml/posemath/gomath.h
|
||||
src/libnml/posemath/gotypes.h
|
||||
src/libnml/posemath/sincos.c
|
||||
src/libnml/posemath/sincos.h
|
||||
src/emc/rs274ngc/interp_parameter_def.hh
|
||||
src/emc/rs274ngc/interp_array.cc
|
||||
src/emc/rs274ngc/interp_namedparams.cc
|
||||
src/emc/rs274ngc/interp_internal.hh
|
||||
src/emc/rs274ngc/interp_fwd.hh
|
||||
src/emc/rs274ngc/interp_base.hh
|
||||
src/emc/rs274ngc/interp_base.cc
|
||||
src/emc/rs274ngc/rs274ngc.hh
|
||||
src/emc/rs274ngc/rs274ngc_interp.hh
|
||||
src/emc/rs274ngc/rs274ngc_return.hh
|
||||
src/emc/rs274ngc/rs274ngc_pre.cc
|
||||
src/emc/rs274ngc/interp_queue.hh
|
||||
src/emc/rs274ngc/interp_queue.cc
|
||||
src/emc/rs274ngc/units.h
|
||||
src/emc/rs274ngc/interp_arc.cc
|
||||
src/emc/rs274ngc/interp_internal.cc
|
||||
src/emc/rs274ngc/interp_write.cc
|
||||
src/emc/rs274ngc/interp_check.cc
|
||||
src/emc/rs274ngc/interp_read.cc
|
||||
src/emc/rs274ngc/interp_execute.cc
|
||||
src/emc/rs274ngc/interp_find.cc
|
||||
src/emc/rs274ngc/interp_inverse.cc
|
||||
src/emc/rs274ngc/interp_o_word.cc
|
||||
src/emc/rs274ngc/interp_remap.cc
|
||||
src/emc/rs274ngc/interp_convert.cc
|
||||
src/emc/rs274ngc/interp_cycles.cc
|
||||
src/emc/rs274ngc/interp_g7x.cc
|
||||
tests/remap/duplicate-o-word/README
|
||||
tests/remap/duplicate-o-word/expected
|
||||
tests/remap/duplicate-o-word/rm207.ngc
|
||||
tests/remap/duplicate-o-word/rm208.ngc
|
||||
tests/remap/duplicate-o-word/test.ini
|
||||
tests/remap/duplicate-o-word/test.ngc
|
||||
tests/remap/duplicate-o-word/test.sh
|
||||
tests/remap/fail/args.0/README
|
||||
tests/remap/fail/args.0/expected
|
||||
tests/remap/fail/args.0/rm400.ngc
|
||||
tests/remap/fail/args.0/test.ini
|
||||
tests/remap/fail/args.0/test.ngc
|
||||
tests/remap/fail/args.0/test.sh
|
||||
tests/remap/fail/args.1/README
|
||||
tests/remap/fail/args.1/expected
|
||||
tests/remap/fail/args.1/rm400.ngc
|
||||
tests/remap/fail/args.1/test.ini
|
||||
tests/remap/fail/args.1/test.ngc
|
||||
tests/remap/fail/args.1/test.sh
|
||||
tests/remap/fail/args.2/README
|
||||
tests/remap/fail/args.2/expected
|
||||
tests/remap/fail/args.2/rm400.ngc
|
||||
tests/remap/fail/args.2/test.ini
|
||||
tests/remap/fail/args.2/test.ngc
|
||||
tests/remap/fail/args.2/test.sh
|
||||
tests/remap/fail/body-ngc/README
|
||||
tests/remap/fail/body-ngc/expected
|
||||
tests/remap/fail/body-ngc/rm400.ngc
|
||||
tests/remap/fail/body-ngc/test.ini
|
||||
tests/remap/fail/body-ngc/test.ngc
|
||||
tests/remap/fail/body-ngc/test.sh
|
||||
tests/remap/m30-interaction/README
|
||||
tests/remap/m30-interaction/expected
|
||||
tests/remap/m30-interaction/rm400.ngc
|
||||
tests/remap/m30-interaction/test.ini
|
||||
tests/remap/m30-interaction/test.ngc
|
||||
tests/remap/m30-interaction/test.sh
|
||||
tests/remap/nested-remaps-oword/README
|
||||
tests/remap/nested-remaps-oword/expected
|
||||
tests/remap/nested-remaps-oword/rm400.ngc
|
||||
tests/remap/nested-remaps-oword/rm401.ngc
|
||||
tests/remap/nested-remaps-oword/rm402.ngc
|
||||
tests/remap/nested-remaps-oword/rm403.ngc
|
||||
tests/remap/nested-remaps-oword/test.ini
|
||||
tests/remap/nested-remaps-oword/test.ngc
|
||||
tests/remap/nested-remaps-oword/test.sh
|
||||
tests/remap/nested-remaps-oword/testsub.ngc
|
||||
tests/remap/posargs.0/README
|
||||
tests/remap/posargs.0/expected
|
||||
tests/remap/posargs.0/rg881.ngc
|
||||
tests/remap/posargs.0/test.ini
|
||||
tests/remap/posargs.0/test.ngc
|
||||
tests/remap/posargs.0/test.sh
|
||||
tests/remap/sequencing/README
|
||||
tests/remap/sequencing/expected
|
||||
tests/remap/sequencing/permute.py
|
||||
tests/remap/sequencing/rg881.ngc
|
||||
tests/remap/sequencing/rm405.ngc
|
||||
tests/remap/sequencing/rm406.ngc
|
||||
tests/remap/sequencing/rm407.ngc
|
||||
tests/remap/sequencing/rm408.ngc
|
||||
tests/remap/sequencing/rm409.ngc
|
||||
tests/remap/sequencing/rm410.ngc
|
||||
tests/remap/sequencing/test.ini
|
||||
tests/remap/sequencing/test.ngc
|
||||
tests/remap/sequencing/test.sh
|
||||
tests/remap/remap-io/README
|
||||
tests/remap/remap-io/expected
|
||||
tests/remap/remap-io/io_input_m66.ngc
|
||||
tests/remap/remap-io/io_output_m62.ngc
|
||||
tests/remap/remap-io/io_output_m63.ngc
|
||||
tests/remap/remap-io/io_output_m64.ngc
|
||||
tests/remap/remap-io/io_output_m65.ngc
|
||||
tests/remap/remap-io/io_output_m67.ngc
|
||||
tests/remap/remap-io/io_output_m68.ngc
|
||||
tests/remap/remap-io/test-ngc.ini
|
||||
tests/remap/remap-io/test.sh
|
||||
tests/interp/m98m99/01-basics/expected
|
||||
tests/interp/m98m99/01-basics/test.ngc
|
||||
tests/interp/m98m99/01-basics/test.sh
|
||||
tests/interp/m98m99/02-variables/expected
|
||||
tests/interp/m98m99/02-variables/test.ngc
|
||||
tests/interp/m98m99/02-variables/test.sh
|
||||
tests/interp/m98m99/03-error-M98-no-P-word/expected
|
||||
tests/interp/m98m99/03-error-M98-no-P-word/test.ngc
|
||||
tests/interp/m98m99/03-error-M98-no-P-word/test.sh
|
||||
tests/interp/m98m99/04-M98-but-no-sub/expected
|
||||
tests/interp/m98m99/04-M98-but-no-sub/test.ngc
|
||||
tests/interp/m98m99/04-M98-but-no-sub/test.sh
|
||||
tests/interp/m98m99/05-M98-loops/expected
|
||||
tests/interp/m98m99/05-M98-loops/test.ngc
|
||||
tests/interp/m98m99/05-M98-loops/test.sh
|
||||
tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc
|
||||
tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc
|
||||
tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc
|
||||
tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc
|
||||
tests/interp/m98m99/06-error-mixed-sub-styles/expected
|
||||
tests/interp/m98m99/06-error-mixed-sub-styles/test.sh
|
||||
tests/interp/m98m99/07-nested-subs/expected
|
||||
tests/interp/m98m99/07-nested-subs/test.ngc
|
||||
tests/interp/m98m99/07-nested-subs/test.sh
|
||||
tests/interp/m98m99/08-sub-follows-main/expected
|
||||
tests/interp/m98m99/08-sub-follows-main/test.ngc
|
||||
tests/interp/m98m99/08-sub-follows-main/test.sh
|
||||
tests/interp/m98m99/09-disable-fanuc-subs/expected
|
||||
tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini
|
||||
tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc
|
||||
tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini
|
||||
tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc
|
||||
tests/interp/m98m99/09-disable-fanuc-subs/test.sh
|
||||
tests/interp/m98m99/10-M98-P001/expected
|
||||
tests/interp/m98m99/10-M98-P001/test.ngc
|
||||
tests/interp/m98m99/10-M98-P001/test.sh
|
||||
tests/interp/m98m99/11-main-program-oword/expected
|
||||
tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc
|
||||
tests/interp/m98m99/11-main-program-oword/test.sh
|
||||
tests/interp/m98m99/13-named-program/expected
|
||||
tests/interp/m98m99/13-named-program/test-named.ngc
|
||||
tests/interp/m98m99/13-named-program/test-numbered.ngc
|
||||
tests/interp/m98m99/13-named-program/test.sh
|
||||
tests/interp/m98m99/14-o-expression-call/expected
|
||||
tests/interp/m98m99/14-o-expression-call/test.ngc
|
||||
tests/interp/m98m99/14-o-expression-call/test.sh
|
||||
tests/interp/do-while-break/README
|
||||
tests/interp/do-while-break/bug.ngc
|
||||
tests/interp/do-while-break/expected
|
||||
tests/interp/do-while-break/test.ngc
|
||||
tests/interp/do-while-break/test.sh
|
||||
tests/interp/oword-bug315/README
|
||||
tests/interp/oword-bug315/expected
|
||||
tests/interp/oword-bug315/test.ngc
|
||||
tests/interp/oword-bug315/test.sh
|
||||
tests/interp/oword-bug315-p2/README
|
||||
tests/interp/oword-bug315-p2/expected
|
||||
tests/interp/oword-bug315-p2/test.ngc
|
||||
tests/interp/oword-bug315-p2/test.sh
|
||||
tests/interp/exists/README
|
||||
tests/interp/exists/expected
|
||||
tests/interp/exists/test.ngc
|
||||
tests/interp/exists/test.sh
|
||||
tests/interp/return-value/expected
|
||||
tests/interp/return-value/test.ngc
|
||||
tests/interp/return-value/test.sh
|
||||
tests/interp/subs-follow-main/expected
|
||||
tests/interp/subs-follow-main/test.ngc
|
||||
tests/interp/subs-follow-main/test.sh
|
||||
tests/interp/fractional-linenumbers/README
|
||||
tests/interp/fractional-linenumbers/expected
|
||||
tests/interp/fractional-linenumbers/test.ngc
|
||||
tests/interp/fractional-linenumbers/test.sh
|
||||
tests/interp/cam-nisley/cam.ngc
|
||||
tests/interp/cam-nisley/expected
|
||||
tests/interp/cam-nisley/test.sh
|
||||
tests/interp/cam-nisley/test.tbl
|
||||
tests/interp/crazy-paths/README
|
||||
tests/interp/crazy-paths/expected
|
||||
tests/interp/crazy-paths/test.ngc
|
||||
tests/interp/crazy-paths/test.sh
|
||||
tests/interp/namedparam-bug424/README
|
||||
tests/interp/namedparam-bug424/expected
|
||||
tests/interp/namedparam-bug424/test.ngc
|
||||
tests/interp/namedparam-bug424/test.sh
|
||||
tests/interp/flowsnake/README
|
||||
tests/interp/flowsnake/expected
|
||||
tests/interp/flowsnake/flowsnake.ngc
|
||||
tests/interp/flowsnake/test.sh
|
||||
tests/interp/inside-corners/README
|
||||
tests/interp/inside-corners/expected
|
||||
tests/interp/inside-corners/test.ngc
|
||||
tests/interp/inside-corners/test.sh
|
||||
tests/interp/inverse-time-with-comp/README
|
||||
tests/interp/inverse-time-with-comp/expected
|
||||
tests/interp/inverse-time-with-comp/inverse.ngc
|
||||
tests/interp/inverse-time-with-comp/test.sh
|
||||
tests/ccomp/lathe-comp/expected
|
||||
tests/ccomp/lathe-comp/test.ngc
|
||||
tests/ccomp/lathe-comp/test.sh
|
||||
tests/ccomp/lathe-comp/test.tbl
|
||||
tests/ccomp/mill-g90g91g92/expected
|
||||
tests/ccomp/mill-g90g91g92/test.ngc
|
||||
tests/ccomp/mill-g90g91g92/test.sh
|
||||
tests/ccomp/mill-g90g91g92/test.tbl
|
||||
tests/ccomp/mill-line-arc-entry/expected
|
||||
tests/ccomp/mill-line-arc-entry/test.ngc
|
||||
tests/ccomp/mill-line-arc-entry/test.sh
|
||||
tests/ccomp/mill-line-arc-entry/test.tbl
|
||||
tests/ccomp/mill-zchanges/expected
|
||||
tests/ccomp/mill-zchanges/test.ngc
|
||||
tests/ccomp/mill-zchanges/test.sh
|
||||
tests/ccomp/mill-zchanges/test.tbl
|
||||
tests/interp/bad/a-in-canned-cycle.ngc
|
||||
tests/interp/bad/a-in-canned-cycle2.ngc
|
||||
tests/interp/bad/bad-arc.big.imperial.center-format.ngc
|
||||
tests/interp/bad/bad-arc.big.metric.center-format.ngc
|
||||
tests/interp/bad/bad-arc.medium.imperial.center-format.ngc
|
||||
tests/interp/bad/bad-arc.medium.metric.center-format.ngc
|
||||
tests/interp/bad/bad-arc.small.imperial.center-format.ngc
|
||||
tests/interp/bad/bad-arc.small.metric.center-format.ngc
|
||||
tests/interp/bad/ccomp-arcexit.ngc
|
||||
tests/interp/bad/ccomp-gouging.ngc
|
||||
tests/interp/bad/exists-1.ngc
|
||||
tests/interp/bad/exists-2.ngc
|
||||
tests/interp/bad/exists-3.ngc
|
||||
tests/interp/bad/exists-4.ngc
|
||||
tests/interp/bad/exists-5.ngc
|
||||
tests/interp/bad/exists-6.ngc
|
||||
tests/interp/bad/exists-7.ngc
|
||||
tests/interp/bad/nested.ngc
|
||||
tests/interp/bad/no-feed-rate.ngc
|
||||
tests/interp/bad/no-ijr.ngc
|
||||
tests/interp/bad/probe-no-axes.ngc
|
||||
tests/interp/g33.1/expected
|
||||
tests/interp/g33.1/g33.1.ngc
|
||||
tests/interp/g33.1/test.sh
|
||||
tests/interp/g6164/expected
|
||||
tests/interp/g6164/test.ngc
|
||||
tests/interp/g6164/test.sh
|
||||
tests/interp/good/good-arc.big.imperial.center-format.ngc
|
||||
tests/interp/good/good-arc.big.metric.center-format.ngc
|
||||
tests/interp/good/good-arc.medium.imperial.center-format.ngc
|
||||
tests/interp/good/good-arc.medium.metric.center-format.ngc
|
||||
tests/interp/good/good-arc.small.imperial.center-format.ngc
|
||||
tests/interp/good/good-arc.small.metric.center-format.ngc
|
||||
tests/interp/g72-facing/expected
|
||||
tests/interp/g72-facing/g72-iterations-present.ngc
|
||||
tests/interp/g72-facing/test.sh
|
||||
tests/interp/g72-missing-iteration/expected
|
||||
tests/interp/g72-missing-iteration/g72-iterations-missing.ngc
|
||||
tests/interp/g72-missing-iteration/test.sh
|
||||
tests/interp/g71-endless-loop/expected
|
||||
tests/interp/g71-endless-loop/g71-endless-loop.ngc
|
||||
tests/interp/g71-endless-loop/test.sh
|
||||
tests/interp/g71-endless-loop2/expected
|
||||
tests/interp/g71-endless-loop2/g71-endless-loop2.ngc
|
||||
tests/interp/g71-endless-loop2/test.sh
|
||||
tests/interp/g71-endless-loop_2/expected
|
||||
tests/interp/g71-endless-loop_2/g71-endless-loop_2.ngc
|
||||
tests/interp/g71-endless-loop_2/test.sh
|
||||
tests/interp/g71-with-g70/expected
|
||||
tests/interp/g71-with-g70/g71-with-g70.ngc
|
||||
tests/interp/g71-with-g70/test.sh
|
||||
tests/interp/g76/README
|
||||
tests/interp/g76/expected
|
||||
tests/interp/g76/g76only.ngc
|
||||
tests/interp/g76/test.sh
|
||||
tests/interp/g76/test.tbl
|
||||
tests/interp/g10/g10-l1-l10/expected
|
||||
tests/interp/g10/g10-l1-l10/test.ngc
|
||||
tests/interp/g10/g10-l1-l10/test.sh
|
||||
tests/interp/g10/g10-l1-l10/test.tbl
|
||||
tests/interp/g10/g10-l11/expected
|
||||
tests/interp/g10/g10-l11/test.ngc
|
||||
tests/interp/g10/g10-l11/test.sh
|
||||
tests/interp/g10/g10-l11/test.tbl
|
||||
tests/interp/g10/g10-l2-while-active/expected
|
||||
tests/interp/g10/g10-l2-while-active/test.ngc
|
||||
tests/interp/g10/g10-l2-while-active/test.sh
|
||||
tests/interp/g10/g10-l20-while-active/expected
|
||||
tests/interp/g10/g10-l20-while-active/test.ngc
|
||||
tests/interp/g10/g10-l20-while-active/test.sh
|
||||
tests/interp/g10/g10-with-g92/expected
|
||||
tests/interp/g10/g10-with-g92/test.ngc
|
||||
tests/interp/g10/g10-with-g92/test.sh
|
||||
tests/interp/g10/g10-with-g92/test.tbl
|
||||
tests/interp/g52/g52-g92-interaction/expected
|
||||
tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc
|
||||
tests/interp/g52/g52-g92-interaction/test.sh
|
||||
tests/interp/rotation/abs-pts/expected
|
||||
tests/interp/rotation/abs-pts/test.ngc
|
||||
tests/interp/rotation/abs-pts/test.sh
|
||||
tests/interp/rotation/abs-pts/test.tbl
|
||||
tests/interp/rotation/g28/expected
|
||||
tests/interp/rotation/g28/g28.ngc
|
||||
tests/interp/rotation/g28/test.sh
|
||||
tests/interp/rotation/g53/expected
|
||||
tests/interp/rotation/g53/g53.ngc
|
||||
tests/interp/rotation/g53/test.sh
|
||||
tests/interp/iniparam/README
|
||||
tests/interp/iniparam/expected
|
||||
tests/interp/iniparam/test.ini
|
||||
tests/interp/iniparam/test.ngc
|
||||
tests/interp/iniparam/test.sh
|
||||
tests/interp/iniparam-failassign/README
|
||||
tests/interp/iniparam-failassign/expected
|
||||
tests/interp/iniparam-failassign/test.ini
|
||||
tests/interp/iniparam-failassign/test.ngc
|
||||
tests/interp/iniparam-failassign/test.sh
|
||||
tests/interp/m19/README
|
||||
tests/interp/m19/expected
|
||||
tests/interp/m19/test.ini
|
||||
tests/interp/m19/test.ngc
|
||||
tests/interp/m19/test.sh
|
||||
tests/interp/magic_comments/param_format_printing/expected
|
||||
tests/interp/magic_comments/param_format_printing/test.ngc
|
||||
tests/interp/magic_comments/param_format_printing/test.sh
|
||||
tests/interp/sub-call-from-sub/expected
|
||||
tests/interp/sub-call-from-sub/subs/caller.ngc
|
||||
tests/interp/sub-call-from-sub/subs/helper.ngc
|
||||
tests/interp/sub-call-from-sub/test.ini
|
||||
tests/interp/sub-call-from-sub/test.ngc
|
||||
tests/interp/sub-call-from-sub/test.sh
|
||||
tests/interp/sequence-number/README
|
||||
tests/interp/sequence-number/expected
|
||||
tests/interp/sequence-number/rm400.ngc
|
||||
tests/interp/sequence-number/test.ini
|
||||
tests/interp/sequence-number/test.ngc
|
||||
tests/interp/sequence-number/test.sh
|
||||
tests/interp/nested-sub-error/expected
|
||||
tests/interp/nested-sub-error/subs/nested.ngc
|
||||
tests/interp/nested-sub-error/test.ini
|
||||
tests/interp/nested-sub-error/test.ngc
|
||||
tests/interp/nested-sub-error/test.sh
|
||||
tests/interp/nested-sub-in-file-error/expected
|
||||
tests/interp/nested-sub-in-file-error/subs/sequential.ngc
|
||||
tests/interp/nested-sub-in-file-error/test.ini
|
||||
tests/interp/nested-sub-in-file-error/test.ngc
|
||||
tests/interp/nested-sub-in-file-error/test.sh
|
||||
tests/interp/oword-unwind/README
|
||||
tests/interp/oword-unwind/expected
|
||||
tests/interp/oword-unwind/fail.ngc
|
||||
tests/interp/oword-unwind/test.ini
|
||||
tests/interp/oword-unwind/test.ngc
|
||||
tests/interp/oword-unwind/test.sh
|
||||
tests/interp/abort-hot-comment/README
|
||||
tests/interp/abort-hot-comment/expected
|
||||
tests/interp/abort-hot-comment/test.ini
|
||||
tests/interp/abort-hot-comment/test.ngc
|
||||
tests/interp/abort-hot-comment/test.sh
|
||||
configs/sim/axis/sim.tbl
|
||||
configs/sim/axis/external_offsets/M111
|
||||
configs/sim/axis/external_offsets/circles.ngc
|
||||
configs/sim/axis/external_offsets/dyn_demo.ngc
|
||||
configs/sim/axis/external_offsets/dynamic_offsets.ini
|
||||
configs/sim/axis/external_offsets/eoffset.tbl
|
||||
configs/sim/axis/external_offsets/eoffsets.ini
|
||||
configs/sim/axis/external_offsets/eoffsets.ngc
|
||||
configs/sim/axis/external_offsets/jwp_z.ini
|
||||
configs/sim/axis/external_offsets/jwp_z.ngc
|
||||
configs/sim/axis/external_offsets/opa.ini
|
||||
configs/sim/axis/external_offsets/opa_demo.ngc
|
||||
configs/sim/axis/db_demo/base.ngc
|
||||
configs/sim/axis/db_demo/db_nonran.ini
|
||||
configs/sim/axis/foam/axis_foam.ini
|
||||
configs/sim/axis/foam/foam.ngc
|
||||
configs/sim/axis/gladevcp/gladevcp_panel.ini
|
||||
configs/sim/axis/gladevcp/probe.ngc
|
||||
configs/sim/axis/gladevcp/sim.tbl
|
||||
configs/sim/axis/geometry/M110
|
||||
configs/sim/axis/geometry/xyzc.ini
|
||||
configs/sim/axis/geometry/xyzc.ngc
|
||||
configs/sim/axis/rose_engine/rcone.ngc
|
||||
configs/sim/axis/rose_engine/rcone_demo.ngc
|
||||
configs/sim/axis/rose_engine/rose_engine.ini
|
||||
configs/sim/axis/vismach/5axis/bridgemill/5axis.ini
|
||||
configs/sim/axis/vismach/5axis/bridgemill/5axis.tbl
|
||||
configs/sim/axis/vismach/5axis/bridgemill/5axis.xml
|
||||
configs/sim/axis/vismach/5axis/bridgemill/5axis_postgui.hal
|
||||
configs/sim/axis/vismach/5axis/bridgemill/5axisgui.hal
|
||||
configs/sim/axis/vismach/5axis/bridgemill/5axisgui.ngc
|
||||
configs/sim/axis/vismach/5axis/bridgemill/README
|
||||
configs/sim/axis/vismach/5axis/bridgemill/remap_subs/428remap.ngc
|
||||
configs/sim/axis/vismach/5axis/bridgemill/remap_subs/429remap.ngc
|
||||
configs/sim/axis/vismach/5axis/bridgemill/remap_subs/430remap.ngc
|
||||
configs/sim/axis/vismach/melfa-sim/example.ngc
|
||||
configs/sim/axis/vismach/melfa-sim/melfa.ini
|
||||
configs/sim/axis/vismach/melfa-sim/melfa.tbl
|
||||
configs/sim/axis/vismach/melfa-sim/remap_subs/428remap.ngc
|
||||
configs/sim/axis/vismach/melfa-sim/remap_subs/429remap.ngc
|
||||
configs/sim/axis/vismach/melfa-sim/remap_subs/430remap.ngc
|
||||
configs/sim/axis/vismach/millturn/example.ngc
|
||||
configs/sim/axis/vismach/millturn/millturn.ini
|
||||
configs/sim/axis/vismach/millturn/millturn.tbl
|
||||
configs/sim/axis/vismach/millturn/remap_subs/428remap.ngc
|
||||
configs/sim/axis/vismach/millturn/remap_subs/429remap.ngc
|
||||
configs/sim/axis/vismach/puma/puma.ini
|
||||
configs/sim/axis/vismach/puma/puma.tbl
|
||||
configs/sim/axis/vismach/puma/puma_cube.ini
|
||||
configs/sim/axis/vismach/puma/puma_cube.ngc
|
||||
configs/sim/axis/vismach/puma/puma_seam_weld.ngc
|
||||
configs/sim/axis/vismach/puma/remap_subs/428remap.ngc
|
||||
configs/sim/axis/vismach/puma/remap_subs/429remap.ngc
|
||||
configs/sim/axis/vismach/puma/remap_subs/430remap.ngc
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/README
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/demos/xyzab-tdr-demo.ngc
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/remap_subs/428remap.ngc
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/remap_subs/429remap.ngc
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr-postgui.hal
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr.ini
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr.tbl
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr.var
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr.var.bak
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr.xml
|
||||
configs/sim/axis/vismach/5axis/table-dual-rotary/xyzab-tdr_cmds.hal
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/README
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/boat-xyzac.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/boat-xyzbc.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/impeller-7bl-xyzac.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins_test_1.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins_test_2.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins_test_3.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzbc_switchkins.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/428remap.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/429remap.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/430remap.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/centering.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/helix_ac.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/helix_bc.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/xyzac_switchkins_sub.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/xyzbc_switchkins_sub.ngc
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/switchkins.halshow
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/switchkins_postgui.hal
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.tbl
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.txt
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.xml
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt_cmds.hal
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.tbl
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.txt
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.xml
|
||||
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc.var
|
||||
configs/sim/qtdragon/qtdragon_multi_joint/on_abort.ngc
|
||||
configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyz.ini
|
||||
configs/sim/qtdragon/qtdragon_multi_joint/tool.tbl
|
||||
configs/sim/qtdragon/qtdragon_xyz/on_abort.ngc
|
||||
configs/sim/qtdragon/qtdragon_xyz/qtdragon_inch.ini
|
||||
configs/sim/qtdragon/qtdragon_xyz/tool.tbl
|
||||
configs/sim/qtdragon/qtdragon_xyz45/on_abort.ngc
|
||||
configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyza.ini
|
||||
configs/sim/qtdragon/qtdragon_xyz45/tool.tbl
|
||||
configs/sim/qtdragon_hd/qtdragon_hd_xyz/on_abort.ngc
|
||||
configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini
|
||||
configs/sim/qtdragon_hd/qtdragon_hd_xyz/tool.tbl
|
||||
configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/on_abort.ngc
|
||||
configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/qtdragon_hd_z_compensation.ini
|
||||
configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/tool.tbl
|
||||
configs/sim/qtvcp_screens/qtdragon/on_abort.ngc
|
||||
configs/sim/qtvcp_screens/qtdragon/qtdragon_mpg.ini
|
||||
configs/sim/qtvcp_screens/qtdragon/tool.tbl
|
||||
configs/sim/woodpecker/on_abort.ngc
|
||||
configs/sim/woodpecker/tool.tbl
|
||||
configs/sim/woodpecker/woodpecker.ini
|
||||
nc_files/3D_Chips.ngc
|
||||
nc_files/arcspiral.ngc
|
||||
nc_files/factorial.ngc
|
||||
nc_files/hole-circle.ngc
|
||||
nc_files/m6demo.ngc
|
||||
configs/sim/gmoccapy/macros/change.ngc
|
||||
configs/sim/gmoccapy/macros/change_g43.ngc
|
||||
configs/sim/gmoccapy/macros/go_to_position.ngc
|
||||
configs/sim/gmoccapy/macros/halo_world.ngc
|
||||
configs/sim/gmoccapy/macros/i_am_lost.ngc
|
||||
configs/sim/gmoccapy/macros/images/goto_x_y_z.png
|
||||
configs/sim/gmoccapy/macros/images/i_am_lost.png
|
||||
configs/sim/gmoccapy/macros/images/macro_8.png
|
||||
configs/sim/gmoccapy/macros/increment.ngc
|
||||
configs/sim/gmoccapy/macros/jog_around.ngc
|
||||
configs/sim/gmoccapy/macros/macro_0.ngc
|
||||
configs/sim/gmoccapy/macros/macro_1.ngc
|
||||
configs/sim/gmoccapy/macros/macro_10.ngc
|
||||
configs/sim/gmoccapy/macros/macro_11.ngc
|
||||
configs/sim/gmoccapy/macros/macro_12.ngc
|
||||
configs/sim/gmoccapy/macros/macro_13.ngc
|
||||
configs/sim/gmoccapy/macros/macro_14.ngc
|
||||
configs/sim/gmoccapy/macros/macro_15.ngc
|
||||
configs/sim/gmoccapy/macros/macro_2.ngc
|
||||
configs/sim/gmoccapy/macros/macro_3.ngc
|
||||
configs/sim/gmoccapy/macros/macro_4.ngc
|
||||
configs/sim/gmoccapy/macros/macro_5.ngc
|
||||
configs/sim/gmoccapy/macros/macro_6.ngc
|
||||
configs/sim/gmoccapy/macros/macro_7.ngc
|
||||
configs/sim/gmoccapy/macros/macro_8.ngc
|
||||
configs/sim/gmoccapy/macros/macro_9.ngc
|
||||
configs/sim/gmoccapy/macros/macro_Instructions.txt
|
||||
configs/sim/gmoccapy/macros/on_abort.ngc
|
||||
configs/sim/gmoccapy/macros/settool_g43.ngc
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/README
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples/boat-xyzac.ngc
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples/boat-xyzbc.ngc
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples/impeller-7bl-xyzac.ngc
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples/test-xyzac.ngc
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples/test-xyzbc.ngc
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/postgui.hal
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/sim-xyzac-trt.pref
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/xyzac-trt.ini
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/xyzac-trt.tbl
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/xyzac-trt_cmds.hal
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/xyzac.var
|
||||
configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/xyzac.var.bak
|
||||
@@ -0,0 +1,32 @@
|
||||
Switchable Table Rotary/Tilting (trt) Sim configs
|
||||
|
||||
xyzac-trt-switchkins
|
||||
xyzbc-trt-switchkins
|
||||
|
||||
Demonstrations:
|
||||
demos/xyzac_switchkins.ngc
|
||||
demos/xyzac_switchkins_test_1.ngc
|
||||
demos/xyzac_switchkins_test_2.ngc
|
||||
demos/xyzac_switchkins_test_3.ngc
|
||||
demos/boat-xyzac.ngc
|
||||
demos/impeller-7bl-xyzac.ngc
|
||||
|
||||
demos/xyzbc_switchkins.ngc
|
||||
demos/boat-xyzbc.ngc
|
||||
|
||||
***********************************************
|
||||
Note: IMPORTANT ini file requirements:
|
||||
|
||||
[HAL]
|
||||
HALCMD = net :kinstype-select <= motion.analog-out-0N => motion.switchkins-type
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./remap_subs
|
||||
REMAP = M428 modalgroup=10 ngc=428remap
|
||||
REMAP = M429 modalgroup=10 ngc=429remap
|
||||
|
||||
[HALUI]
|
||||
MDI_COMMAND = M429
|
||||
MDI_COMMAND = M428
|
||||
MDI_COMMAND = M430
|
||||
***********************************************
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
; zmax zmin r frate n a b c dist
|
||||
o<xyzac_switchkins_sub> call [10] [5] [10][1000][3][20][0][45][20]
|
||||
m2
|
||||
@@ -0,0 +1,39 @@
|
||||
; for debugging, use mdi to set global #<_switchkins_debug>=1
|
||||
|
||||
#<FRATE>=1000
|
||||
M429
|
||||
G0 X0 Y0 Z0 A0 C0
|
||||
G0 C90 X10 Y0
|
||||
G1 F#<FRATE> Z2
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M429
|
||||
G1 F#<FRATE> Z2
|
||||
G0 C90 X0 Y10
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z2
|
||||
|
||||
M429
|
||||
G1 F#<FRATE> Z0
|
||||
G0 C90 X10 Y30
|
||||
G1 F#<FRATE> Z2
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M429
|
||||
G1 F#<FRATE> Z2
|
||||
G0 C90 X30 Y10
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z2
|
||||
M429
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
G0 X0 Y0 Z0 A0 C0
|
||||
M2
|
||||
@@ -0,0 +1,49 @@
|
||||
; for debugging, use mdi to set global #<_switchkins_debug>=1
|
||||
|
||||
#<FRATE>=1000
|
||||
M429 ;Trivkins
|
||||
G64 P0.01
|
||||
S1500 M3
|
||||
G0 X0 Y0 Z5 A0 C0
|
||||
G1 F#<FRATE> Z0
|
||||
G1 X20 Y0 F#<FRATE>
|
||||
|
||||
M428 ;XYZAC
|
||||
G1 C90
|
||||
G1 X20
|
||||
G1 Y20
|
||||
G1 X0
|
||||
G1 Y0
|
||||
G1 A20
|
||||
G1 X-20
|
||||
G1 Y-20
|
||||
G1 X0
|
||||
G1 Y0
|
||||
|
||||
(-------)
|
||||
G1 C45
|
||||
G1 X-15
|
||||
G1 Y15
|
||||
G1 X0
|
||||
G1 Y0
|
||||
G1 Y-15
|
||||
G1 X15
|
||||
G1 Y0
|
||||
G1 X0
|
||||
|
||||
(-------)
|
||||
G1 C90 X15
|
||||
G1 C180 Y15
|
||||
G1 C270 X0
|
||||
G1 C360 Y0
|
||||
G1 C0
|
||||
G1 C-90 X-15
|
||||
G1 C-180 Y-15
|
||||
G1 C-270 X0
|
||||
G1 C-360 Y0
|
||||
G1 Z5
|
||||
|
||||
M429 ;Trivkins
|
||||
|
||||
G1 X0 Y0 Z1 A0 C0
|
||||
M2
|
||||
@@ -0,0 +1,15 @@
|
||||
;# enable optional stop for m1
|
||||
m429 ;trivkins
|
||||
G0 X0 Y0 Z0 A0 C0
|
||||
G0 C90 X10 Y0
|
||||
G1 F1000 Z2
|
||||
(debug,A expect: 10 0 2) m1
|
||||
(debug,B expect: 10 0 2) m1
|
||||
m428 ;tcp
|
||||
(debug,C expect: 0 -10 2) m1
|
||||
g1f1000 z0
|
||||
(debug,D expect: 0 -10 0) m1
|
||||
(debug,E expect: 0 -10 0) m1
|
||||
m429 ;trivkins
|
||||
(debug,F expect: 10 0 0)
|
||||
m2
|
||||
@@ -0,0 +1,3 @@
|
||||
; zmax zmin r frate n a b c dist
|
||||
o<xyzbc_switchkins_sub> call [10] [5] [10][1000][3][0][20][45][20]
|
||||
m2
|
||||
@@ -0,0 +1,24 @@
|
||||
;M428 by remap: kinstype==1 (xyzac,xyzbc) (note: sparm=identityfirst)
|
||||
o<428remap>sub
|
||||
#<kinstype> = 1 ; xyzac,xyzbc
|
||||
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
|
||||
|
||||
o1 if [exists [#<_hal[motion.switchkins-type]>]]
|
||||
o1 else
|
||||
(debug,M428:Missing [RS274NGC]HAL_PIN_VARS=1)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o1 endif
|
||||
|
||||
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
|
||||
M66 E0 L0 ; force synch
|
||||
|
||||
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
|
||||
(debug,M428: Wrong motion.switchkins-type)
|
||||
(debug,or missing hal net to analog-out-0x)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o2 else
|
||||
o2 endif
|
||||
|
||||
o<428remap>endsub
|
||||
@@ -0,0 +1,24 @@
|
||||
;M429 by remap: kinstype==0 Identity kinematics
|
||||
o<429remap>sub
|
||||
#<kinstype> = 0
|
||||
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
|
||||
|
||||
o1 if [exists [#<_hal[motion.switchkins-type]>]]
|
||||
o1 else
|
||||
(debug,M429:Missing [RS274NGC]HAL_PIN_VARS=1)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o1 endif
|
||||
|
||||
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
|
||||
M66 E0 L0 ; force synch
|
||||
|
||||
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
|
||||
(debug,M429:Wrong motion.switchkins-type)
|
||||
(debug,or missing hal net to analog-out-0x)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o2 else
|
||||
o2 endif
|
||||
|
||||
o<429remap>endsub
|
||||
@@ -0,0 +1,24 @@
|
||||
;M430 by remap: kinstype==2 userk kins
|
||||
o<430remap>sub
|
||||
#<kinstype> = 2
|
||||
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
|
||||
|
||||
o1 if [exists [#<_hal[motion.switchkins-type]>]]
|
||||
o1 else
|
||||
(debug,M430:Missing [RS274NGC]HAL_PIN_VARS=1)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o1 endif
|
||||
|
||||
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
|
||||
M66 E0 L0 ; force synch
|
||||
|
||||
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
|
||||
(debug,M430:Wrong motion.switchkins-type)
|
||||
(debug,or missing hal net to analog-out-0x)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o2 else
|
||||
o2 endif
|
||||
|
||||
o<430remap>endsub
|
||||
@@ -0,0 +1,42 @@
|
||||
(info: tests for values of [xyz]-rot-point)
|
||||
o<centering>sub
|
||||
#<xstart> = #1 (=-2.5)
|
||||
#<ystart> = #2 (=-2.5)
|
||||
#<xlen> = #3 (= 5)
|
||||
#<ylen> = #4 (= 5)
|
||||
#<zfinal> = #5 (=60)
|
||||
#<n> = #6 (=12)
|
||||
#<f> = #7 (=1000 feed)
|
||||
#<angle> = 0
|
||||
#<delta_angle> = [360/#<n>]
|
||||
|
||||
o1 if [exists [#<_hal[xyzac-trt-kins.x-rot-point]>]]
|
||||
(debug,x-rot-point=#<_hal[xyzac-trt-kins.x-rot-point]>)
|
||||
(debug,y-rot-point=#<_hal[xyzac-trt-kins.y-rot-point]>)
|
||||
(debug,z-rot-point=#<_hal[xyzac-trt-kins.z-rot-point]>)
|
||||
o1 endif
|
||||
o2 if [exists [#<_hal[xyzbc-trt-kins.x-rot-point]>]]
|
||||
(debug,x-rot-point=#<_hal[xyzbc-trt-kins.x-rot-point]>)
|
||||
(debug,y-rot-point=#<_hal[xyzbc-trt-kins.y-rot-point]>)
|
||||
(debug,z-rot-point=#<_hal[xyzac-trt-kins.z-rot-point]>)
|
||||
o2 endif
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x#<xstart> y#<ystart> z0 c0
|
||||
M428 ;tcp
|
||||
|
||||
g61
|
||||
o10 while [#<angle> le 360]
|
||||
g1 f#<f>
|
||||
#<angle> = [#<angle> + #<delta_angle>]
|
||||
g0 c#<angle>
|
||||
g1 x[#<xstart> + #<xlen>]
|
||||
g1 y[#<ystart> + #<ylen>]
|
||||
g1 x[#<xstart> + 0 ]
|
||||
g1 y[#<ystart> + 0 ]
|
||||
o10 endwhile
|
||||
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x0 y0 z#<zfinal> c0
|
||||
o<centering>endsub
|
||||
@@ -0,0 +1,22 @@
|
||||
; helix using switchkins (xyzac) a,c angles
|
||||
o<helix_ac>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10)
|
||||
#<frate> = #4 (=1000)
|
||||
#<n> = #5 (=3)
|
||||
#<a> = #6 (=45)
|
||||
#<b> = #7 (=0 NA)
|
||||
#<c> = #8 (=20)
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x[#<_x> - #<r>] ;adjust for radius
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0 ;new g54
|
||||
M428 ;XYZAC
|
||||
g0a#<a>c#<c> ;exercise a,c
|
||||
f#<frate> g2i#<r>z#<zmin> p#<n> ;helix
|
||||
M429 ;Identity kinematics
|
||||
g0 x0 y0 z#<zmax> a0 c0 ;return to start
|
||||
g0 x[#<_x> + #<r>] ;adjust restore
|
||||
M428 ;XYZAC
|
||||
o<helix_ac>endsub
|
||||
@@ -0,0 +1,22 @@
|
||||
; helix using switchkins (xyzbc) b,c angles
|
||||
o<helix_bc>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10)
|
||||
#<frate> = #4 (=1000)
|
||||
#<n> = #5 (=3)
|
||||
#<a> = #6 (=0 NA)
|
||||
#<b> = #7 (=45)
|
||||
#<c> = #8 (=20)
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x[#<_x> - #<r>] ;adjust for radius
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0 ;new g54
|
||||
M428 ;XYZBC
|
||||
g0b#<b>c#<c> ;exercise b,c
|
||||
f#<frate> g2i#<r>z#<zmin> p#<n> ;helix
|
||||
M429 ;Identity kinematics
|
||||
g0 x0 y0 z#<zmax> b0 c0 ;return to start
|
||||
g0 x[#<_x> + #<r>] ;adjust restore
|
||||
M428 ;XYZBC
|
||||
o<helix_bc>endsub
|
||||
@@ -0,0 +1,47 @@
|
||||
; ngcgui-compatible subroutine
|
||||
(info: helix in each quadrant at angles A,C)
|
||||
o<xyzac_switchkins_sub>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10 radius)
|
||||
#<frate> = #4 (=1000 feedrate)
|
||||
#<n> = #5 (=3 n circles)
|
||||
#<a> = #6 (=30 A angle)
|
||||
#<b> = #7 (=0 B angle NA)
|
||||
#<c> = #8 (=45 C angle)
|
||||
#<dist> = #9 (=20 distance)
|
||||
|
||||
; quadrant I
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0 ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0 ;new g54
|
||||
g0 x+#<dist> y+#<dist> z#<zmax> ;move to pattern center position
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant II
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0
|
||||
g0 x-#<dist> y+#<dist> z#<zmax>
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant III
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0
|
||||
g0 x-#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant IV
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0
|
||||
g0 x+#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
;final position
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> ;new g54
|
||||
|
||||
o<xyzac_switchkins_sub>endsub
|
||||
@@ -0,0 +1,47 @@
|
||||
; ngcgui-compatible subroutine
|
||||
(info: helix in each quadrant at angles B,C)
|
||||
o<xyzbc_switchkins_sub>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10 radius)
|
||||
#<frate> = #4 (=1000 feedrate)
|
||||
#<n> = #5 (=3 n circles)
|
||||
#<a> = #6 (=0 A angle NA)
|
||||
#<b> = #7 (=30 B angle)
|
||||
#<c> = #8 (=45 C angle)
|
||||
#<dist> = #9 (=20 distance)
|
||||
|
||||
; quadrant I
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0 ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0 ;new g54
|
||||
g0 x+#<dist> y+#<dist> z#<zmax> ;move to pattern center position
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant II
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0
|
||||
g0 x-#<dist> y+#<dist> z#<zmax>
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant III
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0
|
||||
g0 x-#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant IV
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0
|
||||
g0 x+#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
;final position
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> ;new g54
|
||||
|
||||
o<xyzbc_switchkins_sub>endsub
|
||||
@@ -0,0 +1,29 @@
|
||||
pin+motion.analog-out-03
|
||||
pin+motion.switchkins-type
|
||||
|
||||
pin+joint.0.pos-cmd
|
||||
pin+joint.1.pos-cmd
|
||||
pin+joint.2.pos-cmd
|
||||
pin+joint.3.pos-cmd
|
||||
pin+joint.4.pos-cmd
|
||||
|
||||
pin+axis.x.pos-cmd
|
||||
pin+axis.y.pos-cmd
|
||||
pin+axis.z.pos-cmd
|
||||
pin+axis.a.pos-cmd
|
||||
pin+axis.b.pos-cmd
|
||||
pin+axis.c.pos-cmd
|
||||
|
||||
pin+pyvcp.tcpkins-button
|
||||
pin+pyvcp.identitykins-button
|
||||
pin+pyvcp.vismach-clear
|
||||
|
||||
pin+kinstype-0
|
||||
pin+kinstype-1
|
||||
|
||||
pin+halui.mdi-command-00
|
||||
pin+halui.mdi-command-01
|
||||
|
||||
pin+kinstype.is-0
|
||||
pin+kinstype.is-1
|
||||
pin+kinstype.is-2
|
||||
@@ -0,0 +1,12 @@
|
||||
# switchkins pyvcp connections for:
|
||||
# xyzac-trt-kins.ini,xyzbc-trt-kins.ini
|
||||
|
||||
net :kinstype.is-0 <= kinstype.is-0 => pyvcp.multilabel.0.legend0
|
||||
net :kinstype.is-1 <= kinstype.is-1 => pyvcp.multilabel.0.legend1
|
||||
net :kinstype.is-2 <= kinstype.is-2 => pyvcp.multilabel.0.legend2
|
||||
|
||||
net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
|
||||
|
||||
net :type0-button <= pyvcp.type0-button => halui.mdi-command-00
|
||||
net :type1-button <= pyvcp.type1-button => halui.mdi-command-01
|
||||
net :type2-button <= pyvcp.type2-button => halui.mdi-command-02
|
||||
@@ -0,0 +1,182 @@
|
||||
[APPLICATIONS]
|
||||
# uncomment to enable:
|
||||
#APP = halshow --fformat %.5f switchkins.halshow
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = sim-xyzac-trt-kins (switchkins)
|
||||
|
||||
[DISPLAY]
|
||||
GEOMETRY = XYZ-A
|
||||
OPEN_FILE = ./demos/xyzac_switchkins.ngc
|
||||
PYVCP = ./xyzac-trt.xml
|
||||
JOG_AXES = XYZC
|
||||
DISPLAY = axis
|
||||
MAX_ANGULAR_VELOCITY = 360
|
||||
MAX_LINEAR_VELOCITY = 1000
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 2
|
||||
PROGRAM_PREFIX = ../../nc_files
|
||||
INTRO_GRAPHIC = emc2.gif
|
||||
INTRO_TIME = 1
|
||||
#EDITOR = geany
|
||||
TOOL_EDITOR = tooledit z diam
|
||||
|
||||
TKPKG = Ngcgui 1.0
|
||||
NGCGUI_FONT = Helvetica -12 normal
|
||||
NGCGUI_SUBFILE = xyzac_switchkins_sub.ngc
|
||||
NGCGUI_SUBFILE = centering.ngc
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./remap_subs
|
||||
HAL_PIN_VARS = 1
|
||||
REMAP = M428 modalgroup=10 ngc=428remap
|
||||
REMAP = M429 modalgroup=10 ngc=429remap
|
||||
REMAP = M430 modalgroup=10 ngc=430remap
|
||||
PARAMETER_FILE = xyzac.var
|
||||
|
||||
[KINS]
|
||||
#NOTE: for backwrds compatibility !!!!!!!!!!!!!!!!!!!
|
||||
# default switchkins-type == 0 is xyzac-trt-kins
|
||||
# here switchkins-type == 0 is identity kins
|
||||
KINEMATICS = xyzac-trt-kins sparm=identityfirst
|
||||
JOINTS = 5
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE = switchkins_postgui.hal
|
||||
|
||||
# net for control of motion.switchkins-type
|
||||
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type
|
||||
|
||||
# vismach xyzac-trt-gui items
|
||||
HALCMD = loadusr -W xyzac-trt-gui
|
||||
HALCMD = net :table-x joint.0.pos-fb xyzac-trt-gui.table-x
|
||||
HALCMD = net :saddle-y joint.1.pos-fb xyzac-trt-gui.saddle-y
|
||||
HALCMD = net :spindle-z joint.2.pos-fb xyzac-trt-gui.spindle-z
|
||||
HALCMD = net :tilt-a joint.3.pos-fb xyzac-trt-gui.tilt-a
|
||||
HALCMD = net :rotate-c joint.4.pos-fb xyzac-trt-gui.rotate-c
|
||||
HALCMD = net :tool-offset motion.tooloffset.z
|
||||
HALCMD = net :tool-offset xyzac-trt-kins.tool-offset xyzac-trt-gui.tool-offset
|
||||
HALCMD = net :y-offset xyzac-trt-kins.y-offset xyzac-trt-gui.y-offset
|
||||
HALCMD = net :z-offset xyzac-trt-kins.z-offset xyzac-trt-gui.z-offset
|
||||
HALCMD = sets :y-offset 20
|
||||
HALCMD = sets :z-offset 10
|
||||
|
||||
# not currently supported by xyzac-trt-gui:
|
||||
HALCMD = setp xyzac-trt-kins.x-rot-point 0
|
||||
HALCMD = setp xyzac-trt-kins.y-rot-point 0
|
||||
HALCMD = setp xyzac-trt-kins.z-rot-point 0
|
||||
HALCMD = setp xyzac-trt-kins.conventional-directions 0
|
||||
|
||||
[HALUI]
|
||||
# NOTE: kinstype==0 is identity kins because sparm=identityfirst
|
||||
# M429:identity kins (motion.switchkins-type==0 startupDEFAULT)
|
||||
# M428:xyzac kins (motion.switchkins-type==1)
|
||||
# M430:userk kins (motion.switchkins-type==2)
|
||||
MDI_COMMAND = M429
|
||||
MDI_COMMAND = M428
|
||||
MDI_COMMAND = M430
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZAC
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = deg
|
||||
DEFAULT_LINEAR_VELOCITY = 20
|
||||
MAX_LINEAR_VELOCITY = 35
|
||||
MAX_LINEAR_ACCELERATION = 400
|
||||
DEFAULT_LINEAR_ACCELERATION = 300
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
COMM_TIMEOUT = 1
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.010
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = xyzac-trt.tbl
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_A]
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 50
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_C]
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 50
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_4]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
@@ -0,0 +1,10 @@
|
||||
T1 P1 Z0 D1 ;end mill
|
||||
T2 P2 Z15 D8 ;end mill
|
||||
T3 P3 Z0 D4.2 ;#7 tap drill
|
||||
T4 P4 Z0 D10
|
||||
T5 P5 Z30 D10
|
||||
T6 P6 Z30 D10
|
||||
T7 P7 Z30 D10
|
||||
T8 P8 Z30 D10
|
||||
T9 P9 Z30 D10
|
||||
T10 P10 D0.5
|
||||
@@ -0,0 +1,37 @@
|
||||
xyzac-trt-kins (switchkins)
|
||||
|
||||
Uses remapped user m codes for kins switch:
|
||||
|
||||
M429: Identity Kinematics
|
||||
M428: XYZAC (TCP)
|
||||
M430: userk Kinematics
|
||||
|
||||
A hal net is required to connect the
|
||||
analog out pin N, Example (for N=3):
|
||||
|
||||
net :kinstype-select <= motion.analog-out-03
|
||||
net :kinstype-select => motion.switchkins-type
|
||||
|
||||
Hal Input pins:
|
||||
xyzac-trt-kins.y-offset
|
||||
xyzac-trt-kins.z-offset
|
||||
|
||||
Y and Z offsets are the offsets from the center
|
||||
of rotation of the A axis relative to the center
|
||||
of rotation of the C axis.
|
||||
|
||||
Hal Input pins:
|
||||
xyzac-trt-kins.x-rot-point
|
||||
xyzac-trt-kins.y-rot-point
|
||||
xyzac-trt-kins.z-rot-point
|
||||
|
||||
X, Y and Z rot-point pins represent the
|
||||
offsets of the center of rotation of the C axis
|
||||
relative to the machine absolute zero
|
||||
|
||||
Hal Input pins:
|
||||
xyzac-trt-kins.conventional-directions
|
||||
|
||||
Pin conventional-directions is false by default. If true,
|
||||
axis directions follow the conventions as defined
|
||||
at https://linuxcnc.org/docs/html/gcode/machining-center.html#_rotational_axes
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<label>
|
||||
<text>"SWITCHKINS"</text>
|
||||
<relief>RIDGE</relief>
|
||||
<bd>3</bd>
|
||||
</label>
|
||||
<multilabel>
|
||||
<legends>["0:IDENTITY", "1: XYZAC ", "2: USERK "]</legends>
|
||||
<font>("Helvetica",16)</font>
|
||||
<bg>"black"</bg>
|
||||
<fg>"yellow"</fg>
|
||||
</multilabel>
|
||||
<button>
|
||||
<halpin>"type0-button"</halpin>
|
||||
<text>"IDENTITY"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type1-button"</halpin>
|
||||
<text>"TCP:XYZAC"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type2-button"</halpin>
|
||||
<text>"userk "</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<button>
|
||||
<halpin>"vismach-clear"</halpin>
|
||||
<text>"vismach-clear"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
</pyvcp>
|
||||
@@ -0,0 +1,207 @@
|
||||
# Sat Jun 06 15:43:11 CST 2026
|
||||
#
|
||||
# This file: ./xyzac-trt_cmds.hal
|
||||
# Created by: /home/cnc/桌面/cnc_wams/linuxcnc/lib/hallib/basic_sim.tcl
|
||||
# With options:
|
||||
# From inifile: /home/cnc/桌面/cnc_wams/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
|
||||
# Halfiles: LIB:basic_sim.tcl
|
||||
#
|
||||
# This file contains the hal commands produced by basic_sim.tcl
|
||||
# (and any hal commands executed prior to its execution).
|
||||
# ------------------------------------------------------------------
|
||||
# To use ./xyzac-trt_cmds.hal in the original inifile (or a copy of it),
|
||||
# edit to change:
|
||||
# [HAL]
|
||||
# HALFILE = LIB:basic_sim.tcl parameters
|
||||
# to:
|
||||
# [HAL]
|
||||
# HALFILE = ./xyzac-trt_cmds.hal
|
||||
#
|
||||
# Notes:
|
||||
# 1) Inifile Variables substitutions specified in the inifile
|
||||
# and interpreted by halcmd are automatically substituted
|
||||
# in the created halfile (./xyzac-trt_cmds.hal).
|
||||
# 2) Input pins connected to a signal with no writer are
|
||||
# not included in the setp listings herein so must be added
|
||||
# manually
|
||||
#
|
||||
|
||||
# user space components
|
||||
loadusr -W hal_manualtoolchange
|
||||
|
||||
# components
|
||||
#preloaded module: loadrt tpmod
|
||||
#preloaded module: loadrt homemod
|
||||
loadrt xyzac-trt-kins sparm=identityfirst
|
||||
loadrt motmod base_period_nsec=0 servo_period_nsec=1000000 num_joints=5
|
||||
#loadrt __servo-thread (not loaded by loadrt, no args saved)
|
||||
loadrt pid names=J0_pid,J1_pid,J2_pid,J3_pid,J4_pid
|
||||
loadrt mux2 names=J0_mux,J1_mux,J2_mux,J3_mux,J4_mux
|
||||
loadrt ddt names=J0_vel,J0_accel,J1_vel,J1_accel,J2_vel,J2_accel,J3_vel,J3_accel,J4_vel,J4_accel
|
||||
loadrt sim_home_switch names=J0_switch,J1_switch,J2_switch,J3_switch,J4_switch
|
||||
loadrt sim_spindle names=sim_spindle
|
||||
loadrt limit2 names=limit_speed
|
||||
loadrt lowpass names=spindle_mass
|
||||
loadrt near names=near_speed
|
||||
loadrt scale names=rpm_rps
|
||||
# pin aliases
|
||||
# param aliases
|
||||
# signals
|
||||
# nets
|
||||
net J0:acc J0_accel.out
|
||||
net J0:enable joint.0.amp-enable-out => J0_pid.enable
|
||||
net J0:homesw J0_switch.home-sw => joint.0.home-sw-in
|
||||
net J0:on-pos J0_pid.output => J0_mux.in1
|
||||
net J0:pos-cmd joint.0.motor-pos-cmd => J0_pid.command
|
||||
net J0:pos-fb J0_mux.out => J0_mux.in0 J0_switch.cur-pos J0_vel.in joint.0.motor-pos-fb
|
||||
net J0:vel J0_vel.out => J0_accel.in
|
||||
net J1:acc J1_accel.out
|
||||
net J1:enable joint.1.amp-enable-out => J1_pid.enable
|
||||
net J1:homesw J1_switch.home-sw => joint.1.home-sw-in
|
||||
net J1:on-pos J1_pid.output => J1_mux.in1
|
||||
net J1:pos-cmd joint.1.motor-pos-cmd => J1_pid.command
|
||||
net J1:pos-fb J1_mux.out => J1_mux.in0 J1_switch.cur-pos J1_vel.in joint.1.motor-pos-fb
|
||||
net J1:vel J1_vel.out => J1_accel.in
|
||||
net J2:acc J2_accel.out
|
||||
net J2:enable joint.2.amp-enable-out => J2_pid.enable
|
||||
net J2:homesw J2_switch.home-sw => joint.2.home-sw-in
|
||||
net J2:on-pos J2_pid.output => J2_mux.in1
|
||||
net J2:pos-cmd joint.2.motor-pos-cmd => J2_pid.command
|
||||
net J2:pos-fb J2_mux.out => J2_mux.in0 J2_switch.cur-pos J2_vel.in joint.2.motor-pos-fb
|
||||
net J2:vel J2_vel.out => J2_accel.in
|
||||
net J3:acc J3_accel.out
|
||||
net J3:enable joint.3.amp-enable-out => J3_pid.enable
|
||||
net J3:homesw J3_switch.home-sw => joint.3.home-sw-in
|
||||
net J3:on-pos J3_pid.output => J3_mux.in1
|
||||
net J3:pos-cmd joint.3.motor-pos-cmd => J3_pid.command
|
||||
net J3:pos-fb J3_mux.out => J3_mux.in0 J3_switch.cur-pos J3_vel.in joint.3.motor-pos-fb
|
||||
net J3:vel J3_vel.out => J3_accel.in
|
||||
net J4:acc J4_accel.out
|
||||
net J4:enable joint.4.amp-enable-out => J4_pid.enable
|
||||
net J4:homesw J4_switch.home-sw => joint.4.home-sw-in
|
||||
net J4:on-pos J4_pid.output => J4_mux.in1
|
||||
net J4:pos-cmd joint.4.motor-pos-cmd => J4_pid.command
|
||||
net J4:pos-fb J4_mux.out => J4_mux.in0 J4_switch.cur-pos J4_vel.in joint.4.motor-pos-fb
|
||||
net J4:vel J4_vel.out => J4_accel.in
|
||||
net estop:loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
|
||||
net sample:enable motion.motion-enabled => J0_mux.sel J1_mux.sel J2_mux.sel J3_mux.sel J4_mux.sel
|
||||
net spindle-at-speed near_speed.out => spindle.0.at-speed
|
||||
net spindle-index-enable sim_spindle.index-enable <=> spindle.0.index-enable
|
||||
net spindle-orient spindle.0.orient => spindle.0.is-oriented
|
||||
net spindle-pos sim_spindle.position-fb => spindle.0.revs
|
||||
net spindle-rpm-filtered spindle_mass.out => near_speed.in2 rpm_rps.in
|
||||
net spindle-rps-filtered rpm_rps.out => spindle.0.speed-in
|
||||
net spindle-speed-cmd spindle.0.speed-out => limit_speed.in near_speed.in1
|
||||
net spindle-speed-limited limit_speed.out => sim_spindle.velocity-cmd spindle_mass.in
|
||||
net tool:change iocontrol.0.tool-change => hal_manualtoolchange.change
|
||||
net tool:changed hal_manualtoolchange.changed => iocontrol.0.tool-changed
|
||||
net tool:prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
|
||||
net tool:prep-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
|
||||
# parameter values
|
||||
setp J0_accel.tmax 0
|
||||
setp J0_mux.tmax 0
|
||||
setp J0_pid.do-pid-calcs.tmax 0
|
||||
setp J0_switch.tmax 0
|
||||
setp J0_vel.tmax 0
|
||||
setp J1_accel.tmax 0
|
||||
setp J1_mux.tmax 0
|
||||
setp J1_pid.do-pid-calcs.tmax 0
|
||||
setp J1_switch.tmax 0
|
||||
setp J1_vel.tmax 0
|
||||
setp J2_accel.tmax 0
|
||||
setp J2_mux.tmax 0
|
||||
setp J2_pid.do-pid-calcs.tmax 0
|
||||
setp J2_switch.tmax 0
|
||||
setp J2_vel.tmax 0
|
||||
setp J3_accel.tmax 0
|
||||
setp J3_mux.tmax 0
|
||||
setp J3_pid.do-pid-calcs.tmax 0
|
||||
setp J3_switch.tmax 0
|
||||
setp J3_vel.tmax 0
|
||||
setp J4_accel.tmax 0
|
||||
setp J4_mux.tmax 0
|
||||
setp J4_pid.do-pid-calcs.tmax 0
|
||||
setp J4_switch.tmax 0
|
||||
setp J4_vel.tmax 0
|
||||
setp limit_speed.tmax 0
|
||||
setp motion-command-handler.tmax 0
|
||||
setp motion-controller.tmax 0
|
||||
setp near_speed.difference 10
|
||||
setp near_speed.scale 1.1
|
||||
setp near_speed.tmax 0
|
||||
setp rpm_rps.tmax 0
|
||||
setp servo-thread.tmax 0
|
||||
setp sim_spindle.scale 0.01666667
|
||||
setp sim_spindle.tmax 0
|
||||
setp spindle_mass.gain 0.07
|
||||
setp spindle_mass.tmax 0
|
||||
# realtime thread/function links
|
||||
addf motion-command-handler servo-thread
|
||||
addf motion-controller servo-thread
|
||||
addf J0_pid.do-pid-calcs servo-thread
|
||||
addf J1_pid.do-pid-calcs servo-thread
|
||||
addf J2_pid.do-pid-calcs servo-thread
|
||||
addf J3_pid.do-pid-calcs servo-thread
|
||||
addf J4_pid.do-pid-calcs servo-thread
|
||||
addf J0_mux servo-thread
|
||||
addf J1_mux servo-thread
|
||||
addf J2_mux servo-thread
|
||||
addf J3_mux servo-thread
|
||||
addf J4_mux servo-thread
|
||||
addf J0_vel servo-thread
|
||||
addf J0_accel servo-thread
|
||||
addf J1_vel servo-thread
|
||||
addf J1_accel servo-thread
|
||||
addf J2_vel servo-thread
|
||||
addf J2_accel servo-thread
|
||||
addf J3_vel servo-thread
|
||||
addf J3_accel servo-thread
|
||||
addf J4_vel servo-thread
|
||||
addf J4_accel servo-thread
|
||||
addf J0_switch servo-thread
|
||||
addf J1_switch servo-thread
|
||||
addf J2_switch servo-thread
|
||||
addf J3_switch servo-thread
|
||||
addf J4_switch servo-thread
|
||||
addf limit_speed servo-thread
|
||||
addf spindle_mass servo-thread
|
||||
addf rpm_rps servo-thread
|
||||
addf near_speed servo-thread
|
||||
addf sim_spindle servo-thread
|
||||
|
||||
# setp commands for unconnected input pins
|
||||
setp J0_pid.FF0 1.0
|
||||
setp J0_pid.Pgain 0
|
||||
setp J0_pid.Dgain 0
|
||||
setp J0_pid.Igain 0
|
||||
setp J0_pid.FF1 0
|
||||
setp J0_pid.FF2 0
|
||||
setp J1_pid.FF0 1.0
|
||||
setp J1_pid.Pgain 0
|
||||
setp J1_pid.Dgain 0
|
||||
setp J1_pid.Igain 0
|
||||
setp J1_pid.FF1 0
|
||||
setp J1_pid.FF2 0
|
||||
setp J2_pid.FF0 1.0
|
||||
setp J2_pid.Pgain 0
|
||||
setp J2_pid.Dgain 0
|
||||
setp J2_pid.Igain 0
|
||||
setp J2_pid.FF1 0
|
||||
setp J2_pid.FF2 0
|
||||
setp J3_pid.FF0 1.0
|
||||
setp J3_pid.Pgain 0
|
||||
setp J3_pid.Dgain 0
|
||||
setp J3_pid.Igain 0
|
||||
setp J3_pid.FF1 0
|
||||
setp J3_pid.FF2 0
|
||||
setp J4_pid.FF0 1.0
|
||||
setp J4_pid.Pgain 0
|
||||
setp J4_pid.Dgain 0
|
||||
setp J4_pid.Igain 0
|
||||
setp J4_pid.FF1 0
|
||||
setp J4_pid.FF2 0
|
||||
setp sim_spindle.scale 0.01666667
|
||||
setp limit_speed.maxv 5000.0
|
||||
setp spindle_mass.gain .07
|
||||
setp near_speed.scale 1.1
|
||||
setp near_speed.difference 10
|
||||
@@ -0,0 +1,182 @@
|
||||
[APPLICATIONS]
|
||||
# uncomment to enable:
|
||||
#APP = halshow --fformat %.5f switchkins.halshow
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = sim-xyzbc-trt-kins (switchkins)
|
||||
|
||||
[DISPLAY]
|
||||
GEOMETRY = XYZB
|
||||
OPEN_FILE = ./demos/xyzbc_switchkins.ngc
|
||||
PYVCP = ./xyzbc-trt.xml
|
||||
JOG_AXES = XYZC
|
||||
DISPLAY = axis
|
||||
MAX_ANGULAR_VELOCITY = 360
|
||||
MAX_LINEAR_VELOCITY = 1000
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 2
|
||||
PROGRAM_PREFIX = ../../nc_files
|
||||
INTRO_GRAPHIC = emc2.gif
|
||||
INTRO_TIME = 1
|
||||
#EDITOR = geany
|
||||
TOOL_EDITOR = tooledit z diam
|
||||
|
||||
TKPKG = Ngcgui 1.0
|
||||
NGCGUI_FONT = Helvetica -12 normal
|
||||
NGCGUI_SUBFILE = xyzbc_switchkins_sub.ngc
|
||||
NGCGUI_SUBFILE = centering.ngc
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./remap_subs
|
||||
HAL_PIN_VARS = 1
|
||||
REMAP = M428 modalgroup=10 ngc=428remap
|
||||
REMAP = M429 modalgroup=10 ngc=429remap
|
||||
REMAP = M430 modalgroup=10 ngc=430remap
|
||||
PARAMETER_FILE = xyzbc.var
|
||||
|
||||
[KINS]
|
||||
#NOTE: for backwrds compatibility !!!!!!!!!!!!!!!!!!!
|
||||
# default switchkins-type == 0 is xyzbc-trt-kins
|
||||
# here switchkins-type == 0 is identity kins
|
||||
KINEMATICS = xyzbc-trt-kins sparm=identityfirst
|
||||
JOINTS = 5
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE = switchkins_postgui.hal
|
||||
|
||||
# net for control of motion.switchkins-type
|
||||
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type
|
||||
|
||||
# vismach xyzbc-trt-gui items
|
||||
HALCMD = loadusr -W xyzbc-trt-gui
|
||||
HALCMD = net :table-x joint.0.pos-fb xyzbc-trt-gui.table-x
|
||||
HALCMD = net :saddle-y joint.1.pos-fb xyzbc-trt-gui.saddle-y
|
||||
HALCMD = net :spindle-z joint.2.pos-fb xyzbc-trt-gui.spindle-z
|
||||
HALCMD = net :tilt-b joint.3.pos-fb xyzbc-trt-gui.tilt-b
|
||||
HALCMD = net :rotate-c joint.4.pos-fb xyzbc-trt-gui.rotate-c
|
||||
HALCMD = net :tool-offset motion.tooloffset.z
|
||||
HALCMD = net :tool-offset xyzbc-trt-kins.tool-offset xyzbc-trt-gui.tool-offset
|
||||
HALCMD = net :x-offset xyzbc-trt-kins.x-offset xyzbc-trt-gui.x-offset
|
||||
HALCMD = net :z-offset xyzbc-trt-kins.z-offset xyzbc-trt-gui.z-offset
|
||||
HALCMD = sets :x-offset -20
|
||||
HALCMD = sets :z-offset -15
|
||||
|
||||
# not currently supported by xyzbc-trt-gui:
|
||||
HALCMD = setp xyzbc-trt-kins.x-rot-point 0
|
||||
HALCMD = setp xyzbc-trt-kins.y-rot-point 0
|
||||
HALCMD = setp xyzbc-trt-kins.z-rot-point 0
|
||||
HALCMD = setp xyzbc-trt-kins.conventional-directions 0
|
||||
|
||||
[HALUI]
|
||||
# NOTE: kinstype==0 is identity kins because sparm=identityfirst
|
||||
# M429:identity kins (motion.switchkins-type==0 startupDEFAULT)
|
||||
# M428:xyzbc kins (motion.switchkins-type==1)
|
||||
# M430:userk kins (motion.switchkins-type==2)
|
||||
MDI_COMMAND = M429
|
||||
MDI_COMMAND = M428
|
||||
MDI_COMMAND = M430
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZBC
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = deg
|
||||
DEFAULT_LINEAR_VELOCITY = 20
|
||||
MAX_LINEAR_VELOCITY = 35
|
||||
MAX_LINEAR_ACCELERATION = 400
|
||||
DEFAULT_LINEAR_ACCELERATION = 300
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
COMM_TIMEOUT = 1
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.010
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = xyzbc-trt.tbl
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_B]
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_C]
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 50
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_4]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
@@ -0,0 +1,2 @@
|
||||
T1 P1 D1
|
||||
T2 P2 Z10 D8
|
||||
@@ -0,0 +1,37 @@
|
||||
xyzbc-trt-kins (switchkins)
|
||||
|
||||
Uses remapped user m codes for kins switch:
|
||||
|
||||
M429: Identity Kinematics
|
||||
M428: XYZBC (TCP)
|
||||
M430: userk Kinematics
|
||||
|
||||
A hal net is required to connect the
|
||||
analog out pin N, Example (for N=3):
|
||||
|
||||
net :kinstype-select <= motion.analog-out-03
|
||||
net :kinstype-select => motion.switchkins-type
|
||||
|
||||
Hal Input pins:
|
||||
xyzbc-trt-kins.x-offset
|
||||
xyzbc-trt-kins.z-offset
|
||||
|
||||
X and Z offsets are the offsets from the center
|
||||
of rotation of the B axis relative to the center
|
||||
of rotation of the C axis.
|
||||
|
||||
Hal Input pins:
|
||||
xyzbc-trt-kins.x-rot-point
|
||||
xyzbc-trt-kins.y-rot-point
|
||||
xyzbc-trt-kins.z-rot-point
|
||||
|
||||
X, Y and Z rot-point pins represent the
|
||||
offsets of the center of rotation of the C axis
|
||||
relative to the machine absolute zero
|
||||
|
||||
Hal Input pins:
|
||||
xyzbc-trt-kins.conventional-directions
|
||||
|
||||
Pin conventional-directions is false by default. If true,
|
||||
axis directions follow the conventions as defined
|
||||
at https://linuxcnc.org/docs/html/gcode/machining-center.html#_rotational_axes
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<label>
|
||||
<text>"SWITCHKINS"</text>
|
||||
<relief>RIDGE</relief>
|
||||
<bd>3</bd>
|
||||
</label>
|
||||
<multilabel>
|
||||
<legends>["0:IDENTITY", "1: XYZBC ", "2: USERK "]</legends>
|
||||
<font>("Helvetica",16)</font>
|
||||
<bg>"black"</bg>
|
||||
<fg>"yellow"</fg>
|
||||
</multilabel>
|
||||
<button>
|
||||
<halpin>"type0-button"</halpin>
|
||||
<text>"IDENTITY"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type1-button"</halpin>
|
||||
<text>"TCP:XYZBC"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type2-button"</halpin>
|
||||
<text>"userk"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<button>
|
||||
<halpin>"vismach-clear"</halpin>
|
||||
<text>"vismach-clear"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
</pyvcp>
|
||||
@@ -0,0 +1,119 @@
|
||||
5161 0.000000
|
||||
5162 0.000000
|
||||
5163 0.000000
|
||||
5164 0.000000
|
||||
5165 0.000000
|
||||
5166 0.000000
|
||||
5167 0.000000
|
||||
5168 0.000000
|
||||
5169 0.000000
|
||||
5181 0.000000
|
||||
5182 0.000000
|
||||
5183 0.000000
|
||||
5184 0.000000
|
||||
5185 0.000000
|
||||
5186 0.000000
|
||||
5187 0.000000
|
||||
5188 0.000000
|
||||
5189 0.000000
|
||||
5210 0.000000
|
||||
5211 0.000000
|
||||
5212 0.000000
|
||||
5213 0.000000
|
||||
5214 0.000000
|
||||
5215 0.000000
|
||||
5216 0.000000
|
||||
5217 0.000000
|
||||
5218 0.000000
|
||||
5219 0.000000
|
||||
5220 1.000000
|
||||
5221 0.000000
|
||||
5222 0.000000
|
||||
5223 0.000000
|
||||
5224 0.000000
|
||||
5225 0.000000
|
||||
5226 0.000000
|
||||
5227 0.000000
|
||||
5228 0.000000
|
||||
5229 0.000000
|
||||
5230 0.000000
|
||||
5241 0.000000
|
||||
5242 0.000000
|
||||
5243 0.000000
|
||||
5244 0.000000
|
||||
5245 0.000000
|
||||
5246 0.000000
|
||||
5247 0.000000
|
||||
5248 0.000000
|
||||
5249 0.000000
|
||||
5250 0.000000
|
||||
5261 0.000000
|
||||
5262 0.000000
|
||||
5263 0.000000
|
||||
5264 0.000000
|
||||
5265 0.000000
|
||||
5266 0.000000
|
||||
5267 0.000000
|
||||
5268 0.000000
|
||||
5269 0.000000
|
||||
5270 0.000000
|
||||
5281 0.000000
|
||||
5282 0.000000
|
||||
5283 0.000000
|
||||
5284 0.000000
|
||||
5285 0.000000
|
||||
5286 0.000000
|
||||
5287 0.000000
|
||||
5288 0.000000
|
||||
5289 0.000000
|
||||
5290 0.000000
|
||||
5301 0.000000
|
||||
5302 0.000000
|
||||
5303 0.000000
|
||||
5304 0.000000
|
||||
5305 0.000000
|
||||
5306 0.000000
|
||||
5307 0.000000
|
||||
5308 0.000000
|
||||
5309 0.000000
|
||||
5310 0.000000
|
||||
5321 0.000000
|
||||
5322 0.000000
|
||||
5323 0.000000
|
||||
5324 0.000000
|
||||
5325 0.000000
|
||||
5326 0.000000
|
||||
5327 0.000000
|
||||
5328 0.000000
|
||||
5329 0.000000
|
||||
5330 0.000000
|
||||
5341 0.000000
|
||||
5342 0.000000
|
||||
5343 0.000000
|
||||
5344 0.000000
|
||||
5345 0.000000
|
||||
5346 0.000000
|
||||
5347 0.000000
|
||||
5348 0.000000
|
||||
5349 0.000000
|
||||
5350 0.000000
|
||||
5361 0.000000
|
||||
5362 0.000000
|
||||
5363 0.000000
|
||||
5364 0.000000
|
||||
5365 0.000000
|
||||
5366 0.000000
|
||||
5367 0.000000
|
||||
5368 0.000000
|
||||
5369 0.000000
|
||||
5370 0.000000
|
||||
5381 0.000000
|
||||
5382 0.000000
|
||||
5383 0.000000
|
||||
5384 0.000000
|
||||
5385 0.000000
|
||||
5386 0.000000
|
||||
5387 0.000000
|
||||
5388 0.000000
|
||||
5389 0.000000
|
||||
5390 0.000000
|
||||
@@ -0,0 +1,75 @@
|
||||
|
||||
o<change> sub
|
||||
;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>)
|
||||
;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)
|
||||
|
||||
;otherwise after the M6 this information is gone!
|
||||
#<tool> = #<selected_tool>
|
||||
#<pocket> = #<selected_pocket>
|
||||
|
||||
; we must execute this only in the milltask interpreter
|
||||
; or preview will break, so test for '#<_task>' which is 1 for
|
||||
; the milltask interpreter and 0 in the UI's
|
||||
O100 if [#<_task> EQ 0]
|
||||
(debug, Task ist Null)
|
||||
O100 return [999]
|
||||
O100 endif
|
||||
|
||||
;first go up
|
||||
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
|
||||
; then move to change position
|
||||
G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>]
|
||||
|
||||
; cancel tool offset
|
||||
G49
|
||||
|
||||
; using the code being remapped here means 'use builtin behaviour'
|
||||
M6
|
||||
|
||||
O200 if [#<_hal[gmoccapy.toolmeasurement]> EQ 0]
|
||||
O200 return [3] ; indicate no tool measurement
|
||||
O200 endif
|
||||
|
||||
G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]
|
||||
G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
|
||||
|
||||
O300 if [#<_hal[gmoccapy.searchvel]> LE 0]
|
||||
O300 return [-1] ; indicate searchvel <= 0
|
||||
O300 endif
|
||||
|
||||
O400 if [#<_hal[gmoccapy.probevel]> LE 0]
|
||||
O400 return [-2] ; indicate probevel <= 0
|
||||
O400 endif
|
||||
|
||||
F #<_hal[gmoccapy.searchvel]>
|
||||
G91
|
||||
G38.2 Z #<_ini[TOOLSENSOR]MAXPROBE>
|
||||
G0 Z2
|
||||
; This is commented out only for sim.
|
||||
;F #<_hal[gmoccapy.probevel]>
|
||||
;G38.2 Z-4
|
||||
|
||||
O500 if [#5070 EQ 0]
|
||||
G90
|
||||
O500 return [-3] ; indicate probe contact failure to epilog
|
||||
O500 endif
|
||||
|
||||
G90
|
||||
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
|
||||
|
||||
#<touch_result> = #5063
|
||||
#<probeheight> = #<_hal[gmoccapy.probeheight]>
|
||||
#<blockheight> = #<_hal[gmoccapy.blockheight]>
|
||||
|
||||
;(DEBUG, #<touch_result> #<probeheight> #<blockheight>)
|
||||
|
||||
G10 L1 P#<tool> Z[#<touch_result> - #<_hal[gmoccapy.probeheight]> + #<_hal[gmoccapy.blockheight]>]
|
||||
G43
|
||||
|
||||
;G10 L1 P#<tool> Z#<touch_result>
|
||||
;G10 L2 P0 Z[#<workpieceheight> + #<probeheight> + #<touch_result>]
|
||||
|
||||
; signal success be returning a value > 0:
|
||||
o<change> endsub [1]
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
o<change_g43> sub
|
||||
;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>)
|
||||
;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)
|
||||
|
||||
; we must execute this only in the milltask interpreter
|
||||
; or preview will break, so test for '#<_task>' which is 1 for
|
||||
; the milltask interpreter and 0 in the UI's
|
||||
O100 if [#<_task> EQ 0]
|
||||
(debug, Task ist Null)
|
||||
O100 return [999]
|
||||
O100 endif
|
||||
|
||||
; using the code being remapped here means 'use builtin behaviour'
|
||||
M6
|
||||
|
||||
; set tool offset
|
||||
G43
|
||||
|
||||
; signal success be returning a value > 0:
|
||||
o<change_g43> endsub [1]
|
||||
M2
|
||||
@@ -0,0 +1,26 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a given position
|
||||
; the image path must be relative from your config dir or absolute, "~" is allowed
|
||||
(IMAGE, ./macros/images/goto_x_y_z.png)
|
||||
|
||||
O<go_to_position> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<go_to_position> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,25 @@
|
||||
; Testfile "hello world"
|
||||
; will just give messages
|
||||
|
||||
O<halo_world> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
G0 X10
|
||||
|
||||
(MSG, Hallo Welt)
|
||||
(MSG, hello world)
|
||||
|
||||
G0X-10
|
||||
|
||||
O<halo_world> endsub
|
||||
|
||||
M2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
; Testfile I am Lost
|
||||
; will jog to machine zero and set all axis to zero
|
||||
|
||||
; the image path must be relative from your config dir or absolute, "~" is allowed
|
||||
(IMAGE, ./macros/images/i_am_lost.png)
|
||||
|
||||
O<i_am_lost> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
(MSG, Will now move to machine zero)
|
||||
G53 G0 X0 Y0 Z0
|
||||
(MSG, will now set all axis to zero)
|
||||
G10 L20 P0 X0 Y0 Z0
|
||||
(MSG, all done)
|
||||
|
||||
|
||||
O<i_am_lost> endsub
|
||||
|
||||
M2
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 217 KiB |
@@ -0,0 +1,22 @@
|
||||
; Testfile "increment"
|
||||
; will move the machine in relative coordinates
|
||||
|
||||
O<increment> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
G91 G0 X#1 Y#2
|
||||
G90
|
||||
|
||||
(DEBUG, X was [#1] and Y was [#2])
|
||||
|
||||
O<increment> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,29 @@
|
||||
; Testfile "Jog around"
|
||||
; will just jog a little bit around
|
||||
|
||||
O<jog_around> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
G91 G0 X 25
|
||||
Y-25
|
||||
Z-25
|
||||
Y25
|
||||
X-25
|
||||
Z25
|
||||
F250
|
||||
G2 I 25
|
||||
|
||||
(MSG, It is done!)
|
||||
|
||||
O<jog_around> endsub
|
||||
|
||||
M2
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_0> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_0> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_1> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_1> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_10> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_10> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_11> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_11> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_12> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_12> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_13> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_13> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_14> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_14> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_15> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_15> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_2> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_2> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_3> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_3> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_4> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_4> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_5> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_5> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_6> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_6> endsub
|
||||
|
||||
M2
|
||||
@@ -0,0 +1,24 @@
|
||||
; Testfile go to position
|
||||
; will jog the machine to a position to give
|
||||
|
||||
O<macro_7> sub
|
||||
|
||||
G17
|
||||
G21
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<macro_7> endsub
|
||||
|
||||
M2
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user