Go Down

Topic: Controlling an Arduino controlling a CNC (Read 1 time) previous topic - next topic

Railroader

You are surely rigth.
Following Your advice, File, Example, Grbl gives me the file I showed at #4. It only contains
Code: [Select]

#include grbl.h


That was turned down by a previous Forum guy.

I have not even seen a grblUpload.ino file at all. Config.h? I don't recall ever seen or working in it.


Railroader

You are sure right. This is not my home street.
Following Your advice, File, Examples, Grbl I get a file that only contains: #include grblupload. Nothing else. Look att my post #4.

I have not modofied, not even seen any .ino file. Config.h? I don't recall seing it either.

groundFungus

Quote
That was turned down by a previous Forum guy.
This is a rare case where the rule is broken.  Once you have grblUpload in the IDE, just click on upload to install grbl.

If you go to the libraries folder in the sketchbook (where your sketches are saved (usually ..documrnts\arduino\libraries) there shoud be a grbl folder.  The config.h file is in that folder.  There is also an Examples folder.  That is where grblUpload.ino shoud be.

Railroader

Thanks a lot gF!
My sketches are saved in Dokuments\Arduino folder.

In Documents\Arduino\libraries\grbl I see a config.h and a numeber of .h and .c files.
In Dokuments\Arduinolibraries\grbl\examples i find the grblupload that opens Arduino IDE and loads the grbl.h.
Compiles and downloads without erors. 3 backwards questionmarks appear in Serial Monitor.

Have I understood and done the rigth, prepared the UNO for receiving G-code now?

groundFungus

#19
Sep 25, 2018, 01:45 am Last Edit: Sep 25, 2018, 01:45 am by groundFungus
Make sure that the serial monitor baud rate is set to 115200.  When grbl starts you should see a message in serial monitor with the grbl version number.  If grblUpload uploaded without errors or warnings, aside from the low memory warning, it should be ready to go.

Railroader

Thanks again, thanks a lot gF.
I have been searching for setting the baudrate of the USB 115200. I found it somewhere some time ago but now I don't.

Can I ask another question? Will it be possible to send single G-code commands using serial monitor?
Some day coming soon I'll need to find a G-code sender but in order to test, will S M work?
I have steppers and stepper drivers, both via shields and via direct connection to the drivers to the UNO.


groundFungus

#21
Sep 25, 2018, 03:20 am Last Edit: Sep 25, 2018, 03:20 am by groundFungus
To set the serial monitor baud rate:




Quote
Will it be possible to send single G-code commands using serial monitor?
Yes.

Quote
Some day coming soon I'll need to find a G-code sender but in order to test, will S M work?
Yes.

Railroader

Thanks, thanks and thanks again gF!

I read from Your answer: To set the serial monitor baud rate: Below that I see a square with a cross in it. My Pc/Windows is also lost…..

Haha, down in the Serial Monitor window. I knew I had seen it..... That was too close for me.….

Thanks for today. High time to get pillowed. 3.40 AM here..



Northof49

#23
Oct 26, 2018, 08:01 pm Last Edit: Oct 26, 2018, 08:03 pm by Northof49
GRBL works great, and I have used it to control my robot arm, but its so complicated, that if it needs modification, such as to process Inverse Kinematics for a robot arm, you would have to really know what you are doing to modify it.

Anyone know grbl well enough to know if there is a way to modify the files so that a module I have built that does inverse kinematics, ie converting from x,y,z to the modified distances to take into account robot arm geometry, can be fit into grbl, so that before it sends the messages to the steppers, the messages are processed through my sketch to take into account the inverse kinematics required for a robot arm?

Railroader

Thanks Northof49.
Running a robot moving in 3 dimensions sounds like much more complicated then handling a CNC in mostly 2, only sometimes in 2 1/2 and rarely in 3 dimensions. GRBL has similarities to HPGL, something I made quite lowlevel work in a long time ago.

Northof49

#25
Oct 26, 2018, 10:46 pm Last Edit: Oct 26, 2018, 10:48 pm by Northof49
Can you point towards any references that might tell me what format the G Code CNC instruction are in when sent to GRBL?  I'm wondering what structure they are in, how the flow of serial info is called for and controlled by grbl.

Perhaps one of the programs that is used to feed G code to grbl could feed the code to my robot arm, which will then translate its movement commands, apply inverse kinematics, and move the robot arm accordingly.

Railroader

G-code is quite well defined. Google "G Code"! I am still working on the part of sending G-code into my CNC so I can't say. Grbl is another field I am yet comfortable with. I'm surpriced about the jungle. It looks like computer works 30 years ago, fixing and manipulating instead of a straight line.....

Northof49

#27
Oct 27, 2018, 06:13 pm Last Edit: Oct 27, 2018, 06:14 pm by Northof49
I found some good information on how grbl communicates with the outside world.  There are actually several different communication protocols.  One of the simplest is that grbl sends an ok outwards, signalling the source to send another line of Gcode followed by carriage return.  If there is a problem, grbl sends an error code, otherwise when its ready for another line of code, it sends OK.


Interfacing with grbl:  https://github.com/grbl/grbl/wiki/Interfacing-with-Grbl


It's not that I am necessarily interest in using grbl, but I would like to use one of the programs that have been written to process a Gcode file and send it to grbl, but instead have it communicate with my robot arm.

Railroader

I followed Your link but I got lost. There are to many posibilities… So faar I have no G-code generator and no code written so I can manage. Testing is done by either writing sketches stepping the motors, or use Estlcam to controll the steppers.
I see Your interest in this matter, controlling a robotic arm.

Go Up