Tool change modal parameter?

Here's the place for discussion related to CAM/CNC and the development of the Path module.
martys
Posts: 6
Joined: Mon Aug 14, 2017 6:22 am

Tool change modal parameter?

Postby martys » Tue May 08, 2018 7:08 pm

Hello,

sorry if OT, dunno if post this here on in Python section. I was wondering if there is way to make tool change modal parameter, so it wouldn´t write whole tool change sequence with M6 and M3 commands when the tool is same as in previous operation.
mlampert
Posts: 1279
Joined: Fri Sep 16, 2016 9:28 pm

Re: Tool change modal parameter?

Postby mlampert » Tue May 08, 2018 7:54 pm

I don't think post processing issues a tool change sequence if the TC is the same. Did you try if this is an issue, and if it is, can you post an example?

EDIT: This is the right forum for this type of question (anything related to Path).
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Tool change modal parameter?

Postby Konstantin » Wed May 09, 2018 7:31 am

I think the problem is similar to mine. When you call a T command, ATC should take tool from magazine to the hand, and with M6 make a tool change in spindel. So, if you call T command second time, it will cause an error, bacause tool is not in magazine. And if I call M6 second time, it will change to the wrong tool. In short - you can't call and change to the same tool twice. Because of that I had to make it modal in my Fanuc postprocessor, for example.
martys
Posts: 6
Joined: Mon Aug 14, 2017 6:22 am

Re: Tool change modal parameter?

Postby martys » Thu May 10, 2018 8:14 am

Well it seems maschine I was testing it on didn´t mind that same tool is in the code. Other problem i encountered was when there is helical movement the arc needs every parameter (X,Y,Z I,J) even if Y is still the same. I have everything set in modal so same parameters do not show on next line but i was able to do quick tweak and it worked perfectly. I was testing this on a 3 axis mill with Sinumerik 828D

Code: Select all

 elif param =="Y" and (c.Name in ["G2", "G3"])and (modalparam["Z"] != c.Parameters["Z"]):
 	outstring.append(param + format(c.Parameters[param], '.3f'))