Multiple Machines

Home Evil Mad Scientist Forums Egg-Bot Multiple Machines

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #20325
    RayT
    Participant

    I probably know the answer to this but will ask anyway.  Is there anyway to control multiple bots from one computer running different plots?

    Ray
    #21700
    ragstian
    Participant

    Hi.

    Interesting question.
    I have just tried this on a Windows7 system and it works like a charm!
    The difficult part is to know which plot goes to which bot!
    (If you plot the same design to the same media it would not matter.)

    Some methods to get the right plot to the right bot;
    For the example let’s call the bots Bot_1 and Bot_2, the Inkscape “instances” will be called “Inkscape_1” and “Inkscape_2”. The intention is to have Inkscape_1 plot to Bot_1 and Inkscape_2 plot to Bot_2.

    By having only Bot_1 plugged in and starting the plot from Inkscape_1 starts the first plot to Bot_1.
    Then plugg in the Bot_2 and start Inkscape_2 by clicking on the SVG file you want to plot. This starts another “instance” of Inkscape. By starting the plot from Inkscape_2 before Bot_1 finishes will get the correct plot to Bot_2.

    Another method is to have the first bot on the lowest number USB port as the eggbot extension polls from a list of available ports starting with the lowest number, once it finds an EBB board it starts sending commands. (Windows will then “lock” this port until it’s no longer used or “closed” in “geek” lingo).

    Unfortunately there is no way in the eggbot extension to avoid closing the port when a plot is finished.
    ( By use of a small python program to open the ports and keep them open until ready to plot a more advanced system can be devised,  however with my limited brain capacity and multitasking ability I reckon juggling two bots and two programs might be more than enough ;-) )

    This might work differently on Linux & Mac as the “locking of ports” might work differently.

    When running a standalone program talking to the eggbots the output will look like this with two bots plugged in; (The USB ports will “look like” com ports when the EBB is plugged in.)

    Com ports available on your system; (‘COM1’, ‘COM4’, ‘COM10’)
    testing: COM1 for EBB Board

    testing: COM4 for EBB Board
    Found EBB on port:  COM4
    EBBv13_and_above EB Firmware Version 2.2.3
    Current setting:  569.23mA.   Motor supply voltage: 11.87V.

    Here the two bots are plugged in to COM4 and COM10. Com1 is a “regular” com port. while COM4 and COM10 “comes and goes” as the EBB boards are plugged in or out, one physical USB port will always be listed as COM4 and the other physical USB port always as COM10. By plugging in the bots to different ports other numbers will appear.
    (Please note that it is NOT recommended by EMSL to flash the EBB board with higher versions than 2.0.1 until later versions are verified to be “bug free”)

    Good Luck plotting several eggs at once!

    RGDS
    Ragnar

     

    #21701
    dnewman
    Participant

    1. On Windows this works well as file and device locking is mandatory.  Moreover, the default is to create an exclusive lock when opening an I/O channel to a device.  So, by default other threads and processes cannot concurrently access the device.  On Linux and OS X, file and device locking is 100% advisory.  Any number of threads and processes can open an I/O channel to the same device and concurrently write or read from it.

    2. Several years ago, I actually wrote the necessary Python code for the Eggbot Control extension to do coordinated device locking.  However, I never got around to wiring it in.  If someone is interested, here it is,
    #21702
    ragstian
    Participant

    Hi dnewman

    Clever indeed. Like your comments in the code about the software patent ‘troll”!
    For the multi-bot setup to work on Mac / Linux this will have to be incorporated in the eggbot extension.
    From other threads on this forum I see that the inkscape eggbot extensions are “stripped to the bone” to aid code reliability so this might/might not make it to the “official” code.

    RGDS
    Ragnar

    #21703
    dnewman
    Participant

    For the multi-bot setup to work on Mac / Linux this will have to be incorporated in the eggbot extension.

    Correct.  I just never got around to doing that.  At the time, there was no pressing need for it: Windell and Lenore were the only people likely to be running more than one eggbot at a time and they weren’t in dire need of it.  They did suggest at one point that I go ahead and put it in, but absent any serious need for it, it seemed prudent to myself at least to leave it out — to reduce likelihood of another potential issue.  (E.g., if a new permissions model is introduced and now your lowly, mortal login account needs a permission for locking files. That’s a *real* stretch of the imagination since a lot of established code would break if that were the case.)

    From other threads on this forum I see that the inkscape eggbot extensions are “stripped to the bone” to aid code reliability so this might/might not make it to the “official” code.


    Sure, I was involved with some of that myself.  (You’ll see my name here and there in the various extensions.)  But if there is a legitimate need for this support, I can carve out the time to finish it and then discuss over on the eggbot-dev list, or directly with Windell and Lenore, whether or not to move forward with it.  We could even make it optional via either (1) a UI element [tick box], or (2) by making a file appear which enables it, or (3) something else.

    #21704
    RayT
    Participant

    Thanks for the info guys, I am going to look more into this one.  The question came up yesterday when I was asked to bring the bot to a preschool shindig and do something for each of some 30 kids, only having an hour and a half to complete.  One discussion led to another and we envisioned having a half dozen bots running at once.  Probably the best solution to that would be to have a Pi attached to each one and download a program to each in turn as they become available.  We do have a solution to the immediate problem in that we will have several designs already done and plotted, the kids will then pick an egg they like and we will then plot their name on it so they can see the machine working for them. 

    I downloaded the zip file and will look into it, but I quit coding 35 years ago.  Looks like another learning curve. 
    Ray
    #21705
    ragstian
    Participant

    Hi

    That explains why setting some of the options in the code does not produce the expected result, for instance setting

     bDryRun = True # write the commands to a text file instead of the serial port

    does not redirect the output but causes the extension to fail.
    Does the original code (from before it was stripped) still exist?
    Would be nice to have the option to write to a file in order to make multiple identical plots later using the command line.

    RGDS
    Ragnar

    #21706
    ragstian
    Participant

    Hi RayT

    quote;
    “The question came up yesterday when I was asked to bring the bot to a
    preschool shindig and do something for each of some 30 kids, only having
    an hour and a half to complete.”

    Where are you? I’ll bring my bot and join you!

    RGDS
    Ragnar

    #21707
    RayT
    Participant

    Anderson, IN  probably a long commute but you are welcome to come.

    Ray
    #21708
    ragstian
    Participant

    Hi

    Thanks, just an 18 hour drive!
    I’am on my way!

    RGDS
    Ragnar

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.