Why always comes traveling before Z up?... If exporting GRBL files?.... Dangerous.👍✌

Anonymous
3,187 Views
26 Replies
Message 1 of 27

Why always comes traveling before Z up?... If exporting GRBL files?.... Dangerous.👍✌

Anonymous
Not applicable

(Contour3)
T1
S1000 M3
G54
G0 X-191.936 Y-184.62
Z22.8
G1 Z7.965 F1206
Z6.6
G3 X-192.203 Y-184.828 I-0.068 J-0.188
G1 X-192.189 Y-184.972

 

0 Likes
Accepted solutions (1)
3,188 Views
26 Replies
Replies (26)
Message 2 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

The code looks correct, what do you have before that code?

Here is what I have generated using the GRBL Post Processor :-

%
(1001)
(T8 D=8 CR=0 - ZMIN=-4 - flat end mill)
G0 G90 G94
G17
G21
G0 G28 G91 Z0  This line should lift your machine Z axis up to Machine Z0 so it does not move with the Z axis down!!
G90

(2D Contour1)
M9
T8 M6
(8mm Flat End Mill-Aluzip)
S3000 M3
G54
G0 X19 Y-15 This line moves the machine to the X/Y start position
Z15  This line is 15mm above your stock (Clearance Height)
Z5  This line is 5mm above your stock (Retract Height)
G1 Z1 F100 This line is 1mm above your stock (Safe Distance)
Z-4
G2 X15 Y-19 I-4 F500

 

In your code the first Z height is Z22.8 so that is positive and above the stock so it must be that your machine is not set up correctly, if you have Limit Switches on the machine then the machine should be Homed to them before running any code, if you do not have Homing switches then you should jog the machine X/Y axis to a safe place, say the front left corner of your cutting area and the Z axis to it`s highest point of travel and set those positions in your control as your Machine Home position.

This means that when you switch on your machine you will press the "Home" button on your control and the machine should move to the preset position.

If you have been for example "touching off" and your machine is not at it`s highest point on the Z axis then the line of code G0 G28 G91 Z0 at start will move the machine to that position so there should be no probems with moving in the X/Y directions

All about setting up the machine 🙂

 

Stay Safe

Regards

Rob

1 Like
Message 3 of 27

Anonymous
Not applicable

Oke thank you. Yes i bought an complet system on ali. I have build limit switches on it.

And if i home my router. My drill Z will be automaticly set to the top of Z axis when homing.

That point would then for me -2 because i jump back 2 steps from de limit switches.

Then i set this point to 0 with the button in my grbl software. ( G92 X~ Y~ Z~ )

I use grblControl Version 0.8.

 

{ (1001)
(T1 D=2 CR=0 - ZMIN=0 - flat end mill)
G90 G94
G17
G21
G28 G91 Z0
G90 }  This part i always stripping out because z can,t go to 0 then it will activated my limit switches.

 

(Contour3)
T1
S1000 M3
G54
G0 X-191.936 Y-184.62
Z12.8 ( Then would this be to high ) If my drill is going down it would come in the minus range. )
G1 Z7.965 F1206
Z6.6

 

Do i have to home normaly my z axis to the middle? Top or Bottom of the ax?...

What is standard?....

 

Regards.

0 Likes
Message 4 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

Looking at the grbl setup instructions you should be able to have a Home command that will move the Z axis to it`s Limit switch without it alarming out, each limit switch can be used for stopping over travel or when a Home command such as G28 G91 Z0 is used, when in the Home mode the Limit switch only operates as a Home position and should not go into an alarm situation.

Here is what it says in the GRBL instructions :-

 

To set up the homing cycle for Grbl, you need to have limit switches in a fixed position that won't get bumped or moved, or else your reference point gets messed up. Usually they are setup in the farthest point in +x, +y, +z of each axes. Wire your limit switches in with the limit pins and ground, just like with the hard limits, and enable homing. If you're curious, you can use your limit switches for both hard limits AND homing. They play nice with each other.

 

If you have it setup correctly then a G28 G91 Z0 or a G28 G91 X0 Y0 should just move the machine to the limits and be at Machine Zero position! What is shown above is the same for most CNC Machines 🙂

 

If you don`t want to do that although it is the safest way to use a CNC machine then as described before you can Jog the machine to an X/Y/Z position and set that as the Home position that the G28 G91 Z0 wil travel to before going on to running the cutting moves.

 

Stay Safe

Regards

Rob

0 Likes
Message 5 of 27

Anonymous
Not applicable

Hello yes i got a workarround but it would be nicer if i had don,t to do that every time.

What i now do is homing. Then probing the bottom of Z. Then i  set Z to 0.

 

{ (1001)
(T1 D=2 CR=0 - ZMIN=0 - flat end mill)
G90 G94
G17
G21
(When using Fusion 360 for Personal Use, the feedrate of )
(rapid moves is reduced to match the feedrate of cutting )
(moves, which can increase machining time. Unrestricted )
(rapid moves are available with a Fusion 360 Subscription. )
G28 G91 Z0
G90 }

 

(Contour3)
T1
S1000 M3
G54
G0 X-191.411 Y-184.549
Z11.2
G1 Z9.399 F1206
Z7.95
X-191.418 Y-184.55 Z7.898

 

T1
S1000 M3
G54
G0 X-191.411 Y-184.549

Z11.2 (Rip out the above code between { }, and put this action (Z11.2) 1 up.) 👍
G1 Z9.399 F1206
Z7.95

0 Likes
Message 6 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

My apologies but you have pretty much lost me, I have no idea why you are doing what you are doing.

Your CNC Machine GRBL Control will execute Rapid moves (G0) so the issue is just with Fusion Personal version not generating the Rapid moves, if you just copy the top section of code that you show as "ripping out" with the G0 in it as I posted earlier then all you need to do when you have generated your code to get the proper homing done just paste that code into the beginning of your code and it should work !!

 

Also, I don`t know if you have this facility in your version but have you tried using the "Manual NC" facility and using the "Pass Through" to put some specific code in where you want it

1 Like
Message 7 of 27

daniel_lyall
Mentor
Mentor

@Anonymous  Where do you want the Z-axis to goto before the Very first X and Y move, you can have it move to Z machine zero, this is the home position for the Z-axis, or do you want a custom position have a go with this post and see if it does what is needed this company can make a post for you at a cost.

 

Now what you want to be removed no one will do it for you unless you sign a waiver it is a dangerous and downright bad idea to remove that section.


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 8 of 27

Anonymous
Not applicable

{ (1001)
(T1 D=2 CR=0 - ZMIN=6 - flat end mill)
G90 G94
G17
G21
(When using Fusion 360 for Personal Use, the feedrate of )
(rapid moves is reduced to match the feedrate of cutting )
(moves, which can increase machining time. Unrestricted )
(rapid moves are available with a Fusion 360 Subscription. )
G28 G91 Z0
G90 }

 

(Contour1)
T1
S1000 M3
G54
G0 X3.228 Y4.099
Z17
G1 Z8.199 F1206
Z6.646

 

Hello i have solved the problem above the Contourcode. I just had to forgot to set the G28.1 Position.

But the order problem stil remains.....

If fusion exporting NC files. Z0 is the bottom of your table. (G28 position)

If i probe on top of my workpiece. Fusion wil go starting the thicknes of my workpiece above my workpiece.

If i probe on the table it will go well. 

But if the code is executing my dril is going under the height of my workpiece because of the G28 command.

Then i have still to switch the z and x commands....🤔

Is it possible to change this in the contour settings of Fusion 360?

 

0 Likes
Message 9 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

Hmm, I think you are getting confused with the two Z0 settings, the G28 G91 Z0 is the Machine Zero (Z0), the Z0 that you are setting when probing your part is the Part Zero (Z0) you MUST set the machine Zero first before you do any probing, there should be a Home button on your Control that will either send your machine to it`s Homing Limit switches or you manually jog your machine to a SAFE position and then press the "Home/Set Home" button, that is the position your machine will automatically go to when it gets a G28 G91 Z0 command, it is nothing to do with your part setting.

Try just setting the machine to a safe position somewhere in the middle of it`s travels without using any probing/touching off and then jogging the machine away from the position you set and the using your MDI input type in G0 G28 G91 Z0 and the machine should Rapid back to the position that you set.

If that works then you can go and set up your part probing with your tool/edge finder in order to set your Part Zero.

 

You MUST set your machine home position properly, it is NOT either the top of your part or the machine table, it is up in the air somewhere SAFE 🙂 🙂 🙂

 

There is nothing wrong with the Fusion code output other than the "Personal Use" version doesn`t do Rapids or Toolchanges 😞

 

Hope this helps 🙂

Stay Safe

Regards

Rob

1 Like
Message 10 of 27

Anonymous
Not applicable

Mmmm..... If i make may machine coordinates 0,0,0 in the air the fusion code wil start from that point and ads the thicknes of the material on top of it. 🤔 I will try and test some things maybe just what you set that i am confused with the coordinates of the machine and workpiece?

0 Likes
Message 11 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

OK, first things first, did you do the small test I asked you to do, that is setting your machine X,Y and Z up in the air first and then moving it away from that position just down in the Z, that should show as a Z- *** position you moved it down to, if you then type in the G0 G28 G91 Z0 in your MDI (Manual Data Input) and press Go/Start does your machine now move back up to the original position and show Z0, if so then that is correct.

Please do this and come back with how it worked 🙂

 

Stay Safe

Regards

Rob

0 Likes
Message 12 of 27

Anonymous
Not applicable

Hello yes i can save the g28 location and if  i pres G28 G91 Z0 it rapidly gose there.

0 Likes
Message 13 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

Excellent, that is exactly what it should do, test out the X and Y axis doing the same operation.

 

Now try doing a simple probe to the top of a piece of stock, touch off the stock as usual and set the part Z0, once that is  done for safety jog away from the stock and press your G28 and the machine should go to it`s X0,Y0,Z0  G28 position.

Now when you use that size of stock in Fusion and set the Heights correctly in your Operation (Contour, Pocket etc) then what should happen when you load the code and press start the machine should move from the G28 position to

the G54 X and Y coordinates and then to the Clearance height that you set in Fusion, then move to the Retract height, then to the Feed height and then start feeding into the stock, for safety you can remove the stock from your table and take the tool out as well if you want and run the code using your single block option, that way you can easily check the numbers on your screen that the machine is going to the correct position, try the above and come back with the results 🙂

 

Stay Safe

Regards

Rob

1 Like
Message 14 of 27

Anonymous
Not applicable

Now try doing a simple probe to the top of a piece of stock, touch off the stock as usual and set the part Z0, once that is  done for safety jog away from the stock and press your G28 and the machine should go to it`s X0,Y0,Z0  G28 position.

 

Oke i did: first a homing it pull back for me 22 steps because for my locking clamps.
Then i push the button in my software to set work coordinates to XYZ to 0.0.0 
(My machine coordinates will still be X-22 Y-22 Z-22)

Then i moved X-100 Y-100 and Z-5 steps.
(My work coordinates will then be X-100 Y-100 Z-5)
(My machine coordinates will then be X-122 Y-122 Z-27) ***
I save this position G28.1

If i jog away from that point and execute G28 it wil rapidly move back.

 

Then i probe Z to top of my workpiece.
(My work coordinates will then be for Z-9.274)
(My machine coordinates will then be for Z-31.274)

Then i set this location with the button in my GRBL software ( Zero-Z ) to 0. ( Work coordinate)

 

If i then jog away 10 steps up, and X and Y 10 steps a side and i execute G28.
(My work coordinates will then be X-100 Y-100 Z-4.274) What is going on here?....
(My machine coordinates will then be X-122 Y-122 Z-27) Machine coordinates going back good?...***

 

Also the command G54 does nothing for me.

0 Likes
Message 15 of 27

daniel_lyall
Mentor
Mentor

Are you using cncjs to run the machine or one similar? the G54 is the very first work zero, so where you set the work zero is your G54, G53 is the machine zero. 


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 16 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

I have no idea where you are getting some of your information from, when you set your Machine Zero on the X,Y and Z that is Machine Zero, G28 position and all axis should show 0,0,0. Machine Zero is Zero,Zero,Zero. If it shows anything else then your DRO should be reset so that it shows all Zeros 0,0,0.

 

Once that is set there is nothing more for you to do, do not set a G28.1, don`t use G53 either, those commands will move all three axis together and the Z axis may not be high enough before the X and Y axis are clear of your part, huge risk of collision and damage !!! You can set up G53 commands the same as the G28 commands shown below, on two lines of code.

The correct way to get the machine to move safely is to have code at the start like this:-

G0 G28 G91 Z0         This will move ONLY the Z axis up to the set Machine Zero highest point of the machine Z axis

G0 G28 G91 X0 Y0   These axis can not move until the Z axis move is complete, this is SAFE then they go to X0,Y0

 

Now you can probe your stock, set the X,Y and Z using your probe/tool and set that position as your Work Offset, that is all you need to do, to make sure that any X and Y moves do not collide with any clamps you just set Retract and Clearance Heights in Fusion high enough to clear any clamps, that`s all you need do 🙂

 

The G54 sends the machine to the work coordinates that you set probing the X and Y position, when you create a program in Fusion you are not drawing you part in an exact position on your CNC, all you have to remember is that if in Fusion you set your WCS to the lower left corner of your Stock then you must set your Work coordinate at the lower left corner of the Stock on your table.

When you set that position you will have an X, Y and Z position that should show in your control, that is the position that the G54 will offset from by an amount from the WCS in Fusion to the actual Start point of the program relative to the WCS, for example if you have set the WCS to the lower left corner of your stock and placed it on the top of that corner then in your Program that will be Part X0,Y0 and Z0, you need the same in your control, if the actual cutting starts at say X30 Y3 then your machine need to know how to get there so the G54 command moves your machine to the X and Y position that is directly above the lower left corner of your and then adds the offset of X30 Y3 which will be the point at which the program starts cutting, all this will happen BEFORE any Z axis minus (-) moves take place.

Once at that position there will be a G43 line, something like this G43 Z10 H1 if it is Tool #1, because the top of your stock should be set at Zero in your work offset (Part offset) then it will (should) show as a + value, Z10 which would be the 10mm clearance set in your Heights Tab in Fusion, the G43 is the Tool length offset, you will have measured the tool by touching off the top of your stock and saved that value to your control.

All this means that your control now knows exactly where to go to at every line of code SAFELY,may sound complicated but once you have done it a few times it will become very easy, it becomes a habit to do it every time 🙂

 

There are other ways (shortcuts) to all the above but what is there is the correct and safest method of using a CNC Machine 🙂 🙂 🙂

 

Stay Safe

Regards

Rob

 

 

0 Likes
Message 17 of 27

Anonymous
Not applicable

No i am using this GRBL version 0.8

grblcontrol 

1 Like
Message 18 of 27

Anonymous
Not applicable

I have no idea where you are getting some of your information from, when you set your Machine Zero on the X,Y and Z that is Machine Zero, G28 position and all axis should show 0,0,0. Machine Zero is Zero,Zero,Zero. If it shows anything else then your DRO should be reset so that it shows all Zeros 0,0,0.

 

Oke that would be the problem?.... 🤔 🙂 Is it possible to flash my chip? My cnc is arduino based? 🤔

0 Likes
Message 19 of 27

engineguy
Mentor
Mentor

@Anonymous 

 

No, don`t do anything to your hardware/firmware, just set the grbl up correctly, the machine position and the work position shown on your image link should not be the same, if you have set a G28 position that is say 200mm away in the X and Y then when the machine moves to the Part zero position it should show 0,0,0 for the work position and X200 Y200 Z0 for the machine position.

 

Stay Safe

Regards

Rob

1 Like
Message 20 of 27

daniel_lyall
Mentor
Mentor

@Anonymous Machine home on any machine is its safe position so normally it is front left with the Z-axis at the top of its travel.

This applies to all CNC Machines even ones running CNCjs, grbl so on.

 

A G53, G28, G30, and the other home position G codes are only #0 when it is in the home position the rest of the time they are # ### 

G54 onwards are the work zeros.

 

Now My machine reads X0, Y600, Z50 when you home it as it has a park position what is at the back of the machine. if I do a machine zero Gcode it goes to X0, Y0, Z0.


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes