-
postprocessor question
Hi im trying to make some small changes in a postprocessor for a Fanuc OM system.
If i click on mist in the feeds window in sprutcam i want the postprocessor to generate the M-code M50=airblast on my machine instead of M8=coolant.
The CLDATA is #1 for coolant and #2 for airmist.
This is how it looks now,how should it look for mist=M50 coolant=M8
program CoolNt
if Msp <> Msp@ or M <> M@ then call OutBl
if cld[1] = 71 then Mc = 8 else Mc = 9 ! On/Off coolant
outblock
end
Thanks
Tommy
-
Postprocessor change
Tommy,
The following change should do what you need:
Change:
if cld[1] = 71 then Mc = 8 else Mc = 9 ! On/Off coolant
To:
if cld[1] = 71 then Mc = 50 else Mc = 9 ! On/Off coolant
You should review the post-processed code after making the change before running the program to make sure it does what you want it to.
-Brian
-
hi Brian thanks for your answer.
If i change Mc = 8 to Mc = 50 the postprocessor is putting in M50 in the program.
Thats good :)but i want to be able to choose between flood=M8 and Mist=M50.
If i do the change you suggested it only puts in M50 no M8.
Tommy
-
Have it prompt you for a choice:
Something like:
program CoolNt
if Msp <> Msp@ or M <> M@ then call OutBl
Air$ = "N"
INPUT "Use Air Blast? Y\N (Case Sensitive): ", Air$
if Air$ = "Y" then Mc = 50
end
if Air$ = "N" then Mc = 8
end
if cld[1] = 71 then Mc = Air$ else Mc = 9 ! On/Off coolant
OutBlock
end
-
Air Blast
Tommy,
Does your current post-processor utilize the M07 mist coolant command? Does you machine have that feature. You could re-purpose the M7 code to output M50 like I showed for M8 in that case and use the dialogue already built into the machining operations GUI to select between the two or turn them both off in that case.
-Brian
-
I got it to work now:)
I tried to find a postprocessor that used mist M07 and change that to M50
as Brian suggested,but i did not find one.
So it was just luck and trial and error that got it to work in the end.
Here is the code
program CoolNt
if cld[2] = 1 then Mc = 8! coolant
if cld[1] = 72 then Mc = 9
else if cld[2] = 2 then Mc = 50! airblast
if cld[1] = 72 then Mc = 9
end
Thanks for the help
Tommy