Wednesday 26 February 2014

Spherebot UI 2.0

Finally I have finished the version 2.0 of the Spherebot UI. On the first look it may look like version 1.0 but under the hood there has changed a lot. I actually tried to, again, release it as a static build but I just couldn´t get Qt compiling statically. So I just extracted all needed .dlls and copied them in the folder of the .exe file .

-I completely changed the underlying communication library. In 1.0 the used library was the QextSerialPort library but because of some problems I had with it I was only able to get it working when the communication was polling-based. That was not really good because there was a high and unnecessary CPU usage. Now the communication works event-based and is completely implemented with the Qt integrated SerialPort library.

-A new feature is the Multilayer Support. If you want to print on one egg with different Pens/Layers then this is a very handy feature. Just name you .gcode files in this way:
<PictureName>_1.gcode
<PictureName>_2.gcode
<PictureName>_3.gcode
etc.

Load the first layer and start the print. after that you will get a dialog asking you to change the pen and press OK. Then it automatically loads the next layer and starts printing. After the last layer it will ask you whether you want to restart and print the next egg.

-A really nice feature is the persistence of the loaded file and the connected port. So if you connect your bot to the computer and start the program, it will remember that it was connected to this port the last time and automatically connects to it. It will also loads the file that was loaded the last time at start up.

So these were the most important changes I´ve made to it. I hope you ´ll have fun with it ;)



17 comments:

  1. The Spherebot_UI seems to be throwing a error about the QT plateform plugin. This is happening on a windwos 8 machine. Do I need to load in a pluggin as it appears the files are in the Spherebot_UI directory. Thanks.

    ReplyDelete
  2. That´s odd. But I´m sorry, I develop on a Windows 7 machine and have no experience with Win 8. Maybe someone on the Qt-forums can help you with that kind of problem as it seems to be a general Qt-Win8 problem.

    Have you tried to build it from source on your machine?

    ReplyDelete
  3. "This could be due to a missing subfolder/dll "platforms/qwindows.dll"
    in the Spherebot_UI/bin directory.
    It is discussed here: http://qt-project.org/forums/viewthread/23367
    Could you please add this to your archive?

    ReplyDelete
  4. Thanks for the hint Michael.
    I added the folder to the archive. Does it work now?

    ReplyDelete
  5. Thanks for your quick response :)
    There is still an error message but it now differs and says:"this application fails to start because
    it could not find or load the QT platform plugin "windows". Availiable platform plugins are: minimal, offscreen, windows."
    This does not make much sense to me and I found another hint which
    says, that there might be missing a libEGL.dll and/or libGLESv2.dll.
    The issue is discussed here:
    http://falsinsoft.blogspot.de/2013/09/qt-5-and-failed-to-load-platform-plugin.html

    ReplyDelete
  6. I finally tested it on WIN7, WIN8 and Linux/Wine and on all platforms it
    ends up
    with the identical error previously posted. I suggest that there might
    be still missing
    something and/or perhaps some QT precompiling config needs to be
    adjusted on your side.
    Could it be that it just runs on your development environment because it
    can pickup the
    needed stuff from somewhere else? Maybe dependency walker could tell..
    Anyway, I would really like to use your interface and I hope that you
    can figure it out.
    Cheers

    ReplyDelete
  7. What´s funny is that you have problems also with Win7, cause I develop on Win7 and also outside of the build environment it works fine. Do you use 32 or 64 Bit version of your OS? Because I compiled it on a 32 Bit machine.

    One fix that works in all cases is to build it on your own which is not very hard to do:
    -download the latest Version of Qt Creator and install it
    -open the .pro file of the project and build it

    then you can run it either directly from Qt-Creator or you copy all the needed dlls to the directory of your built .exe and run the executable directly.

    In the last version of the GUI I built it statically so that there were no hassle with dlls and that stuff, but therefore it is necessary to build Qt itself statically, which is not so easy, and I wasn´t able to do it with versions later than Qt 5.x so I wasn´t able to do it this time.

    ReplyDelete
  8. Good time. I downloaded your program, but unfortunately they did not start on my computer. But after much research and experimentation, I found that not all platforms folder files to run the program. Then I added files qminimal.dll, qminimald.dll, qoffscreen.dll, qoffscreend.dll, qwindows.dll, qwindowsd.dll folder with installed Qt (added to the replacement of files that were in your assembly). After this application to run. While the work is not checked, as it is necessary to recompile the firmware to Arduino Uno. After that I can fully check everything. Thank you very much for the wonderful program. Sorry for the English working through a translator.

    ReplyDelete
  9. I got it finally running. The last missing part is qwindowsd.dll
    (13.9Mb) in the platforms folder.
    I tried to compile it by my own but it refused finishing because of this
    error:
    /Spherebot-Host-GUI-master/Spherebot_UI/mainwindow.cpp:198: error:
    'removeComments' was not declared in this scope
    Many thanks so far, I will drop you a line once the whole bot is running.

    ReplyDelete
  10. great to hear that it works for you now.
    I added the dll to the repository and updated the code so no compile error should be thrown any more.

    ReplyDelete
  11. Hey first of all thanks for making this great gui it works extremely well. I am having a problem that my not be from your sender or firmware but I was hoping you could help identify it. The plotter makes spikes half way accross the egg in the middle of a plot. It does this more often with more complex plots. I open the .svg in the provided inkscape portable, scale it to my template, save as unicorn .gcode, load the file in the GUI and press send file. I have gotten some simple plots like straight lines to work perfectly but I get this problem quite often. It seems to me that the problem would be with Unicorn, but I cant find anybody else with this problem. I tried using another computer and tried installing full inkscape and installing Unicorn extension manually but this gave the same result. Just hoping you might have an idea. Thanks for your time.

    ReplyDelete
  12. I know that problem. I also had some prints with these spikes, but sadly I don´t know where they come from. I plan to look for the reason when I have more time again.

    Maybe the communication is too fast and some of the transmissions are false ( there is no error checking ). But It would be odd if always the coordinates were transmitted wrong.

    The only other possible explanation would be that really unicorn produces wrong coordinates sometimes.
    I plan to integrate a gcode analyser in the gui ( which draws the gcode virtually on a canvas ) that would make it obvious if .gcode files are corrupted in that way, but haven´t finished it yet.

    are the mistakes repeatable? -> then it´s the file

    if not the problem is somewhere else

    ReplyDelete
  13. Ok I have tried printing the same complex egg twice at a slower send rate and get simmilar but different errors. the spikes on both eggs lead to the same area but begin at different coordinates. So i will try using a different usb cable and try using an even slower send rate and maybe even try a different computer for sending since before i only used a different computer for generating gcode. Thanks for your help and fast reply.

    ReplyDelete
  14. maybe it would be an idea to turn on the echo of the arduino, write the output to a file and make a comparison with the sent file.

    I turned the echo off at higher baudrates, cause it was too much for the arduino.

    ReplyDelete
  15. I moved the last posts to a github issue just to have a common place to collect the known bugs

    ReplyDelete
  16. Hello, thanks for sharing your software. I have the bot working, but my pen goes too fast down. Where can I reduce the speed for the pen.
    Thanks!

    ReplyDelete