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:

Adding g8 to fadal format1 post


ATG
 Share

Recommended Posts

Seth,

 

We hard coded a G8 in the post at psof and ptlchg. Then on drilling, tapping, and boring cycles, we hard coded a G9. You end up with a G9 that cancels a G8 from a few lines prior (messy code), but it works. redface.gif

 

There's another way, but I can only give you limited guidance on how to do it since I'm not a post expert. When we tap, we don't want the spindle to turn on. Our post is configured to check the tool type and based on that (is it a tap, or not?) execute a certain line of code. You could use the same logic...anything other than a milling tool (reamer, drill, tap, boring bar, etc), then output a certain line of code (don't output G8). The problem is, I don't know the specifics behind the tool types. What tool type is what? Here is the code we used for tapping. You'll have to relate the logic to your situation. This will be in the tool change section of your post.

 

code:

if tool_typ$ > 3 & tool_typ$ < 6, n$, psg00, *xr$, *yr$, *rpm, !ss$, ptool_next, e$# output for tapping

else n$, psg00, *xr$, *yr$, *rpm, !ss$, *spdlon, ptool_next, e$# 1st position

In the above example, it looks like taps (right and left hand) are tool types 4 and 5, because if they are, there's no output for spindle on.

 

Do you see how this could be adapted to your situation?

 

I wish I could be of more help.

 

Thad

Link to comment
Share on other sites

Here's a snippet of our psof

 

code:

      !spaces

spaces = zero

n, "(CREATED ON ", *month, "-", *day, "-", *year, " AT ", ptime, " )", e

spaces = prv_spaces

 

#pbld, n, *smetric, e

pbld, n, *sgcode, *sgplane, "G40", "G80", "G90", "H0", "E0", "Z0", e

sav_absinc = absinc

n,"G8", e <-------------Add here

if wcs_mode = zero | wcs_mode = one, # 'G92' output modes w/ 'G28' retracts

[

pbld, n, "G28", "Z0.", e

pbld, n, "G28", "X0.", "Y0."

if rot_on_x > zero, "A0."

e # end this block

pfbld, n, "G92", *xh, *yh, *zh, e

]

pcom_moveb

c_mmlt #Multiple tool subprogram call

ptoolcomment

comment

Then each drilling/boring/tapping cycle gets a G9 (we also added positive approach; M46) like the example below.

 

code:

pdrill          #Canned Drill Cycle - G81/G82

pdrlcommonb

n, "M7", e

n, "G9", "M46", e <------Added here

pcan1, pbld, n, *sgdrill, *sgdrlref, pxout, pyout, pfzout, pcout,

prdrlout, dwell, *feed, strcantext, e

pcom_movea

It's not exactly clean, but it works.

 

Thad

Link to comment
Share on other sites
  • 8 years later...

Sorry to resurrect a super old post, but I found a slightly different way of handling this that worked really well for me and figured id post for posterity. I set up the G8 / G9 as a type of coolant in one of the unused slots. Now when I want G8 on a program I just go to coolant, and select "G8" on, and "Before". It turns G8 on for that operation and goes back to G9 at the end of the operation. This protects your drilling cycles as was a concern above..

In the post I altered the following lines

scool64 : "G8"    		#Coolant 8 on value
scool65 : "G9"			#Coolant 8 off value

and in Mastercam i go into Machine definition > General Machine Parameters > Coolant Commands and make sure both check boxes are NOT checked.

 

  • Like 1
Link to comment
Share on other sites

 

      if (opcode$ = three),
      pcan1, pbld, n$, *sgcode, *sgabsinc, "G9", pwcs, pfxout, pfyout,
        *speed, *spindle, pgear, strcantext, e$
      else,
      pcan1, pbld, n$, *sgcode, *sgabsinc, "G8", pwcs, pfxout, pfyout,
        *speed, *spindle, pgear, strcantext, e$

 

is how I do it.

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...