Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jrga01 on December 14, 2018, 05:51:27 PM

Title: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 05:51:27 PM
Hey guys new here. Just messing around with the software and come across a weird problem. Using a mill. When i Load Gcode from mastercam into mach 3, it shows the toolpath correctly, but its in the very far bottom left of the display screen and zeroing the offsets does not work.
I first ref all home on the machine, then move the work to the tool press the zero buttons and then regen toolpath... toolpath is still way off to the bottom left on the display screen, displaying outside of my defined table dimensions...
I've been at the problem now for a few days and I'm totally stumped!

help!
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 06:09:32 PM
Hi,
what that means is that the Gcode produced by Mastercam has a work zero at some remove from the part.

When you reference and then zero Mach you have indentifed the work zero position. The Gcode however calls for
machining moves at the same remove as the Mastercam work zero and some distance outside of the machine boundaries.

There are two possibilities to fix it:
1) Manually adjust the G54 work offset such that the toolpath of the part lands within the boundaries of the machine. This is doable
    but is confusing and I would consider it as a one off solution.
2) Go back to Mastercam and translate the part toopath closer to the work zero location, commonly the corner of the stock. Now when you
    engage Mach you can touch off to the corner of the stock....hit <zero all> to set Machs work zero to be coincident with Mastercams
    work zero. This is a much more satisfying approach to your problem and is the norm in industrial practice.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 06:36:30 PM
Craig. Thanks for trying to help... I do believe i have the origin on mastercam at the corner of my stock. Here is a picture, sorry im very new to this and trying to learn, thanks for helping me.
(https://i.ibb.co/q0WHjHH/Mastercam-drawing.png) (https://ibb.co/rbcB0BB)
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 07:16:32 PM
Okay, so ive taken your idea of translate in mastercam and translated the part +x and +y about 250 units... This got the part in my table, to do that i had to post the gcode to mach3 and extrapolate the coordinates from there using my machine coordinates and the given workoffsets..

This does not seem like the right (efficient way) to do this... How do i go about machining a part without having to translate the original drawing every single time?
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 08:10:47 PM
Hi,
you need to compose the CAD drawing and therefore the Gcode that results from the CAM program derived from that
drawing to be the corner of the stock.

I can only presume that the example you have posted is that the stock is larger than your table dimensions?

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 08:16:21 PM
No, you can see the stock outline there in red dashed lines. unfortunately simply translating the work +x,+y did not work, as the code is still telling my tool (table) to move outside of its defined area.
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 08:41:43 PM
Hi,
yes I can see the stock outlines. What are the overall dimensions of the stock?

How do they relate to the dimensions of your machine boundaries.

Quote
unfortunately simply translating the work +x,+y did not work, as the code is still telling my tool (table) to move outside of its defined area.

Translating the workpiece has that disadvantage, usually the first  move of any Gcode job is 'go to the origin' and you have carefully shifted the origin
so that the part is centered on your table thus putting the origin outside of those boundaries. You may be able to manually edit the Gcode to delete
that first 'go to the origin' move. That will require that you have passing familiarity with Gcode. It is a necessary skill of CNCing.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 08:48:35 PM
Hi,
I've been looking at your Mastercam pic a little more closely. Normally the gnomic (the red/green/blue axis orientation symbol) is displayed
at or close to the work zero of Gcode. As displayed it is a considerable distance from your stock boundaries.

Go back to your Mastecam file and place the cursor on the corner of your stock and note the WCS coordinates. They should be 0,0,0.
Your description and the pic you have attached suggest to me that the corner of the stock is not 0,0,0 as it should be.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 08:51:13 PM
25x25x50mm stock. 5x9x10” defined machine soft limits. I’ve tried setting mach3 native units to mm before posting the g code already.
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 08:52:17 PM
I will double check this when I get home... thank you
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 09:18:24 PM
Hi,

Quote
I’ve tried setting mach3 native units to mm before posting the g code already.

DO NOT FIDDLE WITH NATIVE UNITS. Mach3 has native units, you can choose either mm or inches. Those will be the units that you tune the motors,
define soft limits  and so on. Once they are set DO NOT CHANGE THEM. They are set for the life of the machine. If you have fiddled with them you
may have to go back and redo you tuning and so on to ensure that all your settings are consistent with your chosen native units.

When I first started with Mach I made the same mistake.

If you have Gcode composed of mm movements code G21, inch movements code G20.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 09:20:51 PM
Thank you for the warning Craig. I watched the tutorial videos on here explaining that very same thing, but I’m really at my wits end here and wanted to try everything.
Do you know if mastercam 2018 has compatibility issues with mach3?
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 10:10:35 PM
Hi,
Mastercam and Mach3 are different to each other and at no time do they interact.

Mastercam is essentially a CAM program to which has been added a CAD drafting/drawing module. Thus you can draw your part and then have
the CAM part of the program generate the required toolpaths. The raw toolpaths are modified/massaged to be compatible with your machine
and control software, the massaging is called the 'post', short for post processor.

There is a Mastercam post for Mach3 (and Mach4), but it is nearly identical to a 3 axis Fanuc post. I have used the Mach3 post AND the Fanuc post
and not really found any difference between them.

The bottom line here is that its not any incompatability between Mach and Mastercam but that you are using two programs and you are not really
familiar with either of them. Its a steep learning curve, get used to it....CNC is steep learning curve.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 10:21:35 PM
Thank you craig,
I double checked my cam and the gnomon is at 000.
I'm looking at my code and one of the first lines is G92 X250. Y-250. Z250. I changed these values to 000... But i would like to know how to actually solve this problem rather than work around it... Here is a bit of the code
Code: [Select]
N100 G21
N110 G0 G17 G40 G49 G80 G90
/ N120 G91 G28 Z0.
/ N130 G28 X0. Y0.
/ N140 G92 X250. Y250. Z250.
N150 T5 M6
N160 G0 G90 X-.179 Y21.054 A0. S3500 M3
N170 G43 H5 Z50.
N180 Z27.799
N190 G1 Z27.299 F7.2
N200 X-.189 Y21.057 Z27.099
N210 X-.217 Y21.065 Z26.902
N220 X-.265 Y21.079 Z26.709
N230 X-.33 Y21.098 Z26.522
N240 X-.413 Y21.122 Z26.342
N250 X-.513 Y21.151 Z26.172
N260 X-.629 Y21.185 Z26.013
N270 X-.759 Y21.223 Z25.867
N280 X-.902 Y21.265 Z25.735
N290 X-1.058 Y21.31 Z25.619
N300 X-1.223 Y21.358 Z25.519
N310 X-1.398 Y21.409 Z25.437
N320 X-1.579 Y21.462 Z25.373
N330 X-1.766 Y21.517 Z25.329

Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 10:30:24 PM
Hi,
yes the gnomon is always at 0,0,0 but that means your part toolpath starts at x=250, y=250 and z=250 ie outside your boundaries.

You need to (in Mastercam) highlight the whole of the tooplath, stock and so on and translate it relative so the first corner of the part
is not 250,250,250 but 0,0,0.

This is a CAM issue, not Mach3 at all. You have drawn your part too far away from the WCS origin. Shift your drawing to be close if not
coincident with the WCS origin.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 10:44:19 PM
I drew my part in solidworks, on the origin in that program and exported it to mastercam... Maybe thats why it is so far away from my WCS. I've been reading you can simply create another WCS and define its origin at your stocks corner, ive tried this and it isnt working though
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 11:16:09 PM
Hi,
Mastercam has a reputation for being hard to learn, I certainly had trouble with translating the toolpath relative to the WCS origin when
I encountered the exact same problem you are having.

Regrettably I no longer have access to Mastercam, despite its somewhat thorny user interface I liked its completeness. Shame I would have to take out another
mortgage to buy a copy for myself. I'm sorry I can't recall how I did it......I do remember setting the XYZ translation distances manually to ensure my preferred
touch off feature landed on 0,0,0. I recall definitely translating my part TO the WCS, not trying to make a new WCS. I had great difficulty trying to do that
as well and found translating my work relative to the existing WCS much easier.

It does seem strange that the Gcode should call a move to 250,250,250 when it would appear your part or even your stock does not extend that far.
Is it possible that some point, maybe a drafting mark or center point of a radius has been inadvertently overlooked and retained in the MasterCam
drawing?

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 14, 2018, 11:20:37 PM
Nothing i do seems to change that g92 setting of 250,250,250. I even just now tried drawing a simple rectangle, adding an optirough toolpath and posted the gcode. STILL g92 250,250,250. I drew the rectangle with its left bottom corner on the origin.
Title: Re: Help please! Work is way outside of table.
Post by: joeaverage on December 14, 2018, 11:58:03 PM
Hi,
that's starting to sound like either Mastercam or the post is adding a specific point to the tooplath.

May I suggest looking at the machine definition in Mastercam. If memory serves you can specify axis travels. I'm wondering
if the 250,250,250 is not Mastercam producing a line of Gcode that goes to the machine extents, despite the actual extents
being somewhat less than 250,250,250.

Craig
Title: Re: Help please! Work is way outside of table.
Post by: jrga01 on December 15, 2018, 06:37:34 PM
SOLVED:
If anyone else is having this problem. There is a g92 000 code mastercam is producing OVERWRITING any work offsets in mach 3. Delete that line and u should be good to go