Add M Code To Start And End

Add M Code To Start And End

anthonygodwin
Community Visitor Community Visitor
264 Views
1 Reply
Message 1 of 2

Add M Code To Start And End

anthonygodwin
Community Visitor
Community Visitor

Hello,

 

I want my post processor to output an M52 commands at the start of my program and a M62 command at the end. 

 

Is there a way to tell the post processor to add this when posting code? 

 

Thanks 

0 Likes
265 Views
1 Reply
Reply (1)
Message 2 of 2

programming2C78B
Advisor
Advisor

My guess is you find 

 

  writeBlock(gRotationModal.format(69));
  onImpliedCommand(COMMAND_END);
  onImpliedCommand(COMMAND_STOP_SPINDLE);
  writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
  if (subprograms.length > 0) {
    writeln("");
    write(subprograms);

 

 

 

and add/replace it with 

 

writeBlock(gRotationModal.format(69));
onImpliedCommand(COMMAND_END);

writeBlock(mFormat.format(62)); // custom code
onImpliedCommand(COMMAND_STOP_SPINDLE);
writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
if (subprograms.length > 0) {
writeln("");
write(subprograms);

 

 

 

You do the same much higher up, and add your 

writeBlock(mFormat.format(52)); // custom code
Please click "Accept Solution" if what I wrote solved your issue!