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:

Tool entering from minus Z direction?


Scott Lent
 Share

Recommended Posts

I’ve been going crazy trying to figure out what’s happening here. Unfortunately, I work for a large defense contractor, so I cannot share my mcx without risking my job and jail time. I’ll describe the best I can…

 

I am creating a milling / drilling program for a mill with a rotary axis. I have 3 planes created in the plane manager, one for each rotary axis position used: A0, A90 and A180.

X0, Y0, and Z0 of each plane is at the center of rotation. I am performing both milling and drilling operations at each plane.

Everything is fine until I drill at A90, where the tool is mysteriously entering the work from the minus Z direction. This does not happen in the milling operation at the same plane. The top of my hole is supposed to start on a surface at Z-1.367 and is drilled .050 deep. What I end up with is the tool coming through the bottom of my fixture. Anybody have any ideas what I should be looking for?

 

Thanks,

Scott Lent

Link to comment
Share on other sites

Does that happen at the machine?

 Ive ran into that problem on simulation when programing a rotary, one time I was so sure that everything was right that I posted it and it was good at the machine, of course I went slow.  I dont know why it does it but Ive seen it a few times.

Link to comment
Share on other sites

I'be been playing around with the rotary axis settings in the MMD file and I'm posting A90 when I mill in that plane and A270 when I drill in it.

The fact that it runs right in verify with rotary axis control set to no rotation makes me wonder if a setting isn't right in the MMD.

 

I have to admit that up until now I've only needed a-axis positions at zero and 180 degrees. It almost appears that my a axis moves are incremental, ie 180 + 90 = 270

  • Like 1
Link to comment
Share on other sites

I'be been playing around with the rotary axis settings in the MMD file and I'm posting A90 when I mill in that plane and A270 when I drill in it.

The fact that it runs right in verify with rotary axis control set to no rotation makes me wonder if a setting isn't right in the MMD.

 

I have to admit that up until now I've only needed a-axis positions at zero and 180 degrees. It almost appears that my a axis moves are incremental, ie 180 + 90 = 270

 

Far as I know the MMD has nothing to do with Backplot. Backplot is not the final word. What does the code look like?

Link to comment
Share on other sites

CNC post has the correct A90 for the mill cuts operation on that plane, and A270 for the drill op on the same plane, which obviously isn't what it's intended to be.

Y coordinates that are supposed to be plus are minus, and visa versa. It's like I'm working from a phantom plane at 270 degrees.

Link to comment
Share on other sites

I'm with Gcode on the planes being bad.

 

Mastercam has always had issues with 4X rotation on a VMC, if you use the "default" planes. The X Axis is reversed on the Back and Bottom planes.

 

Do this:

 

Open the Planes Manager. Set Top to be your WCS, Tplane, and Cplane.

 

Now, copy "TOP". Rename the copy to "OP1 - WCS". Make a copy of that plane again. Rename that second copy "A0.".

 

Set "A0." to the active Tplane/Cplane. Then exit the Planes Manager.

 

Now, go to the Secondary Menu > Planes > Rotate Planes. Rotate about the X axis by 90 degrees, and save the plane as A90. Do this 2 more times. Rotate each time about the X axis, by 90 degrees.

 

That will give you a correct WCS, and four correct planes, all with the rotation about the X axis.

 

I never, ever, use the default planes for 4X work. Always start with a copy or created WCS. Then rotate that plane to create each rotary position you want to hit.

 

Oh, and unless you are trying for Polar or Axis Substitution, your option should always be set to "no rotation". The change in Tplane always triggers a rotary output from the post.

  • Like 3
Link to comment
Share on other sites

Interesting new twist...

 

I am now to the point where one of two holes drilled in this operation is at the correct A90 and the other is at A270.

Both of these holes are drilled from the same 'Top of Stock' and are drilled a depth of .050. Top of stock is at Z-1.367. Depth is at Z-1.417

 

This is what I get:

 

G00 G90 G80 G40 G20 G17 G94

(TOOLPLANE NAME - A-AXIS 90)

G15 H4

Z30.

IF [VTLCN EQ 4] NST1

T4 M06 (.2188 BALL ENDMILL, CG MAKE)

NST1

M08

G00 G17 G90 A90. X0. Y-.7495 S239 M03

G56 H4 Z-1.267

G94

G71 Z-1.267

G81 Z1.317 R-1.267 F.24 M54

Y.5625 Z-1.317 A270. R1.267

G80

M09

M05

G00 Z30.

G00 X-30. Y30.

G90

M30

 

 

 

This is the desired result:

 

G00 G90 G80 G40 G20 G17 G94

(TOOLPLANE NAME - A-AXIS 90)

G15 H4

Z30.

IF [VTLCN EQ 4] NST1

T4 M06 (.2188 BALL ENDMILL, CG MAKE)

NST1

M08

G00 G17 G90 A90. X0. Y.7495 S239 M03

G56 H4 Z-1.267

G94

G71 Z-1.267

G81 Z-1.417 R-1.267 F.24 M54

Y.5625

G80

M09

M05

G00 Z30.

G00 X-30. Y30.

G90

M30

Link to comment
Share on other sites

Interesting new twist...

 

I am now to the point where one of two holes drilled in this operation is at the correct A90 and the other is at A270.

Both of these holes are drilled from the same 'Top of Stock' and are drilled a depth of .050. Top of stock is at Z-1.367. Depth is at Z-1.417

 

This is what I get:

 

G00 G90 G80 G40 G20 G17 G94

(TOOLPLANE NAME - A-AXIS 90)

G15 H4

Z30.

IF [VTLCN EQ 4] NST1

T4 M06 (.2188 BALL ENDMILL, CG MAKE)

NST1

M08

G00 G17 G90 A90. X0. Y-.7495 S239 M03

G56 H4 Z-1.267

G94

G71 Z-1.267

G81 Z1.317 R-1.267 F.24 M54

Y.5625 Z-1.317 A270. R1.267

G80

M09

M05

G00 Z30.

G00 X-30. Y30.

G90

M30

 

 

 

This is the desired result:

 

G00 G90 G80 G40 G20 G17 G94

(TOOLPLANE NAME - A-AXIS 90)

G15 H4

Z30.

IF [VTLCN EQ 4] NST1

T4 M06 (.2188 BALL ENDMILL, CG MAKE)

NST1

M08

G00 G17 G90 A90. X0. Y.7495 S239 M03

G56 H4 Z-1.267

G94

G71 Z-1.267

G81 Z-1.417 R-1.267 F.24 M54

Y.5625

G80

M09

M05

G00 Z30.

G00 X-30. Y30.

G90

M30

 

Take your 1st operation and use transform rotate it 3 more time 90 degree apart using right plane as the rotation plane. If it comes out correct it s bad planes.

Link to comment
Share on other sites

In the drilling operation are you using entities and selecting a circle/arc? If you are try selecting the problem arc and hit F4 to bring up the properties. In the properties dialogue hit the "flip view" button in the very top right (its the button with the arrows pointing in either direction). I used to have this problem when programming for a mill/turn machine. The arcs have a z direction (best way I can explain it) and using the flip view button makes it drill in the correct direction.

Good luck!

  • Like 1
Link to comment
Share on other sites

Thank you all for your help, I am slowly getting to the bottom of this.

wdg5555 I will definitely remember that trick...

 

Colin, as a practice I do set up my planes in the manner in which you suggested, but I did go through and create new ones following your instructions to the letter. The result was the same.

 

I did however, notice you mentioned at the end that I should always leave the rotation option set to ‘no rotation’. That is news to me and I changed those settings accordingly, and that instantly solved the problem with the tool approaching from the wrong direction. Now everything runs correctly in verify.

 

But now I do have an issue with the way my post is positioning the a-axis. It now positions the A90 plane at A270, although the X, Y and Z coordinates are correct, unlike yesterday. I did try changing the rotary axis direction in the Machine Definition Manager but the results are the same.

 

I've been aware that my rotary axis rotates opposite of the standard clockwise direction. It's always been that way since day one and since we've always programmed by hand, it wasn't an issue before we got Mastercam. Most of the 4X programs I've done in Mastercam up to this point have been A0 and A180 indexes. Direction didn't really matter. I've read here on the forum that others with the same situation haven't had satisfactory results by changing the direction of the rotary axis in the Machine Definition either.

 

At this point, I am going to have the a-axis rotation direction looked into and corrected, whether it means changing a machine parameter or changing the way the a-axis is wired. I think I've been chasing my tail partially because of this.

 

Again, thank you all for your help.

  • Like 1
Link to comment
Share on other sites
I've been aware that my rotary axis rotates opposite of the standard clockwise direction. It's always been that way since day one and since we've always programmed by hand, it wasn't an issue before we got Mastercam. Most of the 4X programs I've done in Mastercam up to this point have been A0 and A180 indexes. Direction didn't really matter. I've read here on the forum that others with the same situation haven't had satisfactory results by changing the direction of the rotary axis in the Machine Definition either

 

machine Def Always work for me controlling the rotary direction with mpmaster.  just look for the CW or CCW selection in the rotary properties (rght mouse).

unless your Okuma post doesn't look in the machine def...

  • Like 1
Link to comment
Share on other sites

Silly question - you have only one WCS set yes?

WCS A0, with C&T A0.

Then for your index positions, in the plane manager you have WCS A0, but your C&T as A90.

Then WCS A0, C&T A270.

One WCS for rotary work, and then planes, planes, planes for your indexes???

 

Ref your rotary (on the machine) - is it physically going the wrong way when commanded on the machine? If this is the case, yes it's an easy parameter to change (talking fanuc).

The issue you may then have is for repeat/proven programs of course...

 

and yes, check your machine/control def to ensure the thing is set correctly.

  • Like 1
Link to comment
Share on other sites
newbeeee, on 14 Feb 2016 - 09:18 AM, said:

Silly question - you have only one WCS set yes?

WCS A0, with C&T A0.

Then for your index positions, in the plane manager you have WCS A0, but your C&T as A90.

Then WCS A0, C&T A270.

One WCS for rotary work, and then planes, planes, planes for your indexes???

 

Yes, only one WCS is set.

Yes, it physically moves to the wrong position on the machine. Machine Definition appears to correctly show the a-axis as it resides on the machine, on the right (+) end of the x-axis, with the faceplate facing the left side,, rotation is CCW

 

 

  • Like 1
Link to comment
Share on other sites

Thank you all for your help, I am slowly getting to the bottom of this.

wdg5555 I will definitely remember that trick...

 

Colin, as a practice I do set up my planes in the manner in which you suggested, but I did go through and create new ones following your instructions to the letter. The result was the same.

 

I did however, notice you mentioned at the end that I should always leave the rotation option set to ‘no rotation’. That is news to me and I changed those settings accordingly, and that instantly solved the problem with the tool approaching from the wrong direction. Now everything runs correctly in verify.

 

But now I do have an issue with the way my post is positioning the a-axis. It now positions the A90 plane at A270, although the X, Y and Z coordinates are correct, unlike yesterday. I did try changing the rotary axis direction in the Machine Definition Manager but the results are the same.

 

I've been aware that my rotary axis rotates opposite of the standard clockwise direction. It's always been that way since day one and since we've always programmed by hand, it wasn't an issue before we got Mastercam. Most of the 4X programs I've done in Mastercam up to this point have been A0 and A180 indexes. Direction didn't really matter. I've read here on the forum that others with the same situation haven't had satisfactory results by changing the direction of the rotary axis in the Machine Definition either.

 

At this point, I am going to have the a-axis rotation direction looked into and corrected, whether it means changing a machine parameter or changing the way the a-axis is wired. I think I've been chasing my tail partially because of this.

 

Again, thank you all for your help.

 

 

It's much easier to fix your post than to change the actual machine tool

Another reason to avoid changing the machine' rotation is it will invalidate your entire stable

of proven files.

Do you know how old you post is?

If it's an older post that's been upgraded year after year, it probably doesn't support machine definition

 

This is part of an old Okuma 4X post I have in my collection

 

# Rotary Axis Settings

# --------------------------------------------------------------------------

# Typical Vertical

srotary     : "A"     #Rotary axis prefix

vmc         : 1     #0 = Horizontal Machine, 1 = Vertical Mill

rot_on_x    : 1     #Default Rotary Axis Orientation, See ques. 164.

                    #0 = Off, 1 = About X, 2 = About Y, 3 = About Z

# Typical Horizontal

#srotary     "B"     #Rotary axis prefix

#vmc         : 0     #0 = Horizontal Machine, 1 = Vertical Mill

#rot_on_x    : 2     #Default Rotary Axis Orientation, See ques. 164.

#                    #0 = Off, 1 = About X, 2 = About Y, 3 = About Z

rot_ccw_pos : 0     #Axis signed dir, 0 = CW positive, 1 = CCW positive   <----------------------------   this line controls A axis rotation

index       : 0     #Use index positioning, 0 = Full Rotary, 1 = Index only

ctable      : 5     #Degrees for each index step with indexing spindle

one_rev     : 0     #Limit rotary indexing between 0 and 360? (0 = No, 1 = Yes)

lock_codes  : 1     #Use rotary axis unlock/lock M-Codes? (0 = No, 1 = Yes)

use_frinv   : 0     #Use Inverse Time Feedrates in 4 Axis, (0 = no, 1 = yes)

rot_feed    : 1     #Use calculated rotary feed values, (0 = no, 1 = yes)

maxfrdeg    : 2000  #Limit for feed in deg/min

maxfrinv    : 999.99#Limit for feed inverse time

frc_cinit   : 0     #Force C axis reset at toolchange

ctol        : 225   #Tolerance in deg. before rev flag changes

ixtol       : 0.001 #Tolerance in deg. for index error

frdegstp    : 10    #Step limit for rotary feed in deg/min

 

 

It may be a s simple as chaining a 1 to a 0

 

note be sure to make a back of your post before you start  editing 

  • Like 1
Link to comment
Share on other sites

gcode,

 

My post is about a year and a half old. I had it made for us for this machine when we purchased Mastercam.

 

I do development work so generally once a job is finished, I don't ever see it again. Physically correcting the direction of the a-axis rotation won't have a negative effect on past jobs.

 

I have also come to realize that part of the problem was the fact that I had my a-axis set to CCW in the Machine Definition Manager (representing the machine), but at the same time, I've been creating my planes in the direction that reflects the actual a-axis rotation of the machine, thus compensating twice and getting the incorrect results. I have my Machine Definition Manager set to CW now and the post is correct. Whether or not all of this contributed to the problem I was having originally with the tool approaching from the opposite direction, I don't know, but the fewer variables I have to deal with the next time this might happen, the better.

 

Thanks.

  • Like 1
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...