Hello all,
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:
Code:
N200
(1/2 FLAT ENDMILL )
G49
G5.1Q1R4
T2M6
And it's turned of by using:
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:
Code:
phsm #High speed machining on
if mi5 = one,
[
*"G49", e
*"G5.1Q1R",*shsms, e
]
phsmoff #High speed machining off
if mi5 = one,
[
*"G5.1Q0", e
] I then put a phsm callout between ptoolcomment and the toolchange line in both the ptlchg and psof sections of the post. Like so:
Code:
ptoolcomment
comment
pbld, phsm, e
pcan
pbld, *t, "M6", e
pindex I also put phsmoff in the pretract section of the post. Like so:
Code:
gcode = zero
pbld, phsmoff
pbld, sccomp, scoolant, psub_end_mny, 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.
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,
Thanks,
Jerry