Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

help with HAAS post


Recommended Posts

I have been making minor adjustments to my post and learning along the way, but I can't seem to figure out several items:

 

1) I want to change the output of the rapid move to the Z "feed plane" so that the M08 is on the same line:

 

T04 M06 ( 1/2 ENDMILL 3FLT AL | H04 | D04 )
G00 G90 G54 X.5 Y-2.755 S10000 M03
G43 H04 Z2.
M08       (Z.1 M08)
Z.1

G01 Z-.125 F50.
G41 D04 Y-2.255 F25.

 

2) Also, on the rapid move at the end of an operation, I want to have M09 on the same line with G00 Z2. and I don't want the line with M05

 

G01 G40 Y-2.75
G00 Z2.  (G00 Z2. M09)
M05     (delete)

G91 G28 Z0.
M01
T04 M06 ( 1/2 ENDMILL 3FLT AL | DIAM .5 )
G00 G90 G54 X.5 Y-2.755 S10000 M03
G43 H04 Z2.

 

3) In the program header tool table and tool comments at each tool change I want no spaces at the parenthesis

 

O5555 (HAAS MILL POST TEST)
(DATE 02-08-2016 J.VIZZI)
(PART DESCRIPTION )
(CUSTOMER)
(MATERIAL,  )
(G54, XY= ;Z=)
 
( T04 | 1/2 ENDMILL 3FLT AL | H04 | D04 )            ---> (T04 | 1/2 ENDMILL 3FLT AL | H04 | D04), no spaces before/after paranthesis
 
G00 G20 G17 G40 G49 G80 G90
G91 G28 Z0.
M01
 
T04 M06 ( 1/2 ENDMILL 3FLT AL | H04 | D04 )  --->   (1/2 ENDMILL 3FLT AL | H04 | D04), no spaces before/after paranthesis
G00 G90 G54 X.5 Y-2.755 S10000 M03
G43 H04 Z2.

 

I know that all of these changes are minor, and in no way affect the way the program runs. For me, it is about matching the output of this post with the post of another software that I use. I really want them to post exactly the same.

 

*another question I have is about Diameter offset numbers. We have one machine that uses one offset page for diameters and heights, so the D numbers have to be different than the T/H numbers. What I do is add "40" to the tool number to make the diameter offset number, so: T1 > D41, T2 > D42 etc. How can I edit my MCX7 post to do this?

 

 

 

 

Link to comment
Share on other sites

Interesting 1st post. When you reached out to your Mastercam dealer what was their response? I don't believe in companies who use bootleg versions of the software and since it is a very interesting 1st post others might be seeing this as coming from a person or company running a bootleg version of the software. Provide a solid email and company information and you might get a response, but until then unless someone steps off to help you will find it hard to get your question answered.

Link to comment
Share on other sites
Thank you for your reply, I was wondering why no one was answering me. I don't understand what I said that was shady or "interesting"? This is my situation, the company I work for does have a legal license of MC. They dropped subscription service before I came here, and no one here now knows who the old contact or reseller was that I can reach out to. We own the software and the post I am working on is simply and edit of the included Haas post with MC. Again, if I am violating some kind of protocol or unwritten "code" of this forum, I certainly don't know what it is. 
 
My experience with other forums like practical machinist and cnczone has been the polar opposite. I post there and get replies within minutes and everyone is open and willing to help. I have tried searching this forum for relevant topics to my questions about editing this post and I noticed that many questions go completely unanswered, or half the time the answer is "contact your reseller". I mean if this forum is just a marketing tool for the resellers than that's fine. I'm just reaching out for help. If MC did not want people to make their own posts, then why would they have created such a powerful editing/debugging tool built in to the software?
 

Again, if I did some wrong, please explain to me what that is...

Link to comment
Share on other sites

Thanks for the reply Machineguy,

 

I understand this is a MC only forum, that is why I posted here, I wasn't getting help on those other sites. And I am in the process of finding either the old reseller who originally set us up, or someone new. But in the mean time, am I not going to get any help here?

 

Is it a, "we all had to pay for our posts, so you do too" thing? I can understand that.

Link to comment
Share on other sites

Hi Rocketmachinist,

 

Thank you for your reply. As mentioned in my OP, I understand they are minor cosmetic changes. It is about getting MC and another CAM i use to post out the same. I am also just looking to learn from the process about how to edit posts. I have been able to do alot of what I wanted already, but can't seem to figure these out. I am particularly interested in the question about "D" numbers posting out as different than their "T" numbers for out Matsuura mill

 

Thanks

Link to comment
Share on other sites

I am not sure because I only have an HLE of Mastercam so i cannot check it out. (switched shops after 6 years of using Mastercam and they are in the process of buying me a seat.) But if you go into Machine Definitions and then control definitions there should be a tab that says tool.

 

Then under the tool it says add to length or add to diameter. I think if you put 40 into the diameter then whatever offset is set as the main will have the 40 added to it.  I would start there first. But, like I said I am not sure on that one.

Link to comment
Share on other sites

I get really leery of helping people when they claim they don't know who their reseller is....

 

You may not be active but someone for damn sure knows who they got the software through....

 

Being in Florida.....

 

There is only 1 option, might give them a call

 

 

The Mastercam Reseller(s) Near You

CamTech Engineering Services LLC-

Contact: James Gamble Phone: 386-788-2624 

Email: [email protected] -

See more at: http://www.mastercam.com/en-us/Communities/Find-A-Reseller#sthash.9QQUMAJu.dpuf

Link to comment
Share on other sites

Assuming you are using one of the generic Mastercam Haas posts

 

in psof$ and ptlchg$

 

you want to move the pscool  or scoolant variable to this line...that is dependent if you are using X style of V9 style coolant

 

pbld, n$, sg43, *tlngno$, pfzout, pstagetool, e$

 

in pretract

 

you want to remove the sm05

 

pbld, n$, sccomp, *sm05, psub_end_mny, e$

 

and then add

 

scoolant to this line if it's not there

 

 pbld, n$, [if gcode$, sgfeed], sgabsinc, sgcode, *sg28ref, "Z0.", [if gcode$, feed], scoolant, e$

Link to comment
Share on other sites

I tried adding "scoolant" to several different locations in here and can't seem to get it on the same line as "g00 z2.0"

 

This is the code I get as it is now:

 

G01 G40 Y-2.75
G00 Z2.
G91 G28 Z0
M01
T01 M06 ( 1/2 ENDMILL 3FLT AL | DIAM .5 )
G00 G90 G54 X.5 Y-2.755 S1069 M03
G43

 

Here is the current "pretract" section:

 

pretract        #End of tool path, toolchange
      sav_absinc = absinc$
      absinc$ = one
      sav_coolant = coolant$
      coolant$ = zero
      

#      if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless
        [                 #  explicitely turned off through a canned text edit
        if all_cool_off,
          [
          #all coolant off with a single off code here
          if coolant_on, pbld, n$, sall_cool_off, e$
          coolant_on = zero
          ]
        else,
          [
          local_int = zero
          coolantx = zero
          while local_int < 20 & coolant_on > 0,
            [
            coolantx = and(2^local_int, coolant_on)
            local_int = local_int + one
            if coolantx > zero,
              [
              coolantx = local_int
              pbld, n$, scoolantx, e$
              ]
            coolantx = zero
            ]
          coolant_on = zero
          ]
        ]
      #cc_pos is reset in the toolchange here
      cc_pos$ = zero
      gcode$ = zero
      pbld, n$, sccomp, psub_end_mny, e$
      pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0", e$
      if nextop$ = 1003 | tlchg_home, pbld, n$, *sg28ref, "Y0.", protretinc, e$
      else, pbld, n$, protretinc, e$
      if (subactv = zero & use_g52_shft & wrkofs_num = zero) | shft_flg = one,
        [
        n$, *sg52, "X0. Y0. Z0.", e$ #Cancel Work Shift
        shft_flg = zero
        ]
      absinc$ = sav_absinc
      coolant$ = sav_coolant

Link to comment
Share on other sites

Working with the drill cycles can be kind of tricky, depending on what version of post you are using. The Drill Cycles have been updated over the years, so that there are two different sets of variables available. There are the "raw" values, and the "calculated" values, plus the "new drill variables".

 

The easiest distinction to make is the "new" drill variables. All of these values start with "drl_".

 

When you are editing post processors, do not use Notepad, or any other generic text editor. This is because the Mastercam Code Expert, has "tool tips" that pop-up and show you a list of all the pre-defined variables in the MP language. It saves a ton of searching in the Post Documentation.

 

(In Mastercam, go to File > Edit/Open External. That will open a dialog box. Click the "Editor" button, and make sure "Mastercam" is selected in the list. There are two radio buttons on the left side, "Auto" and "Text". Make sure "Auto" is set. Then browse to "Shared Mcamx_\Mill\Posts" and open your Hass post file. That should recognize that it is a "post" and this will give you the 'auto-complete' for the variables and show the list)

 

The "normal" Drill Cycles are set by post to call the "Entry Post Block" for that cycle. "pdrill$" for a G81, "ppeck$" for a G83, and so on.

 

When I type "drl_" into the editor, I see this list:

      drl_cycle$
      drl_cycle_actv$
      drl_depth_x$
      drl_depth_y$
      drl_depth_z$
      drl_dia$
      drl_init_x$
      drl_init_y$
      drl_init_z$
      drl_m1$
      drl_m2$
      drl_m3$
      drl_m4$
      drl_m5$
      drl_m6$
      drl_m7$
      drl_m8$
      drl_m9$
      drl_plane$
      drl_prm1$
      drl_prm10$
      drl_prm2$
      drl_prm3$
      drl_prm4$
      drl_prm5$
      drl_prm6$
      drl_prm7$
      drl_prm8$
      drl_prm9$
      drl_ref_x$
      drl_ref_y$
      drl_ref_z$
      drl_sel_ini$
      drl_sel_ref$
      drl_sel_tos$
      drl_skewed$
      drl_tos_x$
      drl_tos_y$
      drl_tos_z$
      drl_vtoolx$
      drl_vtooly$
      drl_vtoolz$
      drl_zdrl_x$
      drl_zdrl_y$
      drl_zdrl_z$

For the other variables, the names aren't as readily apparent. But try these:

initht$
refht$
tosz$
depth$
z$
w$
zdrl$

And the various parameters on the Drill Cycle Parameters page are as follows:

peck1$ = First peck amount
peck2$ = Subsequent peck amount
peckclr$ = Peck clearance
retr$    = Chip break retract amount
shftdrl$ = Boring bar clearance shift amount
  • Like 1
Link to comment
Share on other sites

 

Working with the drill cycles can be kind of tricky, depending on what version of post you are using. The Drill Cycles have been updated over the years, so that there are two different sets of variables available. There are the "raw" values, and the "calculated" values, plus the "new drill variables".

 

The easiest distinction to make is the "new" drill variables. All of these values start with "drl_".

 

When you are editing post processors, do not use Notepad, or any other generic text editor. This is because the Mastercam Code Expert, has "tool tips" that pop-up and show you a list of all the pre-defined variables in the MP language. It saves a ton of searching in the Post Documentation.

 

(In Mastercam, go to File > Edit/Open External. That will open a dialog box. Click the "Editor" button, and make sure "Mastercam" is selected in the list. There are two radio buttons on the left side, "Auto" and "Text". Make sure "Auto" is set. Then browse to "Shared Mcamx_\Mill\Posts" and open your Hass post file. That should recognize that it is a "post" and this will give you the 'auto-complete' for the variables and show the list)

 

The "normal" Drill Cycles are set by post to call the "Entry Post Block" for that cycle. "pdrill$" for a G81, "ppeck$" for a G83, and so on.

 

When I type "drl_" into the editor, I see this list:

      drl_cycle$
      drl_cycle_actv$
      drl_depth_x$
      drl_depth_y$
      drl_depth_z$
      drl_dia$
      drl_init_x$
      drl_init_y$
      drl_init_z$
      drl_m1$
      drl_m2$
      drl_m3$
      drl_m4$
      drl_m5$
      drl_m6$
      drl_m7$
      drl_m8$
      drl_m9$
      drl_plane$
      drl_prm1$
      drl_prm10$
      drl_prm2$
      drl_prm3$
      drl_prm4$
      drl_prm5$
      drl_prm6$
      drl_prm7$
      drl_prm8$
      drl_prm9$
      drl_ref_x$
      drl_ref_y$
      drl_ref_z$
      drl_sel_ini$
      drl_sel_ref$
      drl_sel_tos$
      drl_skewed$
      drl_tos_x$
      drl_tos_y$
      drl_tos_z$
      drl_vtoolx$
      drl_vtooly$
      drl_vtoolz$
      drl_zdrl_x$
      drl_zdrl_y$
      drl_zdrl_z$
For the other variables, the names aren't as readily apparent. But try these:
initht$
refht$
tosz$
depth$
z$
w$
zdrl$

And the various parameters on the Drill Cycle Parameters page are as follows:
peck1$ = First peck amount
peck2$ = Subsequent peck amount
peckclr$ = Peck clearance
retr$    = Chip break retract amount
shftdrl$ = Boring bar clearance shift amount

Colin, as usual you are awesome.

 

This didn't help me much this time but I'd like say thanks for being willing to help any and every one here. It is appreciated.

 

 

I wish I knew as much as you've forgotten.

  • Like 1
Link to comment
Share on other sites

The easiest way to "test" all these values is to take your "custom" drill cycle post block, and just add some "debugging" code to force the output of all the variable values at once. Then you can post out the cycle, and see what each variable value is set to:

      #Debugging variables
      "DEBUG VARIABLE LIST", e$
      "-------------------", e$
      ~drl_cycle$, e$
      ~drl_cycle_actv$, e$
      ~drl_depth_x$, e$
      ~drl_depth_y$, e$
      ~drl_depth_z$, e$
      ~drl_dia$, e$
      ~drl_init_x$, e$
      ~drl_init_y$, e$
      ~drl_init_z$, e$
      ~drl_m1$, e$
      ~drl_m2$, e$
      ~drl_m3$, e$
      ~drl_m4$, e$
      ~drl_m5$, e$
      ~drl_m6$, e$
      ~drl_m7$, e$
      ~drl_m8$, e$
      ~drl_m9$, e$
      ~drl_plane$, e$
      ~drl_prm1$, e$
      ~drl_prm10$, e$
      ~drl_prm2$, e$
      ~drl_prm3$, e$
      ~drl_prm4$, e$
      ~drl_prm5$, e$
      ~drl_prm6$, e$
      ~drl_prm7$, e$
      ~drl_prm8$, e$
      ~drl_prm9$, e$
      ~drl_ref_x$, e$
      ~drl_ref_y$, e$
      ~drl_ref_z$, e$
      ~drl_sel_ini$, e$
      ~drl_sel_ref$, e$
      ~drl_sel_tos$, e$
      ~drl_skewed$, e$
      ~drl_tos_x$, e$
      ~drl_tos_y$, e$
      ~drl_tos_z$, e$
      ~drl_vtoolx$, e$
      ~drl_vtooly$, e$
      ~drl_vtoolz$, e$
      ~drl_zdrl_x$, e$
      ~drl_zdrl_y$, e$
      ~drl_zdrl_z$, e$
      ~initht$, e$
      ~refht$, e$
      ~tosz$, e$
      ~depth$, e$
      ~z$, e$
      ~w$, e$
      ~zdrl$, e$
Link to comment
Share on other sites

Colin, as usual you are awesome.

 

This didn't help me much this time but I'd like say thanks for being willing to help any and every one here. It is appreciated.

 

 

I wish I knew as much as you've forgotten.

 

Thanks man. I do it mainly to give back to a place that has had a huge impact on my career. I literally got several different jobs because of my participation on this forum.

 

You should consider taking one of my online Post Processor classes if you'd like to learn more about posts. The documentation is awesome, but super hard to digest into something meaningful when you are just reading it verbatim. Much easier when you have someone teaching you, and the ability to ask questions...

Link to comment
Share on other sites

Updates:

 

I got the spacing how I like it in the Tool Table output. And I have the M08 on the same line as the z rapid move to feed plane (Z.1 M08)

 

still working on the M09 to be on same line as the G00 Z2. at the end of an operation. And the spacing issue in the tool comments

Link to comment
Share on other sites

For the Tool Comments, find the 'ptoolcomment' post block.

 

If your block looks like this:

ptoolcomment    #Comment for tool
      tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
      if tool_info = 1 | tool_info = 3,
        sopen_prn, pstrtool, sdelimiter, *tnote, sdelimiter, *toffnote, sdelimiter, *tlngnote, sdelimiter, *tldia$, sclose_prn, e$

Then add the 'no_spc$' parameter to the output, like this:

ptoolcomment    #Comment for tool
      tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
      if tool_info = 1 | tool_info = 3,
        sopen_prn, no_spc$, pstrtool, sdelimiter, *tnote, sdelimiter, *toffnote, sdelimiter, *tlngnote, sdelimiter, *tldia$, no_spc$, sclose_prn, e$
Link to comment
Share on other sites

OK, your instruction on the spaces issue worked perfectly.

 

Now for the pretract, here is what I'm getting now:

 

G03 X-.75 Y-2.25 I0. J-.5
G01 G40 Y-2.75
G00 Z2.                       <------I want M09 on this same line right after G00 Z2.
G91 G28 Z0
M01
T01 M06 (1/2 ENDMILL 3FLT AL | H01 | D01)
G00 G90 G54 X.5 Y-2.755 S1069 M03
G43 H01 Z2.
Z.1
G01 Z-.125 F4.8

 

here is a copy of the pretract section of my post:

 

pretract        #End of tool path, toolchange
      
      sav_absinc = absinc$
      absinc$ = one
      sav_coolant = coolant$
      coolant$ = zero
            

#      if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless
        [                 #  explicitely turned off through a canned text edit
        if all_cool_off,
          [
          #all coolant off with a single off code here
          if coolant_on, pbld, n$, sall_cool_off, e$
          coolant_on = zero
          ]
        else,
          [
          local_int = zero
          coolantx = zero
          while local_int < 20 & coolant_on > 0,
            [
            coolantx = and(2^local_int, coolant_on)
            local_int = local_int + one
            if coolantx > zero,
              [
              coolantx = local_int
              pbld, n$, scoolantx, e$
              ]
            coolantx = zero
            ]
          coolant_on = zero
          ]
        ]
       
      #cc_pos is reset in the toolchange here
      cc_pos$ = zero
      gcode$ = zero
      pbld, n$, sccomp, psub_end_mny, e$
      pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0", e$
      if nextop$ = 1003 | tlchg_home, pbld, n$, *sg28ref, "Y0.", protretinc, e$
      else, pbld, n$, protretinc, e$
      if (subactv = zero & use_g52_shft & wrkofs_num = zero) | shft_flg = one,
        [
        n$, *sg52, "X0. Y0. Z0.", e$ #Cancel Work Shift
        shft_flg = zero
        ]
      absinc$ = sav_absinc
      coolant$ = sav_coolant

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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.

Follow us

×
×
  • Create New...