Trying to generate GCODE for my Genmitsu 3018-PROver CNC machine

Trying to generate GCODE for my Genmitsu 3018-PROver CNC machine

Anonymous
Not applicable
14,758 Views
24 Replies
Message 1 of 25

Trying to generate GCODE for my Genmitsu 3018-PROver CNC machine

Anonymous
Not applicable

I'm trying to engrave a simple figure on a block of wood.  But every time I generate any GCode from Fusion 360 it errors out.  The CNC machine homes out at the bottom left corner with the spindle all the way to the top.

The machine coordinates are -259, -157, -1

 

Positive X coordinates go right

Positive Y coordinates go back

Positive Z coordinates move the spindle up

 

I use the GRBL post-processor and below is the GCode that is generated 

 

As soon as the GCOde reaches the line (Z16) where it tries to move the spindle in the positive Z axis, the cnc stops because the kill switch at the top stops it. 

 

-- GCODE --

(1002)
(T2 D=3.175 CR=0 TAPER=10deg - ZMIN=-8.284 - chamfer mill)
G90 G94
G17
G21
G28 G91 Z0
G90

(Engrave2)
T2
S5000 M3
G54
M8
G0 X25.4 Y36.589
Z16
Z5
G1 Z-8.284 F1000
G3 X25.4 Y14.211 I0 J-11.189
X25.4 Y36.589 I0 J11.189
G0 Z16
M9
G28 G91 Z0
G90
G28 G91 X0 Y0
G90
M5
M30

 

 

 

0 Likes
14,759 Views
24 Replies
Replies (24)
Message 2 of 25

engineguy
Mentor
Mentor

@Anonymous 

 

When your CNC machine is "Homed" to the switches the positions should all be Zero, X0Y0Z0, this is the Machine Zero position, if you jog all your axes away from the switches and then press Home all three axis should run to the switches and the DRO should show all Zeros, if it isn`t doing that then you need to sort that first.

 

If all that is done and correct then look to the way that you are setting your Part offset, when you "touch off" (probe) your piece of Stock the X, Y and Z values should be entered in to the first "Work Offset" in grbl which will be your G54 work offset.

This is the distance from the CNC Machine X0,Y0,Z0 position to the Part X0,Y0,Z0 and tells the CNC where to go to on the Table to cut the Stock, that is what the G54 in the G code is doing, it calls up those distances and commands the CNC to move to that position.

 

For example if the Z axis total height from the Table is say 200mm and your stock is 20mm high then the distance the Z axis will need to travel would be 180mm to get to the Part Z0, now, there is a value of 16mm for your "Clearance" height so that would be at the Z16 position so it would move to 16mm above the top of the stock, it is all about setting up your machine correctly!

It is a bit confusing having two sets of XYZ Zero Coordinates but with a little practice it does become easy, there are two places in grbl that show those coordinates, one for the CNC Machine Zero and one for the Part Zero.

 

Stay Safe

Regards

Rob

0 Likes
Message 3 of 25

Anonymous
Not applicable

Thank you for the response, but I am still fairly new to this so some of your explanation is going right over my head.  

 

When your CNC machine is "Homed" to the switches the positions should all be Zero, X0Y0Z0, this is the Machine Zero position, if you jog all your axes away from the switches and then press Home all three axis should run to the switches and the DRO should show all Zeros, if it isn`t doing that then you need to sort that first.

 

You say that the values should all be 0 when the machine is homed, but it isn't.  I am using Candle 1.1.7 to send the Gcode to the CNC machine.  And when I click on the Home button it takes me to the bottom left corner, but the work coordinates and machines coordinates are -259, -157, -1.

I have tried using the command 

G92 X0 Y0 Z0

to set the home to the current position  This does set the Work Coordinates to 0, 0, 0.  The positive Z values still try moving the spindle up, which causes the spindle to hit the top limit switch and stop.

 

Should I set the spindle all the way down before I try setting the home using the G92 command?

 

If all that is done and correct then look to the way that you are setting your Part offset, when you "touch off" (probe) your piece of Stock the X, Y and Z values should be entered in to the first "Work Offset" in grbl which will be your G54 work offset.

 

How do I modify the Work Offset in grbl?  Is that something I need to change in fusion 360 before I run the post processor?

0 Likes
Message 4 of 25

engineguy
Mentor
Mentor

@Anonymous 

 

There are two sets of Zero coordinates on your CNC, the first is the "Home" position which on your CNC is X0Y0 at the lower left corner of your table and the Z0 at the top of the Z axis travel, when moved to this position you must have the DRO showing all X0Y0Z0, once the CNC is in the Home position then you should be able to set the DRO numbers to show 00.000 for example.

 

The second set ot Zero coordinates is your "Work Offset" or Part Zero as it is sometimes referred to, to set this you move your CNC to a place on your piece of Stock, usually the lower left corner for the X and Y position and the top of the Stock for the Z axis.

When you moved your CNC from the Home position (X0Y0Z0) to the piece of stock you will have numbers that are usually positive in the X and Y and negative in the Z, this is your "Work Offset" and these values should appear in your Work Offset table when you press the "Set Offset" button which should be somewhere on your screen if you are on the correct screen for setting offsets.

Now your CNC knows exactly where the piece of stock is in relation to the Home position.

So, if you have done the Work Offset as above and used the left lower corner of the stock you must do exactly the same in Fusion, so when you go to the Manufacture mode the first thing you must do is create the "Setup" so that you have a piece of stock that is the same size/shape as the piece on your CNC table and you must set the WCS (The Red,Green and Blue arrows) to exactly the same position as you selected on your CNC.

 

That is it, you need to read the grbl instructions as to how/where to go to in the grbl software to be able to achieve the above, once that is learned you will find it very easy to use your CNC 🙂 🙂

 

Stay Safe

Regards

Rob

0 Likes
Message 5 of 25

Anonymous
Not applicable

What does DRO stand for?

0 Likes
Message 6 of 25

engineguy
Mentor
Mentor

@Anonymous 

 

Digital Read Out, the X,Y and Z numbers on your screen.

 

Stay Safe

Regards

Rob

0 Likes
Message 7 of 25

Anonymous
Not applicable

So, if I understand you correctly then I must be doing something wrong in my Fusion 360 file.  I have set up the Universal Gcode Sender and I have my machine homing to the bottom left and the spindle all the way at the top of the Z axis.

The Word Position is set to 0, 0, 0 (see attached screenshot)

 

Here is the fusion 360 file I created.  I think I need to point the Z axis downward to match my CNC.  But i can't figure out how.  here is the file:

https://a360.co/3o0gqZ5

Any ideas?

0 Likes
Message 8 of 25

engineguy
Mentor
Mentor

@Anonymous 

 

Your Fusion File is good, the problem is that you are not setting your cnc control correctly for the Part offset, the Home position at the cnc is good, do not change that.

In Fusion you have the WCS at the left corner of your cube and at the top, this is good. Now you must do the same at your control, place the cube on your table/in a vise etc and "touch off" (probe) that same corner of the cube on your cnc, that is then your Work Offset, there should be somewhere in the control screens where you do the probing etc, those values are the distances from your cnc Home position to the cube on the table and are your first work offset.

 

That is all I have, if the Work offset are correctly set then what you have in Fusion will work also.

 

Stay Safe

Regards

Rob

 

0 Likes
Message 9 of 25

Anonymous
Not applicable

I have been playing with the settings and I am making some progress.  I was able to finally get it to engrave correctly, but I had to remove the following line from the gcode.

G28 G91 Z0

 

It would send the spindle all the way up until it hit the limit switch at the top.

 

I am guessing I still have something set up incorrectly, but I don't know what.

 

Any ideas what that command does and why it is included?

0 Likes
Message 10 of 25

seth.madore
Community Manager
Community Manager

G28 G91 Z0 is a homing command. It sounds like it's doing exactly what it should be doing. Is reaching a limit switch causing an alarm in your machine?


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 11 of 25

Anonymous
Not applicable

Yes.  when it hits the limit switch everything stops and it displays an alarm

0 Likes
Message 12 of 25

Anonymous
Not applicable

It's odd, because when I send the home comand $h

or use the Home button on the controller interface, it homes correctly to the bottom left with the spindle at the top without hitting the limit switch.

 

When the command 

G28 G91 Z0

is executed, it just hits the limit switch and stops.

0 Likes
Message 13 of 25

seth.madore
Community Manager
Community Manager

What command, then, is supposed to send it to its proper Z home location?


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 14 of 25

Anonymous
Not applicable

@Anonymous wrote:

It's odd, because when I send the home comand $h

or use the Home button on the controller interface, it homes correctly to the bottom left with the spindle at the top without hitting the limit switch.

 

When the command 

G28 G91 Z0

is executed, it just hits the limit switch and stops.


 

It appears to me that it needs line added to home X and Y so that it acts in same manor as when you hit Home button.

 

G28 G91 Z0

G28 G91 X0 Y0

 

Edit:

Never mind, I overlooked alarm comments above 😁

0 Likes
Message 15 of 25

Anonymous
Not applicable

When I press the home button on the controller.  It sends $H according to the console.

and that seems to work fine.

 

 

0 Likes
Message 16 of 25

engineguy
Mentor
Mentor

@Anonymous 

 

Well then, does this code run OK in your machine ??

%
(1001)
(T2 D=3.175 CR=0 TAPER=10deg - ZMIN=-8.284 - chamfer mill)
G0 G90 G94
G17
G21
$H

(Engrave2)
M9
T2 M6
S5000 M3
G54
M8
G0 X25.4 Y36.589
Z16
G1 Z5 F1000
Z-8.284
G3 Y14.211 J-11.189
Y36.589 J11.189
G1 Z16
M9
M30
%

 

If yes then try the attached PP.

You also need to disable the "G28 Safe Retracts" when you Post Code

 

Stay Safe

Regards

Rob

 

0 Likes
Message 17 of 25

Anonymous
Not applicable

That code did work for the most part.  It didn't hit any of the limit switches and it didn't generatwe any errors.

It did display a warning and "HOLD" message,. but when I pressed play it kept running and did the engraving

 

[Error] An error was detected while sending 'T2M6': (error:20) Unsupported or invalid g-code command found in block. Streaming has been paused.
[Error] Error while processing response <An error was detected while sending 'T2M6': (error:20) Unsupported or invalid g-code command found in block.

0 Likes
Message 18 of 25

Anonymous
Not applicable

I retried post processing my original file.  

Under the Properties there is a field called "G28 Safe Retract"  It was set to G28

The options in there are

G28

G53

Clearance Height

 

I set it to clearance height and ran the code without any problems.  I will try setting that on a few different projects to see if it works.

 

thanks all!

 

 

0 Likes
Message 19 of 25

crs
Observer
Observer

Thank you for going through this. I am having exactly the same problem.

Could you please post your procedure from the point where you click “post process” in Fusion 360?

I'm pretty sure I understand, but a complete procedure would help me and others who run into this same problem.

0 Likes
Message 20 of 25

crs
Observer
Observer

I found this which is also a good explanation.

Inventables: Learning About G28 

0 Likes