fra589 / grbl-Mega-5X

5/6 Axis version of Grbl, the open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/fra589/grbl-Mega-5X/wiki
Other
344 stars 161 forks source link

Homing G28 and #H #114

Closed kikirikiki closed 4 years ago

kikirikiki commented 4 years ago

Hi, my machine is working perfect but when I send a g-code with a raspberry pi, I don´t know what I have to write in the G-Code to unlock the grbl. With Windows and Universal Gcode Sender works with #H but without the GUI of Universal Gcode Sender, I can not start it. What I have to write in the gcode to unlock the machine? Another thing that I would like to change is the behavior with G28. The machine goes to the start point after homing but it do not touch the end stop. What I have to write in the gcode to do a proper homing? Thanks a lot!

fra589 commented 4 years ago

https://github.com/fra589/grbl-Mega-5X/wiki https://github.com/gnea/grbl/wiki And for more general infos: http://linuxcnc.org/docs/html/index.html

kikirikiki commented 4 years ago

Thank you very much. I´ve read this documents and I can not unlock the GRBL without the GUI in Windows. I can not send a file.gcode direct from my Raspberry Pi automatically without clicking the $H buttom or send the $H command in this GUI. I can not send a "Homing.gcode" with an $H inside, GRBL doesn't recognize this command. Thanks!

fra589 commented 4 years ago

It seems you don't have read the full documentation... (many links on the right inside the original Grbl wiki page $H is not a GCode order, it's a Grbl system command like $X or many other. Those commandes don't have to be inside a GCode file.

direct from my Raspberry Pi

??? You don't use a Grbl interface program on your Pi? It is magic! how do you do send your GCode file without an interface program?

kikirikiki commented 4 years ago

Sorry, but I have read this documents and I tried to send a $H command with a gcode file through Windows GUI and I get the same error 79109969-bdf9c900-7d79-11ea-9ef9-99e5b12b86e9.

How could I disable the file streaming lock without sending the $X command in Universal Gcode Sender? Thanks

fra589 commented 4 years ago

Sorry, but I have read this documents

So, as you can read the answer to your question is here: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration#22---homing-cycle-boolean:

(...) Also, one more thing to note, when homing is enabled. Grbl will lock out all G-code commands until you perform a homing cycle. Meaning no axes motions, unless the lock is disabled ($X) but more on that later. Most, if not all CNC controllers, do something similar, as it is mostly a safety feature to prevent users from making a positioning mistake, which is very easy to do and be saddened when a mistake ruins a part. If you find this annoying or find any weird bugs, please let us know and we'll try to work on it so everyone is happy. :)

NOTE: Check out config.h for more homing options for advanced users. You can disable the homing lockout at startup, configure which axes move first during a homing cycle and in what order, and more.

Your problem is not a Grbl or file streaming problem.

It is your Windows interface tool that is programmed not to start streaming while Grbl is in Alarm mode.

This alarm mode is normal and desirable for safety reasons when the power is turned on. I do not recommend disabling it, but as it is written in the documentation, it is possible... Read the documentation.