Official Luthiers Forum!

Owned and operated by Lance Kragenbrink
It is currently Sun Nov 24, 2024 5:57 am


All times are UTC - 5 hours





Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Thu Jan 30, 2014 9:04 pm 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
Hey everyone.

I have an old Techno/ Isel CNC. I run it with Mach 3 (super old version I think) and I use Mastercam X4.
Latly, I have been having an issue when I make a program with two different Peck Drill operations. The issue is this:
Mach 3 does not read the code properly and does not drill the holes in the right location, or, drills the programmed holes in a previously drilled hole.

It is driving me crazy. I have no clue why it is doing this.
I am using this as my machine description in Mastercam X4:

Machine Description:
Single table fixed gantry router

Control:
Generic Fanuc 3x router

Post:
Generic Fanuc 3x router


Here is a picture of the Mastercam X4 file (you can clearly see the 4 holes to be drilled):

Image

Here is a picture of the Mach 3 toolpath layout (definitely does not resemble the Mastercam toolpath):

Image

Here is the G code:

%
O0000(DRILL TOOLPATH - WRONG)
(DATE=DD-MM-YY - 30-01-14 TIME=HH:MM - 20:09)
(MCX FILE - C:\MCAMX\MCX\ALEXANDER JAMES GUITARS\OLD 2012\FRIGGINGPECKDRILLTEST.MCX)
(NC FILE - C:\DOCUMENTS AND SETTINGS\DOUG\DESKTOP\ALEXANDER JAMES GUITARS NC\DRILL TOOLPATH - WRONG.NC)
(MATERIAL - WOOD INCH)
( T1 | 1/4" 2 FLUTE SPIRAL - AJG | H1 )
N100 G17 G20 G90 G40 G80 G64 G49 G0 M05
N102 G8 P1
N104 G90 M5 Z0
N106 G52 X0. Y0. Z0.
N108 T1 M6
N110 G0 G90 G54 X3.2258 Y.9709
N112 S16000 M3
N114 G43 H1 Z.5
N116 G98 G81 Z-.12 R.25 F108.
N118 X17.2943 Y2.0822
N120 G80
N122 X.375 Y1.375
N124 G98 G81 Z-.25 R.25 F108.
N126 X20.625
N128 G80
N130 M5
N132 G91 G28 Z0.
N134 G28 X0. Y0.
N136 G52 X0. Y0. Z0.
N138 G8 P0
N140 M30
%



Please help! I am losing my mind!


Top
 Profile  
 
PostPosted: Thu Jan 30, 2014 10:13 pm 
Offline
Contributing Member
Contributing Member
User avatar

Joined: Thu May 12, 2005 5:46 am
Posts: 2968
Location: United States
Which holes does it miss? It's been a while since I've dealt with post, but a G81 is a straight drill not a peck drill, not that that really matters, it should still drill the hole.

_________________
Jim Watts
http://jameswattsguitars.com


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 8:39 am 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
Jim Watts wrote:
Which holes does it miss? It's been a while since I've dealt with post, but a G81 is a straight drill not a peck drill, not that that really matters, it should still drill the hole.



It is drilling the furthest right hole in the wrong position (level with the whole a little bit to the left of it, though it shouldn't be level). As well, it is completely missing the furthest hole to the left of the screen.
I noticed I posted the wrong drill toolpath, so yes, it is a normal drill toolpath, not peck. I am still having the same issue with either drill or peck drill toolpaths.


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 8:59 am 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
I made a photo where both Mach 3 toolpath screen and Mastercam X4 toolpath screen are pasted on each other.

The red box and movement paths are Mach 3. The purple box and points are Mastercam X4.
As you can see, Mach 3 does 3 holes and Mastercam X4 has 4 holes. The furthest right hole is being done in the wrong area.

Image

I hope that picture clarifies things.


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 3:38 pm 
Offline
Cocobolo
Cocobolo

Joined: Tue Jun 30, 2009 3:20 pm
Posts: 456
Focus: Build
sorry you're having troubles.
-have you done this successfully with this post before?
-write the code out, save it as a .txt or .nc and backplot. what happens?
-try another post


Last edited by arie on Fri Jan 31, 2014 4:38 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 4:24 pm 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
arie wrote:
so your're drilling 4 holes with two different depths correct?

-have you done this successfully with this post before?
-write the correct code out, save it as a .txt and run. what happens?
-try another post


I have tried every possible router post that Master cam provides. None of them have remedied the issue in Mach 3.
Yes I have done this type of tool path before successfully. Any tool path I do after a drill tool path now does not line up properly in Mach 3. (Maybe I accidently changed something in Master cam?

I wrote out the G Code to make it correct. I changed the first line of new coordinates after the first G80. To the line of coordinates, I added "G00". This made Mach 3 understand the toolpath properly.

I know you could consider this as fixing the issue but I still have a post in Mastercam writing G code wrong (fOr Mach 3). It would be preferable if I could fix that issue so that I do not have tp manually enter G code.


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 4:42 pm 
Offline
Cocobolo
Cocobolo

Joined: Tue Jun 30, 2009 3:20 pm
Posts: 456
Focus: Build
AlexanderJamesGuitar wrote:
arie wrote:
so your're drilling 4 holes with two different depths correct?

-have you done this successfully with this post before?
-write the correct code out, save it as a .txt and run. what happens?
-try another post


I have tried every possible router post that Master cam provides. None of them have remedied the issue in Mach 3.
Yes I have done this type of tool path before successfully. Any tool path I do after a drill tool path now does not line up properly in Mach 3. (Maybe I accidently changed something in Master cam?

I wrote out the G Code to make it correct. I changed the first line of new coordinates after the first G80. To the line of coordinates, I added "G00". This made Mach 3 understand the toolpath properly.

I know you could consider this as fixing the issue but I still have a post in Mastercam writing G code wrong (fOr Mach 3). It would be preferable if I could fix that issue so that I do not have tp manually enter G code.


cool, that makes sense. it doesn't necessarily have to be a "router" post though, try generic 3X mill or mpmaster. hacking posts used to be pretty easy until X7 came along.


Last edited by arie on Fri Jan 31, 2014 4:49 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 4:47 pm 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
I tried mills in Mastercam X4 as well. Didn't change the G80 problem. The issue was still there.

Any idea on how I can edit my post to either replace G80 with G00 or put G00 on the next line of coordinates?

I have no clue how to edit posts.


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 5:39 pm 
Offline
Cocobolo
Cocobolo

Joined: Tue Jun 30, 2009 3:20 pm
Posts: 456
Focus: Build
imo, if the problem is happening in every post you try then it isn't the post's fault. maybe look at both your machine and control definition files first for configuration issues.


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 6:05 pm 
Offline
Contributing Member
Contributing Member
User avatar

Joined: Thu May 12, 2005 5:46 am
Posts: 2968
Location: United States
You need to find some documentation on the techno controller and how it's set up. The G80 cancels the canned cycle (drilling in this case) you shouldn't need to put in a G00 though as that's just a rapid and should remain modal until it see's a G01, which is not necessary here, as you are just positioning for a drill cycle.
The other thing that looks odd is the use of a g52 and a g54, I believe a g52 is a offset from the g54 and the g54 is your actual set point. Are your holes off by X3.2258 Y.9709?

Are you are indicating in the fixture on your machine and using this point as the set point (X0Y0)? If you are not this would explain the difference between the Mach and master cam plots.

_________________
Jim Watts
http://jameswattsguitars.com


Last edited by Jim Watts on Fri Jan 31, 2014 11:34 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 6:29 pm 
Offline
Cocobolo
Cocobolo

Joined: Tue Jun 30, 2009 3:20 pm
Posts: 456
Focus: Build
Jim Watts wrote:
You need to find some documentation on the techno controller and how it's set up. The G80 cancels the canned cycle (drilling in this case) you shouldn't need to put in a G00 though as that's just a rapid and should remain modal until it see's a G01, which is not necessary here, as you are just positioning for a drill cycle.
The other thing that looks odd is the use of a g52 and a g54, I believe a g52 is a offset from the g54 and the g54 is your actual set point. Are your holes off by X3.2258 Y.9709?

Are you are indicating in the fixture on your machine and using point as a X0,Y0, point? If you are not this would explain the difference between the Mach and master cam plots.


I think his machine is using G52 as a tc position (N106) and then at N108 he changes his tool, N110 he goes from G54 which should be his part zero.
G52 in older machines is usually reserved as a toolchange position referenced from machine home (either upper right or table center) and positioned at upper left by the carousel.


Top
 Profile  
 
PostPosted: Fri Jan 31, 2014 8:58 pm 
Offline
Walnut
Walnut

Joined: Fri Jan 31, 2014 8:11 pm
Posts: 1
First name: Tony
Focus: Build
Status: Semi-pro
Hello,
G52 is the old way CNC controllers would reference machine home. Most use G28 now. I would get rid of the G52 line.
Make sure that your work coordinate system (X0Y0) (G54) is the same for your Mastercam program and the X0Y0 position you have set in Mach3. For example, It looks like your Mastercam X0Y0 is the lower left corner of the part. Make sure you set your work offset (G54) on your Techno to the lower left corner (maybe offset inside the material .050" or so).

Also, I would get rid of the G8 P1 if you are contouring. It sets a pause at each line that you don't need.

Also, also, the spindle speed and feedrate are probably faster than you need. Maybe set the spindle speed to 5000 and feedrate to 20ipm depending on the wood. It will work the way you have it, but you might add a few years to your machine if you slow it down.

Other than that I'd say it looks good.

ps. If you are using the MPROUTER post. You can edit it in notepad or one of the mastercam editors. Search for sg52. You can edit it like I did in the last line below to use G28 instead or you can put a # symbol in front of it and get rid of it all together. The # symbol is for comments and the system won't read past it.

------------------------------------
psof$ #Start of file for non-zero tool number
if translate_err = 1,
[
stranslate_err, e$
exitpost$
]
pcuttype
toolchng = one
pcom_moveb
if read_md, pcheckaxis
prog_is_main = not(mi7$)
if ntools$ = one,
[
#skip single tool outputs, stagetool must be on
stagetool = m_one
!next_tool$
]
pbld, n$, *sgplane, *smetric, *sgabsinc, scc0, sg80, sg64b, sg49, sg00, "M05", e$
if use_g8, pbld, n$, "G8", "P1", e$
pbld, n$, *sgabsinc, "M05", e$ # removed -->"Z0", e$ 11-28-13 Tony
if prog_is_main, pbld, n$, sg28, "X0.", "Y0.", e$ # changed from -->if prog_is_main, pbld, n$, sg52, "X0.", "Y0.", "Z0.", e$<--


Top
 Profile  
 
PostPosted: Sat Feb 01, 2014 12:49 am 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
arie wrote:
imo, if the problem is happening in every post you try then it isn't the post's fault. maybe look at both your machine and control definition files first for configuration issues.


I will look at those and report back.


Top
 Profile  
 
PostPosted: Sat Feb 01, 2014 1:48 pm 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
SonusAngelorum wrote:
Hello,
G52 is the old way CNC controllers would reference machine home. Most use G28 now. I would get rid of the G52 line.
Make sure that your work coordinate system (X0Y0) (G54) is the same for your Mastercam program and the X0Y0 position you have set in Mach3. For example, It looks like your Mastercam X0Y0 is the lower left corner of the part. Make sure you set your work offset (G54) on your Techno to the lower left corner (maybe offset inside the material .050" or so).

Also, I would get rid of the G8 P1 if you are contouring. It sets a pause at each line that you don't need.

Also, also, the spindle speed and feedrate are probably faster than you need. Maybe set the spindle speed to 5000 and feedrate to 20ipm depending on the wood. It will work the way you have it, but you might add a few years to your machine if you slow it down.

Other than that I'd say it looks good.

ps. If you are using the MPROUTER post. You can edit it in notepad or one of the mastercam editors. Search for sg52. You can edit it like I did in the last line below to use G28 instead or you can put a # symbol in front of it and get rid of it all together. The # symbol is for comments and the system won't read past it.

------------------------------------
psof$ #Start of file for non-zero tool number
if translate_err = 1,
[
stranslate_err, e$
exitpost$
]
pcuttype
toolchng = one
pcom_moveb
if read_md, pcheckaxis
prog_is_main = not(mi7$)
if ntools$ = one,
[
#skip single tool outputs, stagetool must be on
stagetool = m_one
!next_tool$
]
pbld, n$, *sgplane, *smetric, *sgabsinc, scc0, sg80, sg64b, sg49, sg00, "M05", e$
if use_g8, pbld, n$, "G8", "P1", e$
pbld, n$, *sgabsinc, "M05", e$ # removed -->"Z0", e$ 11-28-13 Tony
if prog_is_main, pbld, n$, sg28, "X0.", "Y0.", e$ # changed from -->if prog_is_main, pbld, n$, sg52, "X0.", "Y0.", "Z0.", e$<--



I will definitely try this and let you know how it goes!


Top
 Profile  
 
PostPosted: Mon Feb 03, 2014 12:10 pm 
Offline
Cocobolo
Cocobolo

Joined: Tue Jun 30, 2009 3:20 pm
Posts: 456
Focus: Build
AlexanderJamesGuitar wrote:
I tried mills in Mastercam X4 as well. Didn't change the G80 problem. The issue was still there.

Any idea on how I can edit my post to either replace G80 with G00 or put G00 on the next line of coordinates?

I have no clue how to edit posts.


i wouldn't try to replace the G80 because you need to cancel that cycle before starting a new one with a different drill depth. if you need a rapid then add "G00" to your post in the appropriate area. you could also add a blkdel in front of the G00 like "#G00". this will allow you to bypass the commmand in your control by turning blkdel on. you need to add the quote marks -this will force the command as anything within quotations is protected. you can edit posts in mcedit or any text editor that doesn't re-format the file. i used to use cimco edit which came with mc.

a couple of things about posts though:
-do make a back up copy before you change anything.
-only change one thing at a time and backplot/dry run at the machine unless you really know what you are doing.


Top
 Profile  
 
PostPosted: Mon Feb 03, 2014 12:21 pm 
Offline
Cocobolo
Cocobolo

Joined: Tue Jun 30, 2009 3:20 pm
Posts: 456
Focus: Build
-regarding G52, machines in the early 80's used G52 as a tool change position while still using G28 to return to home. This was one of the early Yasnac conventions. nowadays it's just another part offset to choose from. one of the guys in our shop still does this out of habit.

-regarding G8 P1, you're correct -it's a switch. in the Fanuc style control this envokes block look ahead. if your control has this option you can set how many blocks to look ahead if not the control will stutter. G8 P0 turns it off.

ime older "delicate" machines prefer clean code i might suggest:

%
O1234
G90 G80 G49 G40 G17
G52 X0. Y0.
T1 M6
G54 G0 X3.2258 Y.9709
S16000 M3
G43 H1 Z.5
G98 G81 Z-.12 R.25 F108.
X17.2943 Y2.0822
G80
G0 X.375 Y1.375
G98 G81 Z-.25 R.25 F108.
X20.625
G80 M5
G91 G28 Z0.
G52 X0. Y0.
M30
%

feeds and speeds are your call


Top
 Profile  
 
PostPosted: Mon Feb 03, 2014 5:58 pm 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
arie wrote:
-regarding G52, machines in the early 80's used G52 as a tool change position while still using G28 to return to home. This was one of the early Yasnac conventions. nowadays it's just another part offset to choose from. one of the guys in our shop still does this out of habit.

-regarding G8 P1, you're correct -it's a switch. in the Fanuc style control this envokes block look ahead. if your control has this option you can set how many blocks to look ahead if not the control will stutter. G8 P0 turns it off.

ime older "delicate" machines prefer clean code i might suggest:

%
O1234
G90 G80 G49 G40 G17
G52 X0. Y0.
T1 M6
G54 G0 X3.2258 Y.9709
S16000 M3
G43 H1 Z.5
G98 G81 Z-.12 R.25 F108.
X17.2943 Y2.0822
G80
G0 X.375 Y1.375
G98 G81 Z-.25 R.25 F108.
X20.625
G80 M5
G91 G28 Z0.
G52 X0. Y0.
M30
%

feeds and speeds are your call


I appreciate your help! And every one else's as well.
This may sound silly, but at the point of almost completely editing my post processor, I decided to first try updating Mach 3... It works!!! After the upgrade, Mach 3 started reading the non edited g code how I intended.


Top
 Profile  
 
PostPosted: Mon Feb 03, 2014 5:58 pm 
Offline
Mahogany
Mahogany
User avatar

Joined: Fri Dec 13, 2013 4:51 pm
Posts: 50
Location: Peterborough, Ontario, Canada
First name: Alexander
Country: Canada
Focus: Build
Status: Professional
arie wrote:
-regarding G52, machines in the early 80's used G52 as a tool change position while still using G28 to return to home. This was one of the early Yasnac conventions. nowadays it's just another part offset to choose from. one of the guys in our shop still does this out of habit.

-regarding G8 P1, you're correct -it's a switch. in the Fanuc style control this envokes block look ahead. if your control has this option you can set how many blocks to look ahead if not the control will stutter. G8 P0 turns it off.

ime older "delicate" machines prefer clean code i might suggest:

%
O1234
G90 G80 G49 G40 G17
G52 X0. Y0.
T1 M6
G54 G0 X3.2258 Y.9709
S16000 M3
G43 H1 Z.5
G98 G81 Z-.12 R.25 F108.
X17.2943 Y2.0822
G80
G0 X.375 Y1.375
G98 G81 Z-.25 R.25 F108.
X20.625
G80 M5
G91 G28 Z0.
G52 X0. Y0.
M30
%

feeds and speeds are your call


I appreciate your help! And every one else's as well.
This may sound silly, but at the point of almost completely editing my post processor, I decided to first try updating Mach 3... It works!!! After the upgrade, Mach 3 started reading the non edited g code how I intended.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
phpBB customization services by 2by2host.com