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:

Can variables be used in MC?


g-codeguy
 Share

Recommended Posts

I am making 5 washers per barstop. I had to assign a variable to each part as there is .002 size difference from the 1st part to the 5th part on the ID, and there is only .002 total tolerance. The OD isn't nearly as far off. I've always used variables, but the company wants to only use what MC outputs. We will be aligning the spindle (which should correct the problem), but for now I need to use the variables.

 

Is there a way to set the post up to assign variables? Here is what I have in the header.

 

 

#501 CONTROLS BORE 1ST PART

#502 CONTROLS BORE 2ND PART

#503 CONTROLS BORE 3RD PART

#504 CONTROLS BORE 4TH PART

#505 CONTROLS BORE 5TH PART

#511 CONTROLS OD 1ST PART

#512 CONTROLS OD 2ND PART

#513 CONTROLS OD 3RD PART

#514 CONTROLS OD 4TH PART

#515 CONTROLS OD 5TH PART

 

 

This is the part of my subprogram that uses the variables.

 

 

N200M91 (FINISH TURN)

T0202S1630M63

X1.76Z.03

G96S750

G1Z0F.008

X1.12F.0035

G0X1.67W.02

G1X[1.6871+#510]Z0F.002

G3U.0268W-.0056R.019

G1U.0164W-.0082

G3U.0112W-.0134R.019 (X1.7415)

G1Z-.1372F.003

G3U-.0051W-.0095R.019F.002

G1U-.0223W-.0193

X1.77F.008

M92

M1

 

N1200M91 (FINISH BORE)

T1212S2275M63

X1.26Z.5

Z.03

G1X[1.2614+#500]Z.01F.015

Z0F.002

G2U-.048W-.01R.034

G1U-.0164W-.0082

G2U-.02W-.024R.034 (X1.177)

G1Z-.19F.006

U-.02F.015S1300

M92

M1

 

N400M91 (BACK CHAMFER I.D.)

T0404S1300M63

X1.13Z.5

Z-.18

G1X1.15Z-.1919F.015

X[1.177+#500]F.003

G2U.0046W-.0057R.008F.001

G1U.023W-.0115

X1.13F.03S530

M92

M1

 

 

And the variables are set in the main program thusly.

 

 

N1#500=#501 (RUN 1ST PART)

#510=#511

G54M98P1582

M54 (PART COUNTER)

M1

 

N2#500=#502 (RUN 2ND PART)

#510=#512

G55M98P1582

M54 (PART COUNTER)

M1

 

N3#500=#503 (RUN 3RD PART)

#510=#513

G56M98P1582

M54 (PART COUNTER)

M1

 

N4#500=#504 (RUN 4TH PART)

#510=#514

G57M98P1582

M54 (PART COUNTER)

M1

 

N5#500=#505 (RUN 5TH PART)

#510=#515

G58M98P1582

/M54 (PART COUNTER)

/M99

M30

 

I know there are some MC gurus on this forum that are light years ahead of me. Has anyone modified a post for this kind of output? Thanks.

 

[ 06-30-2009, 02:40 PM: Message edited by: g-codeguy ]

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