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:

post help


Roger
 Share

Recommended Posts

I'm trying to modify the standard hass post to output code for tapping. The following is the code I get now.

 

( 8-32 TAP RH DIA. - .168 )

T15 M6

G0 G90 G54 X-1.049 Y0. S500 M3

G43 H15 Z.25

M8

G99 G84 Z-.81 R.25 E32. S500 ,R1

X1.049 F15.625

G80

M5

Z.25

G91 G28 Z0. M9

G91 G28 Y0.

M30

%

-------------------------------------------------

Would like it to read the following.

 

( 8-32 TAP RH DIA. - .168 )

T15 M6

G0 G90 G54 X-1.049 Y0.

G43 H15 Z.25

M8

G99 G84 Z-.81 R.25 E32. S500 ,R1

X1.049

G80

M5

Z.25

G91 G28 Z0. M9

G91 G28 Y0.

M30

%

 

Don't need the S500 M3 or the F15.625

 

Thanks to those who respond. Roger

Link to comment
Share on other sites

On the ptap2 section in the post just take out the feed variable and all will be good.

 

Edit below:

 

Edit you ptap_2$ probably looks like this:

 

code:

ptap_2$          #Canned Tap Cycle

pdrill_2$

And that takes you here:

 

code:

pdrill_2$        #Canned Drill Cycle, additional points

pdrlcommonb

pcan1, pbld, n$, pxout, pyout, pzout, pcout, prdrlout, feed, strcantext, e$

pcom_movea

So if you take the feed out of here it will effect all other drill cycles. If this is not a problem then good, If this is a problem then I would copy that into the ptap_2$ section like so:

 

code:

ptap_2$          #Canned Tap Cycle

pdrlcommonb

pcan1, pbld, n$, pxout, pyout, pzout, pcout, prdrlout, strcantext, e$

pcom_movea

but without the feed in it. This will give you tapping cycles with feed rates only on the 1st section and all other drilling cycles like they were.

 

As always folks back up your post before making any changes I am not responsible if I give you information or you do something that causes you problems.

 

HTH

Link to comment
Share on other sites

To eliminate the spindle startup "in certain situations" such as this...

 

You need to check for the situation (in the psof & ptlchg postblocks) where the opcode$ = 3

(means a 'drilling' type operation is being processed) and you also need to check nextdc$ = 7 for which cycle is being processed.

 

NOTE!

In your case you may not be checking for "= 7"

It 'depends' on which cycle# the tapping tapping cycle is in your PST.

The "std" tapping cycle is #3 and if the PST also has a rigid tapping, that's usually #7.

 

The Hass post I'm referencing has both tapping & rigid tapping.

So of course which you are using will determine the # being checked for in nextdc$ = #

It's real easy to determine what '#' needs to be...

Just add a temporary "print me" diagnostic into your PST and post a tapping cycle.

 

Generic Hass 4X Mill.pst - Current

code:

psof$            #Start of file for non-zero tool number             

prv_tloffno$ = c9k

 

...<snipped>...

 

pindex

if mi1$ > one, absinc$ = zero

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout,

*speed, *spindle, pgear, strcantext, e$

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

pbld, n$, scoolant, e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

 

 

ptlchg$ #Tool change

pcuttype

 

...<snipped>...

 

pbld, n$, *t$, sm06, e$

pindex

sav_absinc = absinc$

if mi1$ > one, absinc$ = zero

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout,

*speed, *spindle, pgear, strcantext, e$

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

pbld, n$, scoolant,e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

Generic Hass 4X Mill.pst - Revised

code:

psof$            #Start of file for non-zero tool number             

prv_tloffno$ = c9k

 

...<snipped>...

 

pindex

if mi1$ > one, absinc$ = zero

"nextdc$ + ", ~nextdc$, e$ # TEMP - DIAGNOSTIC

# Note change in next (2 line) postblock ->

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout,

[if not(opcode$ = 3) | not(nextdc$ = 7), *speed, *spindle], pgear, strcantext, e$

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

pbld, n$, scoolant, e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

 

 

ptlchg$ #Tool change

pcuttype

 

...<snipped>...

 

pbld, n$, *t$, sm06, e$

pindex

sav_absinc = absinc$

if mi1$ > one, absinc$ = zero

"nextdc$ + ", ~nextdc$, e$ # TEMP - DIAGNOSTIC

# Note change in next (2 line) postblock ->

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout,

[if not(opcode$ = 3) | not(nextdc$ = 7), *speed, *spindle], pgear, strcantext, e$

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

pbld, n$, scoolant,e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

*Of course always make a backup of your PST before making any changes and closely check the NC code it produces after you're made any changes to a PST!

Link to comment
Share on other sites

Thanks, guys, BUT I need it simplified..Here are those lines in my current post. Is there a way you can highlight what needs changed?

 

psof0$ #Start of file for tool zero

psof$

 

psof$ #Start of file for non-zero tool number

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

"%", e$

*progno$, e$

"(PROGRAM - ", sprogname$,")", e$

"(DATE=D-M-Y - ", date$, " TIME:", time$, ")", e$

pbld, n$, *smetric, e$

pbld, n$, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e$

sav_absinc = absinc$

if mi1$ <= one, #Work coordinate system

[

absinc$ = one

pfbld, n$, sgabsinc, *sg28ref, "Z0.", e$

pfbld, n$, *sg28ref, "X0.", "Y0.", e$

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

absinc$ = sav_absinc

]

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

pbld, "N", e$

ptoolcomment

comment$

pcan

if stagetool >= zero, pbld, n$, *t$, "M6", e$

pindex

if mi1$ > one, absinc$ = zero

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,

pfcout, *speed, *spindle, pgear, strcantext, e$

pbld, n$, "G43", *tlngno$, pfzout, next_tool$, e$

pbld, n$, scoolant,e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

 

ptlchg0$ #Call from NCI null tool change (tool number repeats)

pcuttype

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

comment$

pcan

pbld, n$, sgplane, e$

pspindchng

pbld, n$, scoolant, e$

if mi1$ > one & workofs$ <> prv_workofs$,

[

sav_absinc = absinc$

absinc$ = zero

pbld, n$, sgabsinc, pwcs, pfxout, pfyout, pfzout, pfcout, e$

pe_inc_calc

ps_inc_calc

absinc$ = sav_absinc

]

if cuttype = zero, ppos_cax_lin

if gcode$ = one, plinout

else, prapidout

pcom_movea

c_msng$ #Single tool subprogram call

 

ptlchg$ #Tool change

pcuttype

toolchng = one

if mi1$ = one, #Work coordinate system

[

pfbld, n$, *sg28ref, "X0.", "Y0.", e$

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

]

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

pbld, n$, "M01", e$

pbld, "N", e$

ptoolcomment

comment$

pcan

pbld, n$, *t$, "M6", e$

pindex

sav_absinc = absinc$

if mi1$ > one, absinc$ = zero

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,

pfcout, *speed, *spindle, pgear, strcantext, e$

pbld, n$, "G43", *tlngno$, pfzout, next_tool$, e$

pbld, n$, scoolant,e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

Link to comment
Share on other sites

for psof$ section:

...

if mi1$ > one, absinc$ = zero

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,

pfcout, [if not(nextdc$ = 7), *speed, *spindle], pgear, strcantext, e$

pbld, n$, "G43", *tlngno$, pfzout, next_tool$, e$

pbld, n$, scoolant,e$

...

 

The nextdc$ = 7 might need to be a 3

 

Same for ptlchg$ section

 

What does your ptap$ and pmisc2$ sections look like?

Link to comment
Share on other sites

Steve, here is the section on ptap

 

ptap$ #Canned Tap Cycle

pdrlcommonb

if use_rigid = 1, result = newfs(12, feed)

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

prdrlout, strcantext, n_tap_thds$, *speed,",R1" e$

pcom_movea

 

pbore1$ #Canned Bore #1 Cycle

pdrlcommonb

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

prdrlout, dwell$, *feed, strcantext, e$

pcom_movea

 

pbore2$ #Canned Bore #2 Cycle

pdrlcommonb

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

prdrlout, *feed, strcantext, e$

pcom_movea

 

pmisc1$ #Canned Misc #1 Cycle

pdrlcommonb

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

prdrlout, shftdrl$, dwell$, *feed, strcantext, e$

pcom_movea

 

pmisc2$ #Canned Misc #2 Cycle (User Option)

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