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 mod: M21 Indexer code output


P_Scott
 Share

Recommended Posts

Hey All,

 

Any post gurus out there who can help me out? I have a post that I'm attempting to modify to output the M21 code when changing tool planes for a Hardinge Indexer head. The post is based from the MpMaster for a Mori-Seiki 3-axis machine. The Hardinge allows us to perform some simple 4th axis indexing on the 3-axis. The M21 code output works perfectly if I just alter a couple of rotary settings at the top of the Generic 4AX post. The problem I'm having is the MpMaster post will output the M21 and the "A" angle in the same line of code. This is not just redundant but won't work as the Hardinge is a operator programable indexer. It won't accept the "A" output. I can't shut off the "A" however because that's more easily set in the post of where to output the M21. Especially if the A-axis output in the MMD has been "locked down" to index only. Look at the samples of code below. The first is what I am getting now from the post that I want to modify. The second is produced from the Generic 4AX post and is what I want the code to look like. TIA cheers.gif

 

bad code:

G00 Z5.

(180 DEGREES - SIDE 3)

M21 A180

X3.0635 Y0. Z5.

and later in same file:

M01

(0 DEGREES - SIDE 1)

M21

(INDEXER ROTATE)

N3 T2

M6

(MAX - Z5.)

(MIN - Z1.394)

G54

M21 A0

G00 G90

 

good code:

G0 Z5.

( 180 DEGREES - SIDE 3 )

M21 ( INDEXER ANGLE -180. )

X3.0635 Y0.

Z1.75

 

If anyone can point me in the right direction, I would be very grateful. For now, I'm using the Misc Int to produce the "M21" where I want it but that requires turning it on it in the toolpath before the one where I actually want it. It doesn't work all the time either. frown.gif

cheers.gif

Link to comment
Share on other sites

Crazy^Millman,

 

Thanks for the suggestion. I should've thought of that. "D'Oh!!"

banghead.gif

I tracked it down to a postblock labeled "pindex". There's a variable in the Boolean statement named "indx_out". This is right after a string sel table command. If I move the "indx_out" to the next line, all I get for output is the "A xxx" index angle. If I place the "indx_out" in parentheses (sp?) it produces nothing for index code, not even the M21 or M22. If I put the variable in "" and (), so it looks like this: "(indx_out)", e$ , the output then has an M21 & M22 on every other line with the (indx_out) right after each M21 or M22. I know the "indx_out" variable is the key to what I want to happen, I just don't know the syntax to use or maybe it requires some extra logic in that postblock to get the desired output. Thanks anyway Ron for getting me moving in the right direction.

 

Great read BTW on the fundamentals of good setups article.

 

cheers.gif

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