Search the Community
Showing results for tags 'mpfan'.
-
Hello all, I am trying to add macro variables into my Haas post for my Next Gen controller. What I'm trying to add is the macro variables tied to the "tool type", "approximate length", approximate diameter", "edge height measure", and "probe type". I have been modifying the MPfan post. I will try to do my best explaining all the things I have done so far, as I believe I'm getting close... Starting with my pwrttparam$ section of my post, added the following code: if prmcode$ = 20007, my_holder_length = rparsngl(sparameter$, 13) #Define holder overall length if prmcode$ = 20007, my_holder_projection = rparsngl(sparameter$, 12) #Define tool projection if prmcode$ = 20004, my_tool_diameter = rparsngl(sparameter$, 5) #Define tool diameter if prmcode$ = 20004, my_tool_type = rparsngl(sparameter$, 2) #Define tool type The italics are my custom variables That I defined a the beginning of my post. Here is what these look like: my_holder_length : 0 #Define holder overall length my_holder_projection : 0 #Define tool projection my_tool_diameter : 0 #Define tool diameter my_tool_type : 0 #Define tool type my_probe_type : 0 #Define probe type my_tool_type_set : 0 #Define if tool type is set my_edge_height : 0 #Define edge measure height And here is my formatting i made for how I want it to post out: fmt "#5180_ = " 2 my_total_holder #Custom note format my_total_holder = my_holder_length + my_holder_projection #Custom note combination fmt "#5000_ = " 4 my_tool_type #Custom note format B fmt "#5200_ = " 3 my_tool_diameter #Custom note format D fmt "#5260_ = " 4 my_probe_type #Custom note format C fmt "#5220_ = " 2 my_edge_height #Custom note format K The underscore is where I would have to manually change the underscore for the proper tool number. For example, for tool one, the correct macro variable for "tool type" would be #50001. Now having to change the underscore myself isn't my biggest concern, although if anyone has ideas on how they can be sequential per tool that would be really cool! This will make more sense later when I show my post. Next is the changes I made to my ptooltable. [if my_tool_type_set < 1,] [if my_tool_type = 1, my_tool_type = 5, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 2, my_tool_type = 5, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 3, my_tool_type = 1, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 4, my_tool_type = 2, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 5, my_tool_type = 2, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 6, my_tool_type = 1, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 7, my_tool_type = 4, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 8, my_tool_type = 4, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 9, my_tool_type = 1, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 10, my_tool_type = 4, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 11, my_tool_type = 6, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 12, my_tool_type = 1, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 13, my_tool_type = 3, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 14, my_tool_type = 4, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 15, my_tool_type = 1, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 16, my_tool_type = 4, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 17, my_tool_type = 6, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 18, my_tool_type = 6, my_tool_type_set = 1, my_tool_type, e$] [if my_tool_type_set < 1,] [if my_tool_type = 19, my_tool_type = 4, my_tool_type_set = 1, my_tool_type, e$] my_tool_diameter, e$ my_total_holder, e$ [if my_tool_type = 1, my_probe_type = 2, my_probe_type, e$] [if my_tool_type = 2, my_probe_type = 2, my_probe_type, e$] [if my_tool_type = 3, my_probe_type = 1, my_probe_type, e$] [if my_tool_type = 4, my_probe_type = 3, my_probe_type, e$] [if my_tool_type = 5, my_probe_type = 2, my_probe_type, e$] [if my_tool_type = 6, my_probe_type = 3, my_probe_type, e$] [if my_probe_type = 3, my_edge_height = 0.05, my_edge_height, e$] [if my_edge_height = 0, my_edge_height, e$] my_tool_type = 0 #Reset tool type my_probe_type = 0 #Reset probe type my_edge_height = 0 #Reset edge height my_tool_type_set = 0. #Reset tool type set The first section is my way of taking the information pulled from this: (if prmcode$ = 20004, my_tool_type = rparsngl(sparameter$, 2) ) and convert it into the numbers used in the haas control. I know its messy but it kinda works.. Anyways, here's what my post looks like with 7 different tools being used. ( T1 | .250 X 2.125RCH SQ 3FL ALUMINUM C5 | H1 ) #5000_ = 4 #5200_ = .25 #5180_ = 6.0222 #5260_ = 3 #5220_ = .05 ( T2 | .062 X .312RCH BALL 3FL | H2 ) #5000_ = 6 #5200_ = .062 #5180_ = 3.391 ( T3 | .040 X .400RCH BALL 3FL | H3 ) #5200_ = .04 ( T4 | .250 90DEG SPOT DRILL | H4 ) #5000_ = 5 #5000_ = 2 #5200_ = .25 #5180_ = 3.1517 #5260_ = 2 #5220_ = 0. ( T5 | 1.6MM DRILL | H5 ) #5000_ = 1 #5200_ = .063 #5180_ = 2.6875 ( T6 | M2 X 0.4 TAP | H6 ) #5000_ = 2 #5200_ = .0787 #5180_ = 2.75 ( T7 | .031 X .156RCH SQ 3FL | H7 ) #5000_ = 4 #5200_ = .031 #5180_ = 3.141 #5260_ = 3 #5220_ = .05 M0 T1 and T7 post perfect, but the other ones all have problems. This is where I'm stuck. I'm new to this whole post editing thing, so any knowledge and help you can give would be amazing.
- 7 replies
-
- haas
- post processor
-
(and 3 more)
Tagged with:
Join us!
eMastercam - your online source for all things Mastercam.
Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.