I am trying to use mi5 to turn on AINano (similar to HSM on my Bridgeport 760XP3) and am running into problems. I am running Mcam 8.1 and I have it almost working I just need to tweak it a little.
AI Nano is called out like this:
And it's turned of by using:
(1/2 FLAT ENDMILL )
G5.1 is the code for the AI Nano mode, Q turns it either on or off, and R is a number 0-9 to tell it how much to fudge the corners.
I have mi6 set up as that R value, and that works fine. I put the following code in to my post:
I then put a phsm callout between ptoolcomment and the toolchange line in both the ptlchg and psof sections of the post. Like so:
phsm #High speed machining on
if mi5 = one,
phsmoff #High speed machining off
if mi5 = one,
I also put phsmoff in the pretract section of the post. Like so:
pbld, phsm, e
pbld, *t, "M6", e
Now the problem I have is that it doesn't always associate turning AI Nano off with the correct tool. Say I have T1 a drill (Misc Values box unchecked), T2 an endmill(Misc Values box checked and mi5 as 1), and T3 a tap(Misc Values box unchecked also). What happens is I will get the G5.1Q0 line at the end of T1 instead of the end of T2. It will however turn AI Nano on correctly for T2, but it won't turn it off for T2.
gcode = zero
pbld, sccomp, scoolant, psub_end_mny, e
After turning the debugging lines on I see that the command to turn AI Nano off in T1 comes from pretract even though the Misc Values for that tool are off. My guess is that it is reading ahead. I just don't know how to limit it from doing that.
Any help would be appreciated,