结论:完成 LinuxCNC kinematics WASM ABI 覆盖,并将 web-rtcp-5axis-sim-plan 的 RTCP frame/boundary adapter 接到 xyzac-trt kinematics SDK;Node、build、browser smoke 验证通过。
184 lines
7.0 KiB
JavaScript
184 lines
7.0 KiB
JavaScript
import { getSourceReferencesForProfile } from "./source-reference-map.js";
|
|
import { xyzacTrtPyvcpPanelSchema } from "../panel-schema/xyzac-trt-pyvcp.js";
|
|
|
|
const sourceReferenceObjects = getSourceReferencesForProfile("xyzac-trt");
|
|
|
|
export const xyzacTrtProfile = {
|
|
id: "xyzac-trt",
|
|
title: "XYZAC table rotary tilting",
|
|
iniPath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini",
|
|
pyvcpXmlPath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.xml",
|
|
postguiHalPath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/switchkins_postgui.hal",
|
|
generatedHalPath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt_cmds.hal",
|
|
toolTablePath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.tbl",
|
|
machineName: "sim-xyzac-trt-kins (switchkins)",
|
|
display: {
|
|
geometry: "XYZ-A",
|
|
display: "axis",
|
|
jogAxes: ["X", "Y", "Z", "C"],
|
|
pyvcp: "./xyzac-trt.xml",
|
|
openFile: "./demos/xyzac_switchkins.ngc",
|
|
programPrefix: "../../nc_files",
|
|
positionOffset: "RELATIVE",
|
|
positionFeedback: "ACTUAL",
|
|
maxFeedOverride: 2,
|
|
},
|
|
rs274ngc: {
|
|
subroutinePath: "./remap_subs",
|
|
halPinVars: true,
|
|
parameterFile: "xyzac.var",
|
|
},
|
|
coordinates: ["X", "Y", "Z", "A", "C"],
|
|
joints: ["joint.0", "joint.1", "joint.2", "joint.3", "joint.4"],
|
|
kinematics: "xyzac-trt-kins",
|
|
kinematicsParameters: {
|
|
sparm: "identityfirst",
|
|
defaultSwitchkinsType: 0,
|
|
switchkinsTypes: [
|
|
{ value: 0, label: "identity", mdiCommand: "M429", webKinsType: "identity" },
|
|
{ value: 1, label: "XYZAC TCP", mdiCommand: "M428", webKinsType: "tcp-xyzac" },
|
|
{ value: 2, label: "USERK", mdiCommand: "M430", webKinsType: "userk" },
|
|
],
|
|
},
|
|
remaps: [
|
|
{
|
|
code: "M428",
|
|
modalGroup: 10,
|
|
ngc: "428remap",
|
|
path: "configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/428remap.ngc",
|
|
switchkinsType: 1,
|
|
analogOutputIndex: 3,
|
|
syncInputIndex: 0,
|
|
requiresHalPinVars: true,
|
|
},
|
|
{
|
|
code: "M429",
|
|
modalGroup: 10,
|
|
ngc: "429remap",
|
|
path: "configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/429remap.ngc",
|
|
switchkinsType: 0,
|
|
analogOutputIndex: 3,
|
|
syncInputIndex: 0,
|
|
requiresHalPinVars: true,
|
|
},
|
|
{
|
|
code: "M430",
|
|
modalGroup: 10,
|
|
ngc: "430remap",
|
|
path: "configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/430remap.ngc",
|
|
switchkinsType: 2,
|
|
analogOutputIndex: 3,
|
|
syncInputIndex: 0,
|
|
requiresHalPinVars: true,
|
|
},
|
|
],
|
|
hal: {
|
|
halui: true,
|
|
halFiles: ["LIB:basic_sim.tcl"],
|
|
postguiHalFiles: ["switchkins_postgui.hal"],
|
|
halcmd: {
|
|
switchkinsSelectNet: {
|
|
signal: "kinstype-select",
|
|
source: "motion.analog-out-03",
|
|
target: "motion.switchkins-type",
|
|
},
|
|
loadusr: ["xyzac-trt-gui"],
|
|
feedbackNets: [
|
|
{ signal: "table-x", source: "joint.0.pos-fb", target: "xyzac-trt-gui.table-x" },
|
|
{ signal: "saddle-y", source: "joint.1.pos-fb", target: "xyzac-trt-gui.saddle-y" },
|
|
{ signal: "spindle-z", source: "joint.2.pos-fb", target: "xyzac-trt-gui.spindle-z" },
|
|
{ signal: "tilt-a", source: "joint.3.pos-fb", target: "xyzac-trt-gui.tilt-a" },
|
|
{ signal: "rotate-c", source: "joint.4.pos-fb", target: "xyzac-trt-gui.rotate-c" },
|
|
],
|
|
offsetNets: [
|
|
{ signal: "tool-offset", source: "motion.tooloffset.z", target: "xyzac-trt-kins.tool-offset" },
|
|
{ signal: "tool-offset", source: "xyzac-trt-kins.tool-offset", target: "xyzac-trt-gui.tool-offset" },
|
|
{ signal: "y-offset", source: "xyzac-trt-kins.y-offset", target: "xyzac-trt-gui.y-offset" },
|
|
{ signal: "z-offset", source: "xyzac-trt-kins.z-offset", target: "xyzac-trt-gui.z-offset" },
|
|
],
|
|
initialSets: [
|
|
{ pin: "y-offset", value: 20 },
|
|
{ pin: "z-offset", value: 10 },
|
|
{ pin: "xyzac-trt-kins.x-rot-point", value: 0 },
|
|
{ pin: "xyzac-trt-kins.y-rot-point", value: 0 },
|
|
{ pin: "xyzac-trt-kins.z-rot-point", value: 0 },
|
|
{ pin: "xyzac-trt-kins.conventional-directions", value: 0 },
|
|
],
|
|
},
|
|
},
|
|
halui: {
|
|
mdiCommands: ["M429", "M428", "M430"],
|
|
},
|
|
traj: {
|
|
coordinates: "XYZAC",
|
|
linearUnits: "mm",
|
|
angularUnits: "deg",
|
|
defaultLinearVelocity: 20,
|
|
maxLinearVelocity: 35,
|
|
defaultLinearAcceleration: 300,
|
|
maxLinearAcceleration: 400,
|
|
},
|
|
axisLimits: {
|
|
X: { min: -200, max: 200, maxVelocity: 20, maxAcceleration: 300 },
|
|
Y: { min: -100, max: 100, maxVelocity: 20, maxAcceleration: 300 },
|
|
Z: { min: -120, max: 120, maxVelocity: 20, maxAcceleration: 300 },
|
|
A: { min: -100, max: 50, maxVelocity: 30, maxAcceleration: 300 },
|
|
C: { min: -36000, max: 36000, maxVelocity: 30, maxAcceleration: 300 },
|
|
},
|
|
jointConfig: [
|
|
{ id: 0, axis: "X", type: "LINEAR", home: 0, min: -200, max: 200, maxVelocity: 20, maxAcceleration: 300 },
|
|
{ id: 1, axis: "Y", type: "LINEAR", home: 0, min: -100, max: 100, maxVelocity: 20, maxAcceleration: 300 },
|
|
{ id: 2, axis: "Z", type: "LINEAR", home: 0, min: -120, max: 120, maxVelocity: 20, maxAcceleration: 300 },
|
|
{ id: 3, axis: "A", type: "ANGULAR", home: 0, min: -100, max: 50, maxVelocity: 30, maxAcceleration: 300 },
|
|
{ id: 4, axis: "C", type: "ANGULAR", home: 0, min: -36000, max: 36000, maxVelocity: 30, maxAcceleration: 300 },
|
|
],
|
|
halPins: [
|
|
"motion.switchkins-type",
|
|
"motion.analog-out-03",
|
|
"motion.tooloffset.z",
|
|
"xyzac-trt-kins.tool-offset",
|
|
"xyzac-trt-kins.y-offset",
|
|
"xyzac-trt-kins.z-offset",
|
|
"xyzac-trt-kins.x-rot-point",
|
|
"xyzac-trt-kins.y-rot-point",
|
|
"xyzac-trt-kins.z-rot-point",
|
|
"xyzac-trt-kins.conventional-directions",
|
|
"halui.mdi-command-00",
|
|
"halui.mdi-command-01",
|
|
"halui.mdi-command-02",
|
|
],
|
|
offsets: {
|
|
y: 20,
|
|
z: 10,
|
|
xRotPoint: 0,
|
|
yRotPoint: 0,
|
|
zRotPoint: 0,
|
|
conventionalDirections: 0,
|
|
},
|
|
sourceReferences: sourceReferenceObjects.map((reference) => reference.path),
|
|
sourceReferenceObjects,
|
|
panelSchema: xyzacTrtPyvcpPanelSchema,
|
|
toolTable: {
|
|
toolCount: 10,
|
|
tools: [
|
|
{ tool: 1, pocket: 1, zOffset: 0, diameter: 1, comment: "end mill" },
|
|
{ tool: 2, pocket: 2, zOffset: 15, diameter: 8, comment: "end mill" },
|
|
{ tool: 3, pocket: 3, zOffset: 0, diameter: 4.2, comment: "#7 tap drill" },
|
|
{ tool: 4, pocket: 4, zOffset: 0, diameter: 10, comment: null },
|
|
{ tool: 5, pocket: 5, zOffset: 30, diameter: 10, comment: null },
|
|
{ tool: 6, pocket: 6, zOffset: 30, diameter: 10, comment: null },
|
|
{ tool: 7, pocket: 7, zOffset: 30, diameter: 10, comment: null },
|
|
{ tool: 8, pocket: 8, zOffset: 30, diameter: 10, comment: null },
|
|
{ tool: 9, pocket: 9, zOffset: 30, diameter: 10, comment: null },
|
|
{ tool: 10, pocket: 10, zOffset: 0, diameter: 0.5, comment: null },
|
|
],
|
|
},
|
|
samplePrograms: [
|
|
"configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins.ngc",
|
|
"linuxcnc/nc_files/3D_Chips.ngc",
|
|
],
|
|
semanticBoundary: "profile_source_map_only_not_runtime_proof",
|
|
linuxCncKinematicsReady: false,
|
|
promotionAllowed: false,
|
|
};
|