-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any working GUI / graphical user-interface / g-code-sender for g2core? #342
Comments
Yeah, I hit the same problems. Actually wrote my own super basic (non-graphical) g-code sender, which literally just dumps a file straight to the g2core tty/com port. With very basic setup / initialisation at the start: https://github.com/justinclift/g2sender Doesn't yet accept any keyboard input. So, no feed hold, no pause, no resume. (!) It's written in Go, which means it's pretty easy to understand compared to (say) C++ or more complex languages. It's also easily cross platform (tested on CentOS 7.x, and Win 7). Not sure if it'll be suitable for you though. I just needed something for quick testing, and this does the job for now. I do plan to make it a bit nicer to use (prob use a state machine and also do some ncurses stuff), but not really wanting to spend huge time on it. 😄 |
Oh, have you taken a look at this yet? https://github.com/synthetos/node-g2core-api That might be useful. From (dodgy) memory, when I tried it out it only "kind of" worked, thus my writing the super basic g2sender thing. But you may have more luck. 😄 |
Shopbot actually uses this:
http://gofabmo.org/
Its supposed to be geared towards smart machines so you can adjust it to
fit your needs.
Riley
|
Interesting. From a cursory look it seems a bit complicted to setup. But, haven't gone through the process to actually try it out yet. Might turn out to be simple and work perfectly. 😄 |
I've now written a small text-mode-tool (incl. feedhold and mini-terminal) in Python. It works, and I've found some unexpected behaviour of g2core (see other issues). node-g2core-api does not really help, since afaik it's only a "enhanced terminal", but not a g-code-sender. gofabmo looks interesting, but seems to be tailored to their hardware. I got it running, but then it told me to "press the green button for some seconds"... |
node-g2core-api has a binary utility 'g2' in it if installed globally. It follows the line mode (and is what we use to formulate and test line-mode).
It needs some updating, but works well in node 6. (NPM throws some interesting but ignorable warnings when installing.)
It works to send files as well as act as in interactive terminal. I use it for both extensively.
…-Rob
On Apr 26, 2018, at 4:53 PM, Roland Koebler ***@***.***> wrote:
I've now written a small text-mode-tool (incl. feedhold and mini-terminal) in Python. It works, and I've found some unexpected behaviour of g2core (see other issues).
(I'll probably extend my tool by ncurses and/or GTK+ in the future.)
node-g2core-api does not really help, since afaik it's only a "enhanced terminal", but not a g-code-sender.
gofabmo looks interesting, but seems to be tailored to their hardware. I got it running, but then it told me to "press the green button for some seconds"...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#342 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAXj0dHxTd9widAw3-6U7DqsFfzbA2PEks5tskG_gaJpZM4TkRgb>.
|
Cool. Did you chuck it up on GitHub? Yep, that's me wanting to be lazy as having to make my own gcode sender isn't really a personal goal. 😀 So, if I can just use yours and it works "well enough" without having to continue mine, I'd consider that a (personal) win. 😉
Pretty sure I tried that early on, but hit issues. I'll give it another shot in the near future and see if it was just my newbie-ness at the time or if it was something else. 😄 There was one non-critical warning message, but that's not a biggie. |
Yes, I will publish my g-code-sender. It already works pretty well. 😄 It does not yet have a nice graphical user-interface; it's just some kind of enhanced serial console which runs in a Linux-terminal. But you can run g-code-programs, use feedhold/resume/flush and directly communicate with g2core for everything else. It also periodically displays the current machine-state, the currently executed g-code-line and the current coordinates/feed/velocity, and it stops at M0 and shows (msg) to the user. 😃 |
Thanks rkoe for testing so many software. I would love to see some GUI solution for a Windows machine that doesn't involve some tweaking to get it to work. |
Awesome. 😄 Would it be feasible to have some kind of "initialisation code" that gets sent to the g2core board automatically when the connection is made? eg sending the various tuning parameters, so people don't have to compile their own firmware That would nicely complement #340 (which I'll probably manually upload initial .elf/bin files for today). This would let people download a working .elf/.bin file from the Releases page, flash their firmware with it, and also have a working G-code sender program which they can store their settings in. No need to compile anything. |
Yes, of course. I've planned a machine-config-file. Note that some GUIs already do this: In cnc.js you can define a macro for this, and I think goko (or UGS?) has a config-dialog. |
In the g2 utility that’s in node-g2core-api you can use the -i option to
send a JSON file of configs to the board on connection.
…On Sat, Apr 28, 2018 at 1:19 PM Roland Koebler ***@***.***> wrote:
Would it be feasible to have some kind of "initialisation code" that gets
sent to the g2core board automatically when the connection is made?
Yes, of course. I've planned a machine-config-file.
Note that some GUIs already do this: In cnc.js you can define a macro for
this, and I think goko (or UGS?) has a config-dialog.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#342 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAXj0X-wzkLSFqLxkUQwlr9eQqoaJxx-ks5ttLK9gaJpZM4TkRgb>
.
|
Awesome. 😄 |
@rkoe said: As a Handibot/FabMo user I can attest that FabMo is indeed a great GUI. Although it was developed for Shopbot Tools hardware, it’s highly customizable. The main development has been on Edison, but it can run on other hardware/OS. As a matter of fact, I have it running on a Raspberry Pi. |
Ahhh. Is there something I can look at to see what the connections for the FabMo needs to be? With that info, I can probably help you out with this. For example, looking at the Ardunio Due pinout (when compiled with the gShield settings), there are some initial basic bits:
Note - I've only gotten around to hooking up 4 motors so far, so I haven't yet tried out bits for motors 5 and 6. For the limit switches:
There are pins for other things (eg microstepping, motor enable, A/B/C Min&Max's, coolant on). I haven't personally needed those (yet), but you should be able to figure them out from the diagram. Does that help? 😄 |
Thinking about it more... the above might only be useful if you're wanting to wire things into the Due pin headers yourself. If you're wanting to adjust the g2core pin configuration to match the hardware you have, that's do-able too. It just means you'll need to change the pinout mapping before compiling. Probably the simplest way (from memory) is to change them directly in your copy of the file here: https://github.com/synthetos/g2/blob/edge/g2core/board/ArduinoDue/gShield-pinout.h ... without changing the filename or anything, so that when you compile for the gShield it'll pick up your changed settings. Once you've experimented with that and gotten the hang of things, you'll be in a good position to read the various wiki pages explaining how to create your own proper board definitions. 😄 eg: |
@justinclift thank you very much for your comments and recommendations.
m1step C28 3 B25 2 m1dir B23 x C25 5 As the table shows, in the actual sbv300-pinout.h the ports for the m1dir and m2dir don’t even show in the Due. So except for the m3step, all the other definitions must be changed to fit the Due/gShield pinout. |
Sorry for the miss alignment on the table. I wasn’t able to correct them. |
No worries. GitHub's version of markdown is useful for simple tables, but can't really do much more than that. Not your fault. With the pin assignment bits, I'll try to grok this tomorrow. I'm brain fried atm after getting some other things taken care of, so not capable of absorbing new info atm. 🙄 |
Looking at the wiki page which covers motate pins and how they map to a physical board, it sounds like you'd just need to update the pin definitions in sbv300-pinout.h, and don't need to touch the motate_pin_assignments.h file. The wording in that wiki page could be clearer though. Looking at your tables, I think you have the right idea already. So, it'd be something along the lines of this:
Same as your table. That's my initial guess anyway. Does that help? 😄 |
Hmmm, the mention of FabMo engine being tied to specific g2core revisions could make things tricky. That might need some investigation to find out what the expected version is, and wind the repo source back to that specific one. Shouldn't be too hard to find out... maybe just ask @ryansturmer or create an issue on the FabMo Engine page to ask there? 😄 |
@yck011522 If you're still looking for a solution, I've been using the downloadable windows app version of CNCjs recently, with the That was on a Windows 7 64-bit computer though. Not sure which version of Windows you're using. 😉 |
Thank you very much Justin. I'll give it a try in my next project. -V
|
You're welcome. 😄 |
@justinclift |
Awesome. Hopefully we're on the right track. 😄 |
@justinclift |
Muaaa Haaaa Haaaa! That's really excellent. Cool! 😄 |
@rkoe As data point stuff, with CNCjs I've not seen the slowness in operation so far personally. Only been using it for a few weeks on and off though, so I'm not yet an in-depth user. My usage of it has been on two systems so far:
On the windows desktop I was using the Win7 downloadable app from the CNCjs release page. On the CentOS desktop I think it was installed via npm. (not remembering off hand) |
@justinclift
I have done many trials and I found the behavior of the Due somewhat random. I’m sure that I was able to load a firmware with FabMo sometime but I have been uncapable of reproduce it. |
When you erase the Due it starts booting from the loader in ROM, which will
not respond with anything resembling g2core protocol, and will always only
expose a single port.
|
Ok thanks! So how can I get two ports exposed? |
The "two ports exposed" thing sounds familar:
Note that I haven't yet read back this thread, and probably won't have time to for a few days as I'm urgently focused on solving a problem for a different project (different headspace completely). |
Ahhh, found what I think is the matching info text for that in the wiki too (last two paragraphs):
|
FYI that is a compile time option so you would need to build 2 port support
vs being a real time configurable option.
|
thanks @justinclift and @ril3y . for gShield I would guess the file used is settings_default.h and has the same instruction: Does any one know if the Tiny G2 version 0.98 firmware build 87.01, was compiled with the above option set to 2 ? The version https://github.com/synthetos/g2/releases/download/101.02/g2core-gShield-101.02.bin released recently only exposes one port /dev/ACM0 so I would say was it was complied with a setting of 1 as shown in the settings_default commented above. Am I correct? |
Yep that 101.02 version of g2core-gShield was definitely compiled with the setting of 1. Literally from this line: g2/g2core/settings/settings_default.h Line 147 in 51f93aa
Saying that because - for now - we don't have a specific settings file for the gShield, instead leaving it to use the defaults (in settings_default.h) as you guessed. I'm not sure about the 0.98 firmware though. That was way before my time (I'm new here). 😄 |
Thinking about it more... there's a decent chance the settings used for the ShopBot builds will be in a GitHub repo forked from this one. So, scanning quickly through the fork list here might be useful: https://github.com/synthetos/g2/network/members There are 3 forks for FabMo bits there, so I'd probably poke around in those and see if anything in there looks useful. 😄 |
@msepulve How feasible would it be to ask the ShotBot people if they have their config handy? Just thinking this might all be solvable with a simple email. 😄 |
@justinclift |
Version 0.87? I’m not sure what that would be. Do you perhaps mean 87.x?
FabMo current will work with edge, and AFAIK is tested against it.
FabMo stores it’s setting in a file. For example:
https://github.com/FabMo/FabMo-Engine/blob/master/profiles/default/config/g2.json
That is sent upon connection. You would need to switch profiles for your
machine. Most likely your compiling in your settings and won’t need that
file to contain anything but {}.
|
I can’t find the docs for FabMo profiles (such as how to install them) but
each machine has a different one. Here’s a handibot one:
https://github.com/FabMo/fabmo-profile-handibot-2
|
@giseburt |
Hmmm, is it feasible to try editing the engine.json file it's using? If so, I'd (after making a backup) point both |
@justinclift thanks for your recommendation, but at this point I think the problem is more related to the ideosincrtic behavior of the Due than anything else, as more often than not, the serial ports appear closed or non-existent for FabMo. Other firmwares (now even the original g2.bin) loaded to the Arduino with bossac, will expose only ACM0 and FabMo will generate messages like the following: Add to this that the same messages are generated by FabMo when Due is not connected at all. So, in my assessment, something/someone blocked the USB and or /dev/ACM0 so it doesn’t allow FabMo to read/write to that port. I also noticed that in this state, with the Due connected to Chilipeppr (via serial-port-json-server) I’m not able to upload firmware with Chilipeppr’s Arduino/Atmel programmer. |
I just emailed @ryansturmer to see if he could chime in here. He has developed much of fabmo. However he does not work for us :) So any help he can provide would be greatly appreciated. |
Good thinking @ril3y. 😄 |
Thanks @ril3y |
@rkoe |
Thanks @justinclift! I followed your recommendation above (about modifying the engine.json file of FabMo) and I now have a working GUI to control a CNC with G2. |
Oooohhhh Ahhhhhhhh. That sounds pretty positive. 😄 |
As another data point (sorry, came to this thread late), my setup has CNC.js running in a Docker container on a Raspberry Pi, connected to the Due Programming USB port (the fast one). I don't run OpenGL on the Pi, so I don't get the 3d visualizer when I run the UI in Chromium on the Pi itself (i.e. http://localhost). In its place I get a list of the G-code steps which updates in realtime to show the current step that is running. When I need the visualizer, I run the UI in Chrome on a Macbook. CNC.js is still running on the Pi, it's just the web UI that is running on the laptop. All network connections are over wifi. Either way, I don't see the slowness that @rkoe reports. Response time is fine, no delays that I've noticed. Jogging using the keyboard is responsive. Same with loading and running gcode. Happy to share anything about my environment if that would help. |
Thanks @scotthz it looks like CNC.js is in use by several people, which should mean it's a decent initial "go to" solution after all. 😄 As a curiosity thought, are you using your setup for something we could add to the "Who uses g2core?" page? 😄 |
Hi @justinclift FWIW I just uploaded my raspberry-pi/cncjs docker image, in case anyone is interested in looking at that. I'm strictly a hobbyist and don't think I have anything particularly innovative to share. But thanks for asking. My day job is in IoT and devops, my main interest here is in woodworking, and I sized my DIY machine to cut chair parts and joinery (don't have the room for a 4x8 machine). |
Heh Heh Heh Chair parts and joinery is pretty nifty. I'm still on a standard size Shapeoko 3 (~35x30cm practical cut area), modified to use g2core instead of the default GRBL of course. 😄 |
Hello @rkoe Sorry to dig up an old topic, but I'm the maintainer of Goko. I haven't been able to work on it since a long time (life, work, etc...). I see you're complaining about software not working. This kind of thing can happen. AFAIK those projects are free and maintained by developpers like me that use their free time to do it. That's the problem with open source software these days. People expect them to be free and perfectly operationnal with no involvement from them. I'm sorry but that has to be said. I would be happy to help and improve Goko for G2. So please, fill issues on the Goko repo. |
If you need anything from us (hardware g2core boards etc) let us know.
Thanks we understand how life catches up.
Riley
|
Thanks to the last couple comments above, this issue popped up again in my inbox. cnc.js has been the most consistently usable solution for me. I don't love it, but for me and my g2core-based machine, it works better than the other things I've tried. I run it in a docker container on a raspberry pi. @rkoe let me know if you want to know any more about this solution. Coincidentally, I just started looking at Goko. Had an issue getting started but seem to be past that and hope to move forward in the coming days. I also have a fairly usable FabMo setup working. This is on raspberry pi, with g2core on an Arduino Due, running a scratch-built machine with external motor drivers (ST-M5045). It doesn't try to flash g2core and only requires /dev/ttyACM0 (i.e. doesn't need /dev/ttyACM1). I like it for the ability to use OpenSBP instead of G-code. On the other hand, the FabMo paradigm can be a little confusing. It doesn't expose separate machine vs user coordinate systems in a way that is intuitive (to me). So I often fall back to using cnc.js. But so far as working as designed, I think I've reached that with FabMo. Just haven't taken the time to immerse myself in FabMo deeply enough for it to feel "second-nature". Would be happy to share if that would be of use to anyone. |
i would love to see your setup. a wiki page on g2 would be even better!
|
Is there any working GUI / graphical user-iterface / g-code-sender for g2core on Arduino DUE?
I've tested several, but all failed:
cnc.js: Looks good, but is very slow; when gcode runs, the browser-interface uses 100% cpu, but the display is rarely updated (e.g. the shown position is only updated every 10-30s or so, and usually much behind the machine), and feedholds are delayed up to e.g. 7 seconds (!). So, I can load and start some gcode, but when the gcode runs, no sensible data is displayed and I can't operate the machine.
Goko: Needs Java 8 to offer g2core-support (otherwise it silently doesn't offer g2core-support), the GCode-viewer and -editor are completely broken (=empty), and the whole interface often hangs during gcode execution. Feedhold/resume does not work reliably, the "Pause"-button is usually disabled, and it sometimes also crashes g2core.
UniversalGcodeSender-v2.0.0 / UniversalGcodeSender-v1.0.9 / ugsplatform-2.0.0:
Do not work with g2core.
chilipeppr: Only works with internet-connection (wtf?). Does not support M0, feedhold does not work on arcs, crashes g2core after feedhold-on-arc.
The best way currently is using minicom or python-serial and send the commands manually. :(
The text was updated successfully, but these errors were encountered: