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
Solved! Go to Solution.
Solved by engineguy. Go to Solution.
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 ?? 🙂 🙂
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 🙂 🙂 🙂
this simple CNC test i config
in gcode i select safe retracts Clearnce Height
in simulate fusion is ok
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 ?
i need config like
Is there a way to set it up?
thankyou
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 🙂 🙂
The Screencast is taking quite a long time to generate so I will Post this and the Post the Screencast when it is ready 🙂
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
Can't find what you're looking for? Ask the community or share your knowledge.