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:

CUTTER COMP ISSUE WITH TRANSFORMED TOOLPATHS


Recommended Posts

Hello everyone,
   I've been pulling my hair for the CUTTER COMP issue when I use TRANSFORMED TOOLPATHS.  It works fine without transform toolpaths with cutter comp.  Don't know what codes really jammed up the cutter comp.  Can you guys let me know what should I do with the codes?

 

 

PS: I am using HAAS

 

Thank you...

1180896432_CUTTERCOMP.thumb.jpg.29f90224add2d4aea9e5164ae37821e9.jpg

Link to comment
Share on other sites
1 hour ago, Ben Wood said:

The error message says you can't use block delete with cutter comp.   Does the code that works without the transform also have a / at the beginning of each line?

Hi Ben,
   Thank you for the reply and I know that the new HAAS does not like "/" whenever I use cutter comp.  I often use "/" whenever I transform the toolpaths so I can SKIP the rest and just setup the first piece for FAI (First Artical Inspection).    I think Haas has a bug, do you think?

 

 

Thank you for your time to help me out.

Link to comment
Share on other sites
4 hours ago, PcRobotic said:

 

Can you give me an example of the code so I can better understanding your point of view?

 

Thank you.

IF [#149EQ1]GOTO1

TRANSFORMED CODE

BLAH

BLAH

N1 (END OF TRANSFORMED CODE)

 

If #149 equals one then all code will be skipped until you reach block number one (N1). If #149 does not equal one then the transformed code will be read.

 

Edit: this will work for Fanuc and ARUMATIK (Kitamura). I would assume that Haas will also support this but I have no experience with them.

Link to comment
Share on other sites
6 hours ago, PcRobotic said:

I contacted SELWAY and they are not willing to work on the "/" when we are having G41 or G42.  I guess I have to work around with my post.

Hi Steven,

There is nothing that Selway can do for an alarm message, generated by an option that Haas does not allow on their Control. How would you expect that we could do anything to fix something that isn't broken? You should contact Haas if you feel they should modify their control to accommodate you.

Why on earth would you want to skip the G41 line? I cannot think of a valid reason why you would want to be able to run cutter compensation with Block Delete active. This just seems like a poor programming practice, and a recipe for disaster.

Using Block Delete skips the entire line of code, not just the G41 or G42 at the beginning of the line.

If you need Cutter Compensation during your "setup", then there is absolutely no reason you should be skipping that line "when running production". The path should either allow G41/G42 to be active,  or the path should run centerline of cutter with no Comp value.

I have never, not once, needed to have the ability to apply cutter comp on a setup part, but not needed the Comp when running production. 

I have no doubt you'll hack up your Post to eventually bend the output to your will. But I very much question the validity of what you are attempting. 

  • Like 1
Link to comment
Share on other sites
On 10/11/2019 at 9:38 PM, Colin Gilchrist said:

Hi Steven,

There is nothing that Selway can do for an alarm message, generated by an option that Haas does not allow on their Control. How would you expect that we could do anything to fix something that isn't broken? You should contact Haas if you feel they should modify their control to accommodate you.

Why on earth would you want to skip the G41 line? I cannot think of a valid reason why you would want to be able to run cutter compensation with Block Delete active. This just seems like a poor programming practice, and a recipe for disaster.

Using Block Delete skips the entire line of code, not just the G41 or G42 at the beginning of the line.

If you need Cutter Compensation during your "setup", then there is absolutely no reason you should be skipping that line "when running production". The path should either allow G41/G42 to be active,  or the path should run centerline of cutter with no Comp value.

I have never, not once, needed to have the ability to apply cutter comp on a setup part, but not needed the Comp when running production. 

I have no doubt you'll hack up your Post to eventually bend the output to your will. But I very much question the validity of what you are attempting. 

 

Colin,
   How do you explain that FANUC control works fine on the code but not HAAS?  Selway has nothing to do with it, I know but at least they should find out about it since we just got a 2 years parts and labor warranty.  I also tested on MITSUBISHI control and it worked as well.

 The reason I need the "/" because I only want to setup on the first piece for FAI, at that time I will have to turn on BLOCK DELETE.  Once FAI passed, I will turn off the BLOCK DELETE and it will run the rest of the parts (about 8 parts).  When I turn off the BLOCK DELETE, the G41 didn't work when I have "/" as you already saw the image above.

I know you are such a good CNC program, perhaps you don't spend nearly 4 hours a day to setup the machine this kind of error we have to find the way to make our own parts with this control.

 

Thanks for the comment.

Link to comment
Share on other sites
On 10/11/2019 at 9:38 PM, Colin Gilchrist said:

Hi Steven,

There is nothing that Selway can do for an alarm message, generated by an option that Haas does not allow on their Control. How would you expect that we could do anything to fix something that isn't broken? You should contact Haas if you feel they should modify their control to accommodate you.

Why on earth would you want to skip the G41 line? I cannot think of a valid reason why you would want to be able to run cutter compensation with Block Delete active. This just seems like a poor programming practice, and a recipe for disaster.

Using Block Delete skips the entire line of code, not just the G41 or G42 at the beginning of the line.

If you need Cutter Compensation during your "setup", then there is absolutely no reason you should be skipping that line "when running production". The path should either allow G41/G42 to be active,  or the path should run centerline of cutter with no Comp value.

I have never, not once, needed to have the ability to apply cutter comp on a setup part, but not needed the Comp when running production. 

I have no doubt you'll hack up your Post to eventually bend the output to your will. But I very much question the validity of what you are attempting. 

 

Hello Colin,
   After nearly a week of research how HAAS "/", BLOCK DELETE would work other than FANUC.  This is what I found, M97 PXXX (Program number).  M97 is LOCAL SUB PROGRAM as I read at the...  " https://www.cnczone.com/forums/haas-mills/41301-block-skip-function.html ", here are the codes.  Not sure how to make my MasterCam work with LOCAL SUBPROGRAM when I am using TRANSFORM toolpaths.  Do you have any recommendations?

 

==============================

 %
O1234 (SAMPLE)
(MASTERCAM - X2 MR1)
(T1 1/2 FLAT ENDMILL)
G00 G17 G20 G40 G80 G90
(CUT OD)
T1 M06 (1/2 FLAT ENDMILL)
G00 G90 G54 X-1.425 Y-.025 S3500 M03
G43 H1 Z.1
M08
/M97 P20 (TURN BLOCK SKIP ON TO SKIP THIS LINE) ======> if this line is skip, all below will skip. This is nice.
G01 Z-.25 F50.
G41 D1 Y-.175 F32.
G03 X-1.25 Y0. I0. J.175
G01 Y.875
G02 X-.875 Y1.25 I.375 J0.
G01 X.875
G02 X1.25 Y.875 I0. J-.375
G01 Y-.875
G02 X.875 Y-1.25 I-.375 J0.
G01 X-.875
G02 X-1.25 Y-.875 I0. J.375
G01 Y0.
Y.02
G03 X-1.425 Y.195 I-.175 J0.
G01 G40 Y.045
G00 Z.1
(CIRCLE MILL BORE)
N20 X0. Y0.
G01 Z-.25 F15.
Y.0993 F25.
G41 D1 X.0993
G03 X0. Y.1987 I-.0993 J0.
Y-.1987 I0. J-.1987
Y.1987 I0. J.1987
X-.0993 Y.0993 I0. J-.0993
G01 G40 X0.
Y0.
G0 Z.1 M09
M05
G91 G00 G28 Z0.
G28 Y0.
G90
T1 M06
M30
%

Link to comment
Share on other sites
13 hours ago, Leon82 said:

Why not make a separate machine group with a transform op 1 instance. It will pull from the "proved" toolpaths but only output 1 station

Hello Leon82,
   Thank you for your time to reply. Although my company had let go some "SENIOR HARD HEADED" machinist, there are still some.  They want 1 shot program and never want to get another program.  After first part of FAI then run the rest.  That is why I am looking for some kind of best solutions to fit into my situation.    

   In this case, I am thinking of LOCAL SUB-PROGRAM from HAAS of which M97 but not sure how to use it.  If you can, would you please show me a detail example of M97 sub-program?

 

 

Thank you.

Link to comment
Share on other sites
On 10/16/2019 at 4:00 PM, PcRobotic said:

 

Hello Colin,
   After nearly a week of research how HAAS "/", BLOCK DELETE would work other than FANUC.  This is what I found, M97 PXXX (Program number).  M97 is LOCAL SUB PROGRAM as I read at the...  " https://www.cnczone.com/forums/haas-mills/41301-block-skip-function.html ", here are the codes.  Not sure how to make my MasterCam work with LOCAL SUBPROGRAM when I am using TRANSFORM toolpaths.  Do you have any recommendations?

 

==============================

 %
O1234 (SAMPLE)
(MASTERCAM - X2 MR1)
(T1 1/2 FLAT ENDMILL)
G00 G17 G20 G40 G80 G90
(CUT OD)
T1 M06 (1/2 FLAT ENDMILL)
G00 G90 G54 X-1.425 Y-.025 S3500 M03
G43 H1 Z.1
M08
/M97 P20 (TURN BLOCK SKIP ON TO SKIP THIS LINE) ======> if this line is skip, all below will skip. This is nice.
G01 Z-.25 F50.
G41 D1 Y-.175 F32.
G03 X-1.25 Y0. I0. J.175
G01 Y.875
G02 X-.875 Y1.25 I.375 J0.
G01 X.875
G02 X1.25 Y.875 I0. J-.375
G01 Y-.875
G02 X.875 Y-1.25 I-.375 J0.
G01 X-.875
G02 X-1.25 Y-.875 I0. J.375
G01 Y0.
Y.02
G03 X-1.425 Y.195 I-.175 J0.
G01 G40 Y.045
G00 Z.1
(CIRCLE MILL BORE)
N20 X0. Y0.
G01 Z-.25 F15.
Y.0993 F25.
G41 D1 X.0993
G03 X0. Y.1987 I-.0993 J0.
Y-.1987 I0. J-.1987
Y.1987 I0. J.1987
X-.0993 Y.0993 I0. J-.0993
G01 G40 X0.
Y0.
G0 Z.1 M09
M05
G91 G00 G28 Z0.
G28 Y0.
G90
T1 M06
M30
%

Hi Steven,

I had a whole response typed out, but I deleted it because I had a bit of an insight, an I think this might work for what you are trying to accomplish.

Instead of using Block Delete to skip the code, we can use a Variable on the Haas Control to determine if you want to "execute certain code" or "skip certain code".

Here is my suggestion on how I would attempt this. I do not know if it will work, but I suspect it might. You'll have to test it out.

  1. Fanuc and Haas both support Macro Variable statements. This uses "Fanuc Macro B Logic, Variables, and Operators". However, this is a purchased option, so be aware of that.
  2. This Macro Language supports "Jumps", much like a Local Subroutine, but allows you to Jump forward in the NC Code, to a specific N Block Number.
  3. It is important that you do not repeat any of the "Jump Blocks". Make each of these "N Blocks" unique, so there is only one spot in the current NC Program for the logic to jump to.
  4. The Commands are IF and GOTO. It works by making a "true/false" decision, similar to how the Post Processor makes decisions. It just happens on the control.
  5. For this to work, someone needs to be responsible for changing the "setup variable".

In this example, I'm using variable number #510 to control the 'skipping' of the NC Code. If #510 is not equal to 1, then the NC code below the "IF" condition is run. If #510 is equal to 1, then the entire block is skipped because the GOTO statement is executed.

 

%
O0123
(T)
(DATE=DD-MM-YY - 18-10-19 TIME=HH:MM - 10:06)
(MCX FILE - T)
(NC FILE - \\SELWAYSBS2K8\USERS\CGILCHRIST\MY DOCUMENTS\MY MCAM2019\MILL\NC\T.N)
(MATERIAL - ALUMINUM INCH - 2024)
(T21| 1/2 FLAT ENDMILL|H21|D21| DIA. - .5|WEAR COMP)
(T14| 1/2 FLAT ENDMILL|H14|D14| DIA. - .5)
(SETUP MODE - #510 = 1)
(PROD  MODE - #510 = 0)
(MAKE SURE YOU DO NOT REPEAT GOTO N BLOCKS!)
(EACH GOTO BLOCK MUST BE UNIQUE IN WHOLE PROGRAM)
#510=1
(TEST FOR PROD JUMP)
IF[#510EQ0.]GOTO901
N1 (MCAM OP:1)
(SETUP OPERATION)
G20
G00 G17 G40 G49 G80 G90 G94
G00 G90 G53 G49 Z2.5
(T21- 1/2 FLAT ENDMILL| DIA. - .5)
T21 M06
G00 G90 G53 Z2.5
G00 G90 G54 X-2.2161 Y-.6852 S1069 M03
G43 H21 Z.25 M08
Z.2
G01 Z0. F6.42
G41 D21 X-1.7161
G03 X-1.2161 Y-.1852 J.5
G01 Y.4706
G02 X-.9661 Y.7206 I.25
G01 X1.5018
G02 X1.7518 Y.4706 J-.25
G01 Y-.841
G02 X1.5018 Y-1.091 I-.25
G01 X-.9661
G02 X-1.2161 Y-.841 J.25
G01 Y-.1852
G03 X-1.7161 Y.3148 I-.5
G01 G40 X-2.2161
Z.2
G00 Z.25
M09
M05
N901 (SAFE JUMP BLOCK FOR SETUP SEQ 1)
G00 G90 G53 G49 Z2.5
M01

N2 (MCAM OP:2)
(PROD OPERATION)
G00 G17 G40 G80 G90 G94
G00 G90 G53 G49 Z2.5
(T14- 1/2 FLAT ENDMILL| DIA. - .5)
T14 M06
G00 G90 G53 Z2.5
G00 G90 X-2.2161 Y-.6852 S7777 M03
G43 H14 Z.25 M08
Z.2
G01 Z0. F77.
X-1.7161
G03 X-1.2161 Y-.1852 J.5
G01 Y.4706
G02 X-.9661 Y.7206 I.25
G01 X1.5018
G02 X1.7518 Y.4706 J-.25
G01 Y-.841
G02 X1.5018 Y-1.091 I-.25
G01 X-.9661
G02 X-1.2161 Y-.841 J.25
G01 Y-.1852
G03 X-1.7161 Y.3148 I-.5
G01 X-2.2161
Z.2
G00 Z.25
M09
M05
G00 G90 G53 G49 Z2.5
M30
%

 

 

 

 

 

 

Link to comment
Share on other sites

Hi Steven,

Here are some good resources for you to learn about Fanuc Macro B, and how to apply it to what you are doing.

First, this is an excellent "quick reference sheet". It includes some simple examples, and all the commands, formatting, variable assignments, and so forth. I use this reference very often, almost daily, depending on the tasks at hand.

https://www.cnc.info.pl/download/file.php?id=24853

The Haas Next Generation Control "Vertical & Horizontal Operator's Manual", also has some great reference material in it, that is specific to Haas. Especially useful are the variable lists. Pages 218-266 should be of particular interest, especiallly the section that lists both the "NGC variables (new)", and the "Legacy variables (old)". This is nice because you get both values, and there is even a special variable available called the "Next-Generation Control Identifier". I won't tell you the number, but I'll give you the hint that you can read about it on page 242. (Keep in mind: these page numbers are printed on each PDF page, to give you the "book page number". The "PDF page number", and the "Book page number", are not likely to be equal, so be diligent in your searching...)

https://www.haascnc.com/content/dam/haascnc/en/service/manual/operator/english---mill-ngc---operator's-manual---2019.pdf

Here is a PDF that I find useful. It was put together as part of a training class, likely for CNC lathes, but it has some good information.

https://www.pmpa.org/docs/technical-conference/cnc-programming-workshop.pdf

I would also highly recommend both of the following books. If you only get one, get the S.K. Sinha book. I think it has some more useful examples, but I have both books and like the different perspective in each. I have the S.K. Sinha book on Kindle, which is nice for reading when I'm travelling.

"CNC Programming using Fanuc Custom Macro B", by S. K. Sinha

"FANUC CNC Custom Macros (Programming resources for Fanuc Custom Macro B users)" by Peter Smid

I would recommend buying them anywhere except Amazon. Unless you can't find them anywhere else.

 

 

  • Like 1
Link to comment
Share on other sites
On ‎10‎/‎17‎/‎2019 at 3:58 PM, PcRobotic said:

Hello Leon82,
   Thank you for your time to reply. Although my company had let go some "SENIOR HARD HEADED" machinist, there are still some.  They want 1 shot program and never want to get another program.  After first part of FAI then run the rest.  That is why I am looking for some kind of best solutions to fit into my situation.    

   In this case, I am thinking of LOCAL SUB-PROGRAM from HAAS of which M97 but not sure how to use it.  If you can, would you please show me a detail example of M97 sub-program?

 

 

Thank you.

M97 (internal subs) works on a Haas but no bueno on a Fanuc.

You can use internal subs on a Fanuc, by formatting it like the below but you need a big control memory...

From FS16i control onwards, you can set SQC bit to enable calling a subprogram with its sequence number. The parameter bit is 6005.0 This allows the Sub Programs to be included in the Main Program, after the M30, as shown following:

 Main Program
 O1001
 -------------
 -------------
 -------------
 M98 Q1000
 -------------
 -------------
 -------------
 M98 Q2000
 -------------
 -------------
 -------------
 M98 Q3000
 -------------
 -------------
 -------------
 M30
 (SUB PROGRAMS START HERE)
 N1000 --------
 -------------
 -------------
 -------------
 -------------
 M99
 N2000 --------
 -------------
 -------------
 -------------
 -------------
 M99
 N3000 --------
 -------------
 -------------
 -------------
 -------------
 M99
 %

Link to comment
Share on other sites

Or can you not do this using M98 (standard) Fanuc sub prog call, which will work in the Haas and Mits?

You'd have to change your prog format so all your tool paths are within the one sub (ie the complete prog downwards from the header) but you could then have a Macro switch that you change at the header to either call M98 P100 L1 or M98 P100 L8 (Call subprogram O100 and Loop it 8 times for your prod parts)?

And handle the separate datum shifts somehow?

Just a thought although I HATE sub progs because people forget to save them with the main prog :rolleyes:

 

Which is why Colins goto/jumps are more elegant for production, but you're not going to get Mastercam to spit out EXACTLY what you want without hand editing code...

 

Link to comment
Share on other sites
8 hours ago, Newbeeee™ said:

Or can you not do this using M98 (standard) Fanuc sub prog call, which will work in the Haas and Mits?

You'd have to change your prog format so all your tool paths are within the one sub (ie the complete prog downwards from the header) but you could then have a Macro switch that you change at the header to either call M98 P100 L1 or M98 P100 L8 (Call subprogram O100 and Loop it 8 times for your prod parts)?

And handle the separate datum shifts somehow?

Just a thought although I HATE sub progs because people forget to save them with the main prog :rolleyes:

 

Which is why Colins goto/jumps are more elegant for production, but you're not going to get Mastercam to spit out EXACTLY what you want without hand editing code...

 

Well, the IF/GOTO jumps can be handled through Post Processor edits, using Miscellaneous Integers and Real Numbers. This is actually fairly easy to do.

I believe there to be a bigger problem of "not understanding the big picture" here. There are hundreds different ways to combine all of the machine modes, the internal shop processes, and the flow of information, through a shop.

From what I've seen, Steven is one of the most ingenious and dedicated people I've ever worked with. Part of the problem he faces is a company where processes were put in place long ago, and have now evolved to the point of dogma. Processes become entrenched as gospel, even when their usefulness is questionable, or when when are no longer serving their intended purposes.

  • Like 2
Link to comment
Share on other sites
1 hour ago, Colin Gilchrist said:

Well, the IF/GOTO jumps can be handled through Post Processor edits, using Miscellaneous Integers and Real Numbers. This is actually fairly easy to do.

I believe there to be a bigger problem of "not understanding the big picture" here. There are hundreds different ways to combine all of the machine modes, the internal shop processes, and the flow of information, through a shop.

From what I've seen, Steven is one of the most ingenious and dedicated people I've ever worked with. Part of the problem he faces is a company where processes were put in place long ago, and have now evolved to the point of dogma. Processes become entrenched as gospel, even when their usefulness is questionable, or when when are no longer serving their intended purposes.

I realised from his multiple questions and what he's trying to achieve, he has one tough gig.

Nothing worse than a shop full of prima donnas :rolleyes:

Which is why I capitalised the statement that Mastercam won't be able to produce it EXACTLY as he wants it - It will be more than good enough, but probably won't be "quite right" :lol:

 

  • Like 2
Link to comment
Share on other sites
On 10/19/2019 at 3:41 AM, Newbeeee™ said:

Or can you not do this using M98 (standard) Fanuc sub prog call, which will work in the Haas and Mits?

You'd have to change your prog format so all your tool paths are within the one sub (ie the complete prog downwards from the header) but you could then have a Macro switch that you change at the header to either call M98 P100 L1 or M98 P100 L8 (Call subprogram O100 and Loop it 8 times for your prod parts)?

And handle the separate datum shifts somehow?

Just a thought although I HATE sub progs because people forget to save them with the main prog :rolleyes:

 

Which is why Colins goto/jumps are more elegant for production, but you're not going to get Mastercam to spit out EXACTLY what you want without hand editing code...

 

We do this on all of our horizontal and verticals with no hand work every day. Most of the main and subs are on the same tool path file but the oversized programs have multiple files that get called with M198. As Colin stated it's not difficult to do but it does take preparation to know what the program is going to look like before it gets written into the post.

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