winder / Universal-G-Code-Sender

A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.
http://winder.github.io/ugs_website/
GNU General Public License v3.0
1.9k stars 766 forks source link

Simulator #167

Closed Mgilbride closed 8 years ago

Mgilbride commented 10 years ago

I have mentioned some version of this before. Testing grbl can get a bit hard on your machine. Would be very useful to visualize machine jogging and homing moves. Ability to very simply represent your particular machine's bed size, depth, x, y, and z axes, hard limits and soft limits. Plug in an arduino with grbl and you have a great testing environment. Not all easy to do.

Mgilbride commented 10 years ago

An interesting part of the puzzle. Can we port grbl output into the three inputs for the knobs?Probably need two arduinos to handle this?

https://www.youtube.com/watch?v=IQbkpALAaXg

and

http://stackoverflow.com/questions/23637326/arduino-cad-simulation-in-real-time

Mgilbride commented 10 years ago

Ok. I have something working using the tool chain implied above. I have a way to go. But we can rig up a CAD based simulator to allow benchtop testing of firmware behavior. Somewhat independent of microcontroller platform as long as you can read pin states. But am working with Arduino.

Unfortunately what I am playing with needs two arduinos. One runs Grbl. One reads pin outputs from grbl board and interfaces with cad environment. Pin outputs translate into movement of cad model.

Major problem I face is being able to read data at microsecond intervals and accurately capturing grbl output. Once that's figured out should be able to demo the whole setup.

Software side is run UGS to jog machine / run programs. Read grbl output into cad environment see machine behavior in CAD. See UGS behavior in UGS.

Eventually you could streamline this into UGS i think.

Short video with bad audio linked below.

http://www.filedropper.com/cncsim2

Tool chain: UGS > Grbl > Firefly > Grasshopper > Rhino 3D

Easier to set up than it sounds. Nice intuitive visual programming gui that works with C, python, VB, and more I think. You can download the paid tools as free demos. The only thing that costs $$ is the hardware and Rhino. Image below shows the main gui used to glue it all together. I love this quick and dirty prototyping stuff!!

image

winder commented 9 years ago

Better late than never... is this something that @jgeisler's grbl-sim project would help with?

Mgilbride commented 9 years ago

Close but not exactly the same thing / goal. Was aiming at real time hardware / firmware testing by running a grbl loaded aduino- and reading outputs back into simulator environment rather than plugging it into hardware. Obviously not critical. Thanks for following up. On Feb 19, 2015 4:44 PM, "Will Winder" notifications@github.com wrote:

Better late than never... is this something that @jgeisler https://github.com/jgeisler's grbl-sim project would help with?

— Reply to this email directly or view it on GitHub https://github.com/winder/Universal-G-Code-Sender/issues/167#issuecomment-75143286 .

winder commented 8 years ago

I don't see myself implementing this. In the UGS Platform project there is a plugin system which might make sense for things like this in the future.