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:

MPMaster post - z clearance on index moves?


neurosis
 Share

Recommended Posts

Not sure if this is the right place to ask this question or if it should be asked in the post forum.

 

I notice that when you are drilling holes using MPMaster on a rotary axis, if you check "use clearance only at the start and end of an operation" and are drilling a single hole on a particular face, it will not move to the z clearance plane before indexing to the next location.

 

Here is a sample of the code.

 

 

%
O0000 (Z CLEAR TEST OP1)
(PROGRAM - Z CLEAR TEST OP1.NC)
(DATE	 - JAN-06-2014)
(TIME	 - 4:42 AM)
(T1 - 1/4 SPOTDRILL	 - H1 - D1 - D0.2500")
G00 G17 G20 G40 G80 G90
G91 G28 Z0.
N1 T1 M06 ( 1/4 SPOTDRILL)
G00 G17 G90 G54 A0. X-1.5 Y0. S1069 M03
G43 H1 Z3.
G94
G99 G81 Z1.4 R1.6 F1.07
G80
M08
A-90. X-2.25 Y0. <---- indexes
Z3.    <---- then moves to clearance
Z1.6
G99 G81 Z1.4 R1.6 F1.07
X-.75
G80
Z3.		  <------ when drilling two or more holes, it will move to the clearance prior to the index
A-180. X-1.5 Y0.
Z3.
G99 G81 Z1.4 R1.6 F1.07
G80
A-270. X-2.25 Y0.
Z3.
Z1.6
G99 G81 Z1.4 R1.6 F1.07
X-.75
G80
Z3.
M05
G91 G28 Z0.
G28 Y0. A0.
G90
M30
%

 

 

This is with the latest MPMaster post downloaded this morning.

 

Checking "use safe index" does not make a difference.

 

 

I am wondering what would be the easiest way to fix this, short of just not checking "use clearance only at the start and end of an operation" which still does not output the clearance z move but allows a retract to clearance plane before the index. ( I should say change rather than fix as this is more of a safety feature than a fix )

Link to comment
Share on other sites
I am wondering what would be the easiest way to fix this, short of just not checking "use clearance only at the start and end of an operation" which still does not output the clearance z move but allows a retract to clearance plane before the index. ( I should say change rather than fix as this is more of a safety feature than a fix )

 

I don't use the clearance setting in the linking parameters, I use the reference positions.

Link to comment
Share on other sites

You are not using "use clearance only at the start and end of the operation".

 

I am drilling a whole bunch of holes on different angled faces of a part. There are 20 holes on some faces and only 1 hole on others. I dont want to have to retract to the clearance plane (6" to clear for the indexes" between each hole on a face. It wastes too much time.

 

Here is a sample file but it is easy to see the difference in the code that I posted above.

 

It is a stock - unedited version of MPmaster.

Link to comment
Share on other sites

With your sample file, mine sends it home before each toolpath.

I will play more tomorrow.

 

%
O0000 (Z CLEAR TEST OP1)
(MCX FILE  - C:\USERS\KGOODRICH\DOWNLOADS\Z CLEAR TEST.MCX-7)
(PROGRAM   - Z CLEAR TEST OP1.NC)
(DATE      - JAN-07-2014)
(TIME      - 4:58 PM)
(T1   -  1/4 SPOTDRILL       - H1   - D1   - D0.2500")
( ---------- )
( z_min$ 1.4 )
G00 G17 G20 G40 G80 G90
G91 G28 Z0.
T1 M06 ( 1/4 SPOTDRILL)
(MAX - Z3.)
(MIN - Z1.4)
G00 G17 G90 G54 A0. X-1.5 Y0. S1069 M03
G43 H1 Z3.
G94
G99 G81 Z1.4 R1.6 F1.07
G80
G91 G28 Z0. M08
M09
G00 G90 A-90. X-2.25 Y0.
G43 H1 Z3.
Z1.6
G99 G81 Z1.4 R1.6 F1.07
X-.75
G80
Z3.
G91 G28 Z0.
G00 G90 A-180. X-1.5 Y0.
G43 H1 Z3.
G99 G81 Z1.4 R1.6 F1.07
G80
G91 G28 Z0.
G00 G90 A-270. X-2.25 Y0.
G43 H1 Z3.
Z1.6
G99 G81 Z1.4 R1.6 F1.07
X-.75
G80
Z3.
M05
G91 G28 Z0.
G28 Y0. A0.
G90
M30
%

Link to comment
Share on other sites

I get the same, did you send anything to in-house about it? That should not be....

 

 

I havent. I figured that they would see it here on their forum. ;)

 

 

It is very strange that it moves to the clearance plane "after" the index.

 

 

I am ok at post editing but this falls outside of my very small bag of tricks when it comes to post logic.

 

 

I wanted to take the entry course on post editing but work around their schedule. I was hoping for a video version of the class to be taken at my leisure but I havent heard anything about that happening. :(

Link to comment
Share on other sites

Go to line 1926:

Should say pindex

add this line pbld, n$, pfzout, e$ just before the pindex call.

 

Old:

sav_absinc = absinc$

absinc$ = zero

pindex

if retractflg,

 

 

New:

sav_absinc = absinc$

absinc$ = zero

pbld, n$, pfzout, e$

pindex

if retractflg,

 

 

That will give you the retract to Z3 in your example.

 

I would not call this isue a Bug as you have turned off the ret_on_indx function, that is on by default and is safe.

Also you disabled the clearance in your toolpath.

 

 

Allan

Link to comment
Share on other sites

Go to line 1926:

Should say pindex

add this line pbld, n$, pfzout, e$ just before the pindex call.

 

Old:

sav_absinc = absinc$

absinc$ = zero

pindex

if retractflg,

 

 

New:

sav_absinc = absinc$

absinc$ = zero

pbld, n$, pfzout, e$

pindex

if retractflg,

 

 

That will give you the retract to Z3 in your example.

 

I would not call this isue a Bug as you have turned off the ret_on_indx function, that is on by default and is safe.

Also you disabled the clearance in your toolpath.

 

 

Allan

 

Agreed.

I have this on a few of my multi-axis post for safety. It bugs the crap out of the setup guys/operators that it safety clears before each rotation, but it beats crashing the machine because I fat ginger a clearance height when making the toolpath in MC.

Link to comment
Share on other sites

As Allan mentioned, the ret_on_indx function is used to control full retracts in between different index positions. You can set this value to 0 and all home position moves (G91 G28 Z0) between different planes will removed, so use with caution (ensure your clearance planes are setup correctly).

 

Regarding the issue with the Z value not being output after the first operation, this is actually related to the number of points that are selected in the drilling cycle. When a single point is programmed mastercam is not outputting the rapid move after the cycle is cancelled. If you uncheck the use clearance only at start/end operation, you will get a G98 output referencing the initial Z position.

 

Another fix is to output the Z-axis retract after the G80 line. Since the issue is based on the number of points you would need to pull that information into the post:

pparameter$
		 if prmcode$ = 15083, num_pts = rpar(sparameter$,1)

 

Then you would need to output the motion in pcanceldc$:

pcanceldc$	   #Cancel canned drill cycle
  result = newfs (three, zinc)
  if drillref = 0, zabs = initht_a			   #Make the initht the modal Z value
  else, zabs = refht_a
  prv_zia = zabs
  !zabs
  ps_inc_calc
  prv_gcode$ = zero
  if cool_zmove = yes$ & (nextop$=1003 | (nextop$=1011 & t$<>abs(nexttool))), coolant$ = zero
  pcan
  if drillcyc$ <> 8, pcan1, pbld, n$, "G80", scoolant, strcantext, e$
  if num_pts = 1 & zabs <> initht_a,  <-- Add this statement and code below in brackets
    [
    gcode$ = 0
    zabs = initht_a
    pbld, n$, sgcode, pfzout, e$
    ]
  pbld, n$, sgfeed, e$
  pcan2

Link to comment
Share on other sites

Wow! Amazing feed back guys!

 

@Allan Like I stated in my earlier post. I dont consider this to be a flaw in the post as it can be easily bypassed by turning the clearance plane on in the operation. It was a bit confusing because if you select more than a single hole it would output the clearance plane before the index as expected.

 

Im going to play with this tomorrow. If it works I will be adding it to all of my posts.

 

The only machine that I use the ret_on_indx function is our Horizontal. Vertical index jobs, it seems unnecessary if the clearance is set correctly.

 

Thanks!

Link to comment
Share on other sites

@chris

 

That seems to work but it gives errors during posting.

 

 

09 Jan 2014 06:28:02 AM - <2> - RUN TIME - PST(2939), NCI(100) - The math calculation/formula has an error
09 Jan 2014 06:28:02 AM - <2> - RUN TIME - PST(2939), NCI(166) - The math calculation/formula has an error
09 Jan 2014 06:28:02 AM - <2> - RUN TIME - PST(2939), NCI(230) - The math calculation/formula has an error
09 Jan 2014 06:28:02 AM - <2> - RUN TIME - PST(2939), NCI(296) - The math calculation/formula has an error
09 Jan 2014 06:28:02 AM - <2> - Successful completion of posting process!

 

 

%
O0000 (Z CLEAR TEST OP1)
(DATE	  - JAN-09-2014)
(TIME	  - 6:33 AM)
(T1   -  1/4 SPOTDRILL	   - H1   - D1   - D0.2500")
G00 G17 G20 G40 G80 G90
G91 G28 Z0.
T1 M06 ( 1/4 SPOTDRILL)
(MAX - Z3.)
(MIN - Z1.4)
G00 G17 G90 G54 A0. X-1.5 Y0. S1069 M03
G43 H1 Z3.
G94
G99 G81 Z1.4 R1.6 F1.07
G80
Z3.
M08
A-90. X-2.25 Y0.
Z3.
Z1.6
G99 G81 Z1.4 R1.6 F1.07
X-.75
G80
Z1.6
Z3.
M09
A-180. X-1.5 Y0.
Z3.
G99 G81 Z1.4 R1.6 F1.07
G80
Z3.
A-270. X-2.25 Y0.
Z3.
Z1.6
G99 G81 Z1.4 R1.6 F1.07
X-.75
G80
Z1.6
Z3.
M05
G91 G28 Z0.
G28 Y0. A0.
G90
M30
%


 

 

 

 

 

2938	 if drillcyc$ <> 8, pcan1, pbld, n$, "G80", scoolant, strcantext, e$
2939 if num_pts = 1 & zabs <> initht_a,	
2940 [
2941 gcode$ = 0
2942 zabs = initht_a
2943 pbld, n$, sgcode, pfzout, e$
2944 ]
2945	 pbld, n$, sgfeed, e$
2946	 pcan2

Link to comment
Share on other sites

Ah, I forgot that you will need to define num_pts as a variable somewhere near the top of the post where other variables are declared:

num_pts : 0

 

Also, ensure that you have spacing before the lines you've added (but not the num_pts variable declaration above). I believe you may have a single space, but you should try to keep the if statement inline with the rest of the post block.

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