- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to get a Mach 3 5 axis post and I'm having some trouble getting it to produce b and c code for the fourth and fifth axes which tilt around y and rotate around z respectively. The text in red has been added but nothing else has been changed and all code prior to the onopen statement is the original code downloaded from https://cam.autodesk.com/hsmposts. This code produces A and B axis but I require B and C for my machine. Apart from that the code runs without any problems in Mach.
Thanks
David
function onOpen() {
if (properties.useRadius) {
maximumCircularSweep = toRad(90); // avoid potential center calculation errors for CNC
}
if (true) {
var bAxis = createAxis({coordinate:0, table:true, axis:[0, 1, 0], preference:0});
var cAxis = createAxis({coordinate:1, table:true, axis:[0, 0, 1], preference:0});
machineConfiguration = new MachineConfiguration(bAxis, cAxis);
setMachineConfiguration(machineConfiguration);
optimizeMachineAngles2(1); // 0= Enabled, 1=disabled TCP enabled (eg. M128, TRAORI, G43.4, G243)
}
if (properties.fourthAxisAround != "none") {
var aAxis = createAxis({coordinate:0, table:true, axis:[(properties.fourthAxisAround == "x") ? -1 : 0, (properties.fourthAxisAround == "y") ? -1 : 0, 0], cyclic:true, preference:0});
machineConfiguration = new MachineConfiguration(aAxis);
setMachineConfiguration(machineConfiguration);
optimizeMachineAngles2(1); // map tip mode
}
if (!machineConfiguration.isMachineCoordinate(0)) {
aOutput.disable();
}
if (!machineConfiguration.isMachineCoordinate(1)) {
bOutput.disable();
}
if (!machineConfiguration.isMachineCoordinate(2)) {
cOutput.disable();
}
if (!properties.separateWordsWithSpace) {
setWordSeparator("");
}
sequenceNumber = properties.sequenceNumberStart;
if (programName) {
writeComment(programName);
}
if (programComment) {
writeComment(programComment);
}
Solved! Go to Solution.

