Adaption of postprocessor jet.cps to add M03 / M05 instead of the comments

markus_sc
Participant Participant
218 Views
2 Replies
Message 1 of 3

Adaption of postprocessor jet.cps to add M03 / M05 instead of the comments

markus_sc
Participant
Participant

Hello together,

 

I am using the jet.cps for creating gcode for my homemade laser maschine. This is working fine so far, but I always have to adapt the created .nc code afterwards manually:

"(TURN ON CUTTING HERE)" replace with "M03;"

"(TURN OFF CUTTING HERE)" replace with "M05"

 

Now I was a little naive and thought that I can adapt the postprocessor itself so that I dont have to do that manually every time by hand. So I thought it would make sense to just add the commands after the comments in the .cps:

 

function setDeviceMode(enable) {
if (enable != deviceOn) {
deviceOn = enable;
if (enable) {
writeComment("TURN ON CUTTING HERE");
M03;
} else {
writeComment("TURN OFF CUTTING HERE");
M05;
}

 

So I saved it under jet_modified.cps and imported it into Fusion 360. But when I now try to create .nc files I get always the message, that the .nc could not be reworked and the file which is resulting is always .nc.failed

 

Maybe somebody could give me a hint how to adapt the jet.cps in the correct way, that I dont have to replace the comments in the created .nc code everytime manually.

 

Greetings

Markus

0 Likes
Accepted solutions (1)
219 Views
2 Replies
Replies (2)
Message 2 of 3

seth.madore
Community Manager
Community Manager
Accepted solution

Would this be acceptable?

N20 G0 X0.4278 Y0.1219
N25 M3
N30 G1 X0.2846 Y-0.0132 F39.37
N35 X0.4043 Y-0.5176
N40 X0.9249 Y-0.6734
N45 X1.3201 Y-0.3004
N50 X1.1947 Y0.2284
N55 X0.674 Y0.3841
N60 X0.2788 Y0.0111
N65 X0.2846 Y-0.0132
N70 X0.4732 Y-0.0696
N75 M5
N80 G0 X-1.3157 Y0.4482
N85 M3
N90 G1 X-1.1398 Y0.3598 F39.37
N95 G3 X-0.9871 Y0.6428 I-0.186 J0.283
N100 X-1.6644 I-0.3387
N105 X-1.1398 Y0.3598 I0.3387
N110 G1 X-1.1511 Y0.5563
N115 M5
N120 G0 X-1.1454 Y-0.3453
N125 M3
N130 G1 X-1.2312 Y-0.1682 F39.37
N135 X-1.597 Y-0.1416
N140 X-1.8169 Y-0.4658
N145 X-1.6461 Y-0.8183
N150 X-1.2554 Y-0.8467
N155 X-1.0355 Y-0.5225
N160 X-1.2062 Y-0.17
N165 X-1.2312 Y-0.1682
N170 X-1.3417 Y-0.3311
N175 M5
N180 G0 X-2.4342 Y-0.2666
N185 M3
N190 G1 X-2.2637 Y-0.1682 F39.37
N195 Y1.315
N200 G2 X-2.2437 Y1.335 I0.02
N205 G1 X2.2437
N210 G2 X2.2637 Y1.315 J-0.02
N215 G1 Y-1.315
N220 G2 X2.2437 Y-1.335 I-0.02
N225 G1 X-2.2437
N230 G2 X-2.2637 Y-1.315 J0.02
N235 G1 Y-0.1682
N240 X-2.4342 Y-0.0697
N245 M5

N250 M30

Seth Madore
Customer Advocacy Manager - Manufacturing


1 Like
Message 3 of 3

markus_sc
Participant
Participant

Thank you for your effort, this saves me a lot of time...

0 Likes