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 Logic


jolson6
 Share

Recommended Posts

I have created a custom drill cycle for using a gun drill. I am using pmisc2 or drillcyc #7. All is well with the cycle accept at tool change I want the spindle to always start with 500 RPM and within the cycle it will increase to the proper RPM, drill the hole and slow down to 500 RPM before leaving the hole. My question is how I can accomplish this? I have tried different logic statements like:

 

If drillcyc = 7, "M3 S500", e

 

But this is not working, and I want to know the proper way to express this. Any help is greatly appreciated.

Link to comment
Share on other sites

You are on the right track just depends where you put this logic in your post. If you put it in the spindle speed section of the post that might work but problay need to look in the toolchange and null toolchange part of the post and have it do soemthing like I did for a Fadal post here:

code:

ptlchg_com      #Tool change common blocks

pcom_moveb

c_mmlt #Multiple tool subprogram call

#ptoolcomment

if mi10 = 1, sg00, "M00", e

comment

pcan

if plane < 0, plane = 0

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

spaces=0

porient

if output_z = yes,

[

preadbuf5

if (opcode > 0 & opcode < 16) | opcode = 19,

[

n, pspc, "*", "MAX | ", *max_depth, e

n, pspc, "*", "MIN | ", *min_depth, e

]

]

spaces=sav_spc

pstock

pindex

pindexman

if mi7 = 1, "M46", e

sav_absinc = absinc

if wcstype > one, absinc = zero

if not(index) & rot_on_x & lock_codes = 1, pbld, n, *sunlock, "(UNLOCK)", e

if opcode = 3 & nextdc = 14,

[

pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout, strcantext, "M90", e

speedrt = speed + .2

pbld, n, *speedrt, "M5", e

pbld, n, "G84.2", e

!speed

]

else,

[

if rigid = 1 & opcode = 3 & nextdc = 3,

[

pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout, strcantext, e

speedrt = speed + .2

pbld, n, *speedrt, "M5", e

pbld, n, "G84.2", e

!speed

]

else,

[

pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfcout, *speed, *spindle, strcantext, e

]

]

if not(index) & rot_on_x & lock_codes = 1, pbld, n, *slock, "(LOCK)", e

tlngno = t

pbld, n, *tlngno, pfzout, *scoolant, next_tool, e

pbld, n, "G4 P500", e # Added to Allow a dwell everytime for Tool Change

pbld, n, "G8", e # Added for Acel/Decl on Machines

#sav_coolant = coolant

#if coolant = 1, sm09 = sm09_0

#if coolant = 2, sm09 = sm09_1

#if coolant = 3, sm09 = sm09_2

absinc = sav_absinc

pcom_movea

toolchng = zero

c_msng #Single tool subprogram call

last_op_id = op_id

last_cuttype = cuttype

This allows me to have the spindle and speed right for 2 different drilling cycles that tap. One is a compression tap and the other is regular rigid tap. I changed MPMASTER to do this.

 

HTH

Link to comment
Share on other sites

Tim, I have also done this in the past but want the drilling feed and speed inthe tool parameter page.

 

Bryan, I will go home to retrieve the Hass post from the ftp site, due to firewall limitations.

 

All Others, I will look into your recomendations.

 

Thank,s everyone, have a good Monday!

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