Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

How to custom GRBL gcode or setting start and stop process protect Z Hight 5-10mm on move ?

witawat57
Advocate
Advocate

How to custom GRBL gcode or setting start and stop process protect Z Hight 5-10mm on move ?

witawat57
Advocate
Advocate

How to custom GRBL gcode or setting start and stop process protect Z Hight 5-10mm on move ?

 

NC code on start 

 

(1001)
(T2 D=3.2 CR=0 TAPER=8.7deg - ZMIN=0 - chamfer mill)
G90 G94
G17
G21
G28 G91 Z0
G90

 

this move z0 and motor on, is not safe i need set z Hight 5-10mm 

 

and gcode end process

 

G0 Z3
G17
M9
G28 G91 Z0
G90
G28 G91 X0 Y0
G90
M5
M30

 

this end process but move Z to zero but not motor off need change to z +5 mm 

0 Likes
Reply
Accepted solutions (1)
571 Views
7 Replies
Replies (7)

engineguy
Mentor
Mentor

@witawat57 

 

The G Code is correct, the line of code G28 G91 Z0 is a command to send the CNC to the Machine Z Zero which is usually set to the highest point of the Z Axis travel.

 

If this command is sending the CNC to the Part Z Zero usually the top of the Stock then the CNC has been wrongly set at the control, this is not a Fusion issue, there are 2 Z Zero positions on a CNC machine, one is the Machine Z Zero and the other is the Part Z Zero, if they are set correctly then in actual fact the G28 G91 Z0 is a Safe position which is either the maximum travel of the Z Axis or a Z Axis position that has been set as the CNC Machine Z Zero by "jogging" to a desired position and setting it as the Z Zero position.

This is the correct way to have a CNC setup 🙂

 

However I have read that the grbl control software has a "safe" Clearance setting that the user can set to whatever is desired, so at the "point of posting" in Fusion you can turn off the G28 G91 Z0 command by deselcting it as shown in the image below, as you can see there is a warning that the safe position must be manually set.

Time to read the manual again maybe ?? 🙂 🙂

 

GRBL Safe Retracts.jpg

 

0 Likes

witawat57
Advocate
Advocate

yes, but can setting up z+5mm on move on first point and end process ?

fusion360-cnc1.gif

0 Likes

engineguy
Mentor
Mentor

@witawat57 

 

If you set a "Safe Clearance" height at the control then that is the first and last position that the CNC will move to, after going to that position it will then use the Z heights that you set under the "Heights" tab in Fusion.

 

For example if you set a "Safe Clearance" in grbl of say 20mm then you would set your "Retract" and "Clearance" values to less than 20mm, the "Feed Height", "Retract Height" and "Clearance Height" settings in Fusion ar added together and are the Z value that appears on for example a G43 Z20 H01 line of your code.

 

So, it would be possible for you to set a "Safe Clearance" height in grbl of say 10mm you might see the CNC go first to your 10mm grbl "Safe Height" and then go to the Z20 to the total clearance value set in Fusion and then to say the "Retract" value of Z5 in the G code.

 

Doesn`t really matter, it will just mean your CNC looks like it is making funny moves going to a position and then going up and coming back down again, but if you set grbl to 10mm "Safe Clearance" and then in Fusion all you need to do is have the total "Clearance" value to be the same or less than you set "Safe Clearance" value.

 

Either use the above method or set the CNC up correctly and use the G28 method, this will send the CNC up to it`s highest point first, then move down to the G43 Z** height, then to Retract height and then Feed height.

 

The choice is yours, go grab a "cold one", the Manual and sit in the sun for a while 🙂 🙂 🙂

0 Likes

witawat57
Advocate
Advocate

this simple CNC test i config

witawat57_0-1665233844308.png

witawat57_1-1665233886735.png

witawat57_2-1665233915705.png

 

witawat57_3-1665233945320.png

witawat57_4-1665233955879.png

 

witawat57_5-1665233999800.png

in gcode i select safe retracts Clearnce Height

witawat57_6-1665234021561.png

in simulate fusion is ok

witawat57_0-1665234458281.png

but on real run

why but on simulate start point at x0 y0 z0 and move to clearance Height

i miss config for setting start x0 y0 z0 and move z Height = clearance Height and move to point clearance Height ?

witawat57_8-1665234345322.png

i need config like

witawat57_7-1665234305939.png

 

Is there a way to set it up?

 

thankyou

0 Likes

witawat57UEWAA
Community Visitor
Community Visitor
ok i check need probe config for z 0
0 Likes

engineguy
Mentor
Mentor
Accepted solution

@witawat57UEWAA 

@witawat57 

 

OK, yes, please check your settings at the CNC, I am sure that is where your issue is.

I have done a Screencast that may help show how things are done in Fusion, from your images it looks like you are doing it correctly in Fusion so if you don`t find the Screencast useful then just don`t use it.

I have attached the Fusion f3d file that I created and also the Post Processor used and the G Code shown in the Screencast, hope some of it is of some help 🙂 🙂

Fusion Settings Example.jpg

 

The Screencast is taking quite a long time to generate so I will Post this and the Post the Screencast when it is ready 🙂

1 Like

engineguy
Mentor
Mentor

@witawat57 

@witawat57UEWAA 

 

Screencast is finally ready, you probably don`t need it but may be of some use to you in the future 🙂 🙂

 

Screencast Link :   https://autode.sk/3MfjjSP

0 Likes