Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tool Return Command Advice

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
mark.hannafordMCXEY
460 Views, 8 Replies

Tool Return Command Advice

Hi, I have a Roland MDX540 and the post I am using is great except that my machine has an ATC installed. I would like to add to the post processor the M06T0 command so that the tool unloads after each program has ended. I have attempted to learn Javascript using Visual Studio Code but it doesn't make any sense to me. What would the command look like and where should it be placed before the script below or in between? Your advice would be appreciated, thank you.

 

 

function onClose() {
writeBlock("H"); // retract
zOutput.reset();

onImpliedCommand(COMMAND_END);
onImpliedCommand(COMMAND_STOP_SPINDLE);
writeBlock("H"); // spindle stop
}

function setProperty(property, value) {
properties[property].current = value;
}
8 REPLIES 8
Message 2 of 9

Hi @mark.hannafordMCXEY 

 

Thanks for raising your concern via Forum. 

 

I assume you are using Roland ISO post from F360 library. 

 

Open post file in a 'Visual Studio Code' or 'Notepad++' to do the required modifications.

 

1. Add below code after line number 512 to print 'M6 T0'

writeBlock(mFormat.format(6)+" T0");

Roland.png

 

Hope this helps!

 

Regards

 



Arun.RS
Technical Consultant - Post Processor
Message 3 of 9

Hello Arun.rs,
Thank you so much for your advice. I have been trying on and off for a month to get this to work. I would never have got to your script. I did get close though writeBlock (mFormat.format(“M06T0”)). Anyway this is irrelevant.
I do have a question when I open Roland’s Post “roland.cps” (not sure if it is ISO or not) in Visual Studio Code, I only have a total of 284 lines. Am opening this up correctly?
Regards,
Mark Hannaford
Message 4 of 9

HI @mark.hannafordMCXEY 

 

You can download Roland ISO post from below link :

 

https://cam.autodesk.com/hsmposts?p=roland_iso

 

Let me know if you need any help.

 

Regards



Arun.RS
Technical Consultant - Post Processor
Message 5 of 9

Hello Arun.rs,
Thank you very much. It works to a point. The M06T0 appears on the tool change but not at the end of the code. I haven’t run it on my machine yet and I will tomorrow to see what happens. I okay I will contact you tomorrow and thank you for your help, it is very much appreciated.
Regards,
Mark Hannaford
Message 6 of 9

HI @mark.hannafordMCXEY 

 

OK . Kindly test the output on machine and let me know the feedback. Happy to help!

 

If you need the code to appear in end of toolpath then,

 

1. Search ' function onClose() { '

2. Paste the same code just after ' onCommand(COMMAND_COOLANT_OFF); '

 

function onClose() {
  onCommand(COMMAND_COOLANT_OFF);
  writeBlock(mFormat.format(6)+" T0");

 

Hope this helps !

 

Regards

 



Arun.RS
Technical Consultant - Post Processor
Message 7 of 9

Hello Arun.rs,
Thank you very much this Post now runs very well. I have noted that this Post generates an option stop between tool changes. Can you tell me how to remove that function. And at the very end of the program the tool gets put away, but then the empty spindle starts up and then stops for about 10 seconds. Have you got any advice on that.
Regards,
Mark Hannaford
Message 8 of 9

HI @mark.hannafordMCXEY 

 

Thanks for the feedback !

 

To omit the optional stop, you can handle thru the property page. Refer the image. 

Optional.png

 

For the empty spindle starts for 10 secs, I am not sure why this happens. You can hand edit the code like below and check on machine.

 

G0 Z15.
M05 >>>>>>>>>>> ADD SPINDLE STOP
G91
G28 Z0.
G90
G91
G28 X0. Y0.
G90
M30
%

 

Regards

 



Arun.RS
Technical Consultant - Post Processor
Message 9 of 9

Hello Arun.rs,
Thank you and I didn’t see the properties box before. I feel really stupid to ask you such a stupid question. The adjustments I have made to the Roland ISO Post with regards to the tool unloading makes the machine program look like below. Now I can see referring to your example, the M5 is in a different place. Can I move the writeBlock (mFormat.format(6)+”T0”); to another place to get my output to match yours? The end of my Roland ISO Post looks like the below picture.
G0 Z15.
G17
M6 T0
G91
G28 Z0.
G90
M5
G91
G28 X0. Y0.
G90
M30


function onClose() {
onCommand(COMMAND_COOLANT_OFF);
writeBlock(mFormat.format(6)+" T0");
writeRetract(Z);

onCommand(COMMAND_STOP_SPINDLE);

setWorkPlane(new Vector(0, 0, 0)); // reset working plane

writeRetract(X, Y);

onImpliedCommand(COMMAND_END);
onImpliedCommand(COMMAND_STOP_SPINDLE);
writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
writeln("%");
}

function setProperty(property, value) {
properties[property].current = value;
}


Regards,
Mark Hannaford

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report