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:

Custom drill cycle for G10's


Jrygus
 Share

Recommended Posts

I am trying to modify Mpmasters custom drill cycles to create my G10 lines. I have most of it worked out except for my X,Y,Z, values. This is what i have so far

 

Two Variable defined

 

fmt L 1 lvalue #L value for G10 2 or 20, 2 for 54-59 and 20 for g54.1 p

fmt P 1 pvalue #P value for G10, 1-5 for G54-G59, and 1-> for g54. p

 

And my drill cycle looks like this

 

if drillcyc$ = 14,

[

lvalue = peck2$

pvalue = peck1$

 

"G0 G90 G10", *lvalue,*pvalue,*pfxout,*pfyout,*pfzout e$

]

 

What i need is the value of the pfxout, pfyout and pfzout to be the negative value of what they come out as. I have been trying to multiply them by -1 to change the sign, but i cannot seem to affect them, or set thier value to another variable. If anyone can help i would appreciate it.

Link to comment
Share on other sites
Guest CNC Apps Guy 1

I do it this way and I think it's a little more straightforward to handle;

 

code:

# THIS IN IN THE TOP OF THE POST NOTES SO WE KNOW WHAT'S UP WITH THE MISC. REALS...

# mr1 - G10 Work Offset X Value

# mr2 - G10 Work Offset Y Value

# mr3 - G10 Work Offset Z Value

# mr4 - G10 Work Offset B Value

 

 

#THIS SECTION GETS ADDED NEAR THE AXIS FORMATS SECTION TO KEEP THINGS CLEAN...

# ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

# Axis output formats - For G54.1 Px in Misc. Reals and shifts, etc...

# ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

fmt X 1 mr1 # X Axis Pos

fmt Y 1 mr2 # Y Axis Pos

fmt Z 1 mr3 # Z Axis Pos

fmt B 1 mr4 # B-axis rotation in degrees

 

 

#THIS SECTION GETS ADDED IN YOUR PHEADER SECTION WHEREVER YOU SEE FIT - USUALLY BEFORE PROGNO CALL

 

 

pheader # File header

!mr1

!mr2

!mr3

!mr4

"%", e$

 

#ADD THIS AFTER PROGRAM INFO

"(******************************)" e$

"G90 G10", pwcsp, *mr1, *mr2, *mr3, *mr4, e$

"(X ZERO IS )" e$

"(Y ZERO IS )" e$

"(Z ZERO IS )" e$

"(B ZERO IS )" e$

"(******************************)" e$

" " e$

 

#ADD THIS POSTBLOCK SECTION SOMEWHERE IT MAKES SENSE THOUGH NOT INSIDE ANOTHER POSTBLOCK

pwcsp #Out put "P" for G10 Line

if workofs < 6,

[

p_wcs = workofs + 1

"L2", *p_wcs

]

else,

[

p_wcs = workofs - five

"L20", *p_wcs

]

HTH

 

Then in your first operation in your part, you set up the values you want in there and you're off to the races.

 

HTH

Link to comment
Share on other sites
Guest CNC Apps Guy 1

code:

(******************************)

%

O1361 (210-1361-001 FIXTURE )

(PROGRAM-VERSION=1)

(PROGRAMMER=JOE788
:D
)

(RUN-TIME=00-00-00)

(CUTTING-TIME=00-00-00)

(AUX-TIME=00-00-04)

(SECURITY-CLASS=1)

(PROGRAM-TYPE=0)

(PROGRAM-CLASS=0)

(COMPANY - ACME WIDGETS)

(PRINT - 210-1361-001 FIXTURE )

(PROGRAM - O1361 )

(POST - *********.PST )

 

(******************************)

( G54.1 P2 )

G90 G10 L20 P2 X-15.9453 Y0. Z-13.4107 B135.

(X ZERO IS )

(Y ZERO IS )

(Z ZERO IS )

(B ZERO IS )

(******************************)

Like this ^^^

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Use this;

 

 

code:

fmt  P  4   p_wcs       #WCS P address

 

if drillcyc$ = 14,

[

"G0 G90 G10", pwcsp, *pfxout,*pfyout,*pfzout e$

]

 

 

#ADD THIS POSTBLOCK SECTION SOMEWHERE IT MAKES SENSE THOUGH NOT INSIDE ANOTHER POSTBLOCK

# ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

 

pwcs #G54+ coordinate setting at toolchange

if workofs < 6,

[

g_wcs = workofs + 54

*g_wcs

]

else,

[

p_wcs = workofs - five

"G54.1", *p_wcs

]

 

pwcsp #Out put "P" for G10 Line

if workofs < 6,

[

p_wcs = workofs + 1

"L2", *p_wcs

]

else,

[

p_wcs = workofs - five

"L20", *p_wcs

]

 

# ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

HTH

Link to comment
Share on other sites

Thanks Apps Guy for the help. What i ended up doing was a combination of things. I stole some of your logic to set the L and the P, and then i am using the Drill variables to get my X Y Z. So now my process will be, Create a point that represents the center of rotaion/common on machine. Then in my drill variables i right click and choose X/Y/Z coordinate for each drill variable and select the center of my rotation.

 

This is how my Post ended up

 

 

fmt L 4 lvalue #L value for G10 2 or 20, 2 for 54-59 and 20 for g54.1 p

fmt P 4 pvalue #p value for G10 1-5 for G54-G59, and 1-> for g54. p

fmt X 2 wsetxval #X value of center of rotation

fmt Y 2 wsetyval #Y value of center of rotation

fmt Z 2 wsetzval #Z value of center of rotation

 

 

 

if drillcyc$ = 14,

[

if workofs$ < 6,

[

lvalue = 2

pvalue = workofs$ + 1

]

else,

[

lvalue = 20

pvalue = workofs$ - 5

]

wsetxval = peckclr$ * -1.

wsetyval = retr$ * -1.

wsetzval = dwell$ * -1.

"G0 G90 G10", *lvalue,*pvalue,*wsetxval,*wsetyval,*wsetzval, e$

 

]

 

This is how the cycle looks in MC

 

g10.jpg

 

For now, the output has to be edited down to just the G10 lines, but it eliminates the creation of them manually. Thanks again for the help.

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