Hello!
I'm using HSMXpress and I have a job with different operations. Some of them I like to mark as Optional and avoid to be post-processed, when I choose RMB -> PostProcess(All) on the job stock.
What modifications I have to make to the postprocessor file in order to skip the operations marked as Optional?
Could someone indicate a simple post file example dedicated for skipped Optional operations?
Hello @ateliercnc3d
initially the Optional operation was not defined for this usage.
The actual behavior of the optional is as follow :
The first operation is set as "normal", and the second one as "Optional":
N60 G0 Z5.
N65 G1 Z-1. F1000.
N70 X-80.
N75 G2 Y0.95 I0. J12.663
N80 G1 X80.
N85 G0 Z15.
N90 M1
/ N95 M9
/ N100 M5
/ N105 G53 G0 Z0.
(2D-Contour)
/ N110 M1
/ N115 T2 M6
/ N120 S6000 M3
/ N125 G54
/ N130 M8
/ N135 G1 X-9.725 Y36.25 F650.
/ N140 G0 G43 Z15. H2
/ N145 T3
/ N150 G0 Z5.
Please not the / sign in front of the line.
On controllers we can have a switch (software or hardware) for running or not the optionnal blocks.
If you want to remove the outputcompletely, the writeBlock function can be modified.
The changes I will show will be ok on a 3 axis milling machine.
But don't use it for a multi axis machine, i will explain later below.
Imagine the initial writeBlock is as follow:
function writeBlock() {
var text = formatWords(arguments);
if (!text) {
return;
}
if (getProperty("showSequenceNumbers")) {
if (optionalSection || skipBlock) {
if (text) {
writeWords("/", "N" + sequenceNumber, text);
}
} else {
writeWords2("N" + sequenceNumber, arguments);
}
sequenceNumber += getProperty("sequenceNumberIncrement");
} else {
if (optionalSection || skipBlock) {
writeWords2("/", arguments);
} else {
writeWords(arguments);
}
}
skipBlock = false;
}
We will change it to
function writeBlock() {
var text = formatWords(arguments);
if (!text) {
return;
}
if (getProperty("showSequenceNumbers")) {
if (optionalSection) { // do nothing
} else if (skipBlock) {
if (text) {
writeWords("/", "N" + sequenceNumber, text);
}
} else {
writeWords2("N" + sequenceNumber, arguments);
}
sequenceNumber += getProperty("sequenceNumberIncrement");
} else {
if (optionalSection) { // do nothing
} else if (skipBlock) {
writeWords2("/", arguments);
} else {
writeWords(arguments);
}
}
skipBlock = false;
}
Why not using it on a multi axis post?
N85 G0 Z15.
N90 M1
/ N91 G69 //workplane cancellation in 3+2 for example
/ N95 M9 // En of operation that will be suppressed by the Fix
/ N100 M5
/ N105 G53 G0 Z0.
(2D-Contour)
/ N110 M1
/ N115 T2 M6
/ N120 S6000 M3
......
Bunch of line ine thes middle suppressed for concision
......
/ N340 G0 Z15.
// no G69 here as the operation may be in 3 axis only
N345 M9 // end code of the second operation that will be used as end of the first one.
N350 M5
N355 G53 G0 Z0.
(2D-Contour with compensation left)
N360 M1
N365 T3 M6 // potential crash after that as the tilted workplane may still be active
Have a nice day.
Regards
______________________________________________________________
If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!
Can't find what you're looking for? Ask the community or share your knowledge.