Jump to content
Ultimaker Community of 3D Printing Experts
tmcolby

command_util.py

Recommended Posts

Is there any sort of documentation on this?  Besides the minimal information that lives in the forums.

 

I would rather not spend my time sifting through the source code to determine what I can and cannot do with the utility.  I am particularly interested in how to use the "exec" command.  Also, a different but similar issue, the swagger docs do not seem to be up to date.  For example printer/led is documented, but not printer/led/brightness.  

 

Thanks for any help here..

 

for some additional context:  I do now see if I first "select" a mode, and then do "exec self." and hit tab, I can see a list of exposed functions.

 

I am interested in the printer's self.startProcedure method.  It takes "key" and "parameters" as arguments.

 

Currently, through the API, there is no way to set the loaded material.  I can set it using the command_util.py however.  I am building a smart dry box for my filament.  Since my filament will not be loaded on the stock reel holder where the NFC antenna is, I wanted to hack my UM3 by programatically assigning the material that will be loaded.  I also want to programatically initiate the load, unload, and change material wizards (I am pretty sure this can be done with exec printer self.startProcedure('SOME_PROCEDURE"..... ) but I need help with what the proper 'key' and 'parameters' are.

 

I found a list of procedures defined in the um3.json file in griffin/machines/ folder.

Share this post


Link to post
Share on other sites

comand_util.py is a debug script, so mostly meant for our convenience. This also means that it has a horrible outward facing interface, which assumes that you know how the internal system actually works.

 

That being said; The internal system uses a pretty complicated system of procedures. As things can and will go wrong, it can occasionally be convenient to trigger specific procedures (or parts there of). That's what the startProcedure does.

 

All that being said; You're right on account of having to trigger those procedures to do what you want. If you want a full list of the procedures, you can find those on the machine, located at /usr/share/griffin/griffin/machines/um3.json

 

Share this post


Link to post
Share on other sites

Thanks nallath.

Would you, or one of your team members, be willing to share what the proper arguments are needed for a couple of the procedures?  I want to run "LOAD | CHANGE | SELECT_MATERIAL_WIZARD" for instance.  What does the 'parameters' look like to fire off these procedures?  If you cant share, I will keep poking around and figure it out.

 

I would think it would be safe enough to expose any of the "wizard" procedures on the API.  If you can initiate something from the front panel, you should be able to initiate the same from  the API.  I would love to see this knitted into the API.  Happy to contribute too.

Edited by tmcolby

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Introducing Ultimaker Cura 3.6 | Beta
      Ultimaker Cura 3.6 | Beta is available. It comes with new features, bug fixes, and UX improvements. We would really like to have your feedback on it to make our stable release as good as it can be. As always, you can download the beta for free from our website, for Windows, MacOS, and Linux.
        • Like
      • 91 replies
    • Print Core CC | Red for Ruby
      Q: For some users, abrasive materials may be a new subject matter. Can you explain what it is that makes a material abrasive when you are not sure which print core to use?
      A: Materials which are hard in a solid piece (like metals, ceramics and carbon fibers) will generally also wear down the nozzle. In general one should assume...
        • Like
      • 30 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!