Jump to content
Ultimaker Community of 3D Printing Experts
walterw

UM S5 API: Amount of filament used by print job?

Recommended Posts

Hello

as far as I know, no, because the printer doesn't know or don't take care about how much material will be used or is actually used. You can only take the values after slicing in Cura and put in in a script or Excel to calculate your printing costs. 

 

I have done this with an Excel sheet and I took various other values into account, like printing time and so on. I find it better to know (or to tell the customer) how much his model costs before printing, so the customer can decide which quality he wants to have and such things.

Share this post


Link to post
Share on other sites

That is a pity.

 

I use Cura & Excel as well when I'm printing as a service. We are a Maker Space though, so most of the time people are launching their own jobs and we charge them afterwards for used filament + print time.

It would be really cool to be able to see how much material has been used - until now we were only printing on an UM2+ and only with PLA, stopping time and charging a fee per hour that, on the average, covers our material expenses. For the UM5 with its variety of cheap and expensive materials I want a fairer (and yet automated) approach.

 

Since the Ultimaker keeps count on the length of filament left on a spool, and there is an overall material statistics (but not per print job) on the web interface, it should actually know how much material it has used during a print?

 

If not: is this a feature I (and for sure other people as well) could realistically ask for a Christmas present? 🙂

Share this post


Link to post
Share on other sites

I guess you have already found the API documentation of the printer? 

http://<YOUR_IP>/docs/api

 

But I checked it now, and could not find any useful information you are looking for.

The UM counts the length only for UM spools with NFC chip, all other spools are not counted.

 

The S5 has a history of previous prints, but unfortunately, there is only the print time shown, but no material usage.

Share this post


Link to post
Share on other sites
14 hours ago, Smithy said:

as far as I know, no, because the printer doesn't know or don't take care about how much material will be used or is actually used. You can only take the values after slicing in Cura and put in in a script or Excel to calculate your printing costs. 

 

I have done this with an Excel sheet and I took various other values into account, like printing time and so on. I find it better to know (or to tell the customer) how much his model costs before printing, so the customer can decide which quality he wants to have and such things.

 

This is not true. The machine does know and it also cares. This is especially the case if you have a filament flow sensor & nfc spools. That way we can actually track the amount of material used and if the job needs more than there is material left.

 

Cura Connect 5.1>, for instance, has an analytics page that shows you these kinds of nifty things (eg; the material used per type for the cluster and the like)

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks, @nallath for the clarification, but we cannot use the information via the API currently, it is just an internal information, right? It would be great if the history would also have the information about the material and if all history information is available via the API. 

 

@walterw

 

But check the analytics page, nallath mentioned, maybe that helps for your maker space.

Share this post


Link to post
Share on other sites

@Smithy I have found the analytics page, that's why I assumed that the Ultimaker does in fact know how much material has been used. But I can't access that information through the API, or at least I could not find out how to do it. And even if I did I'd need to save the current amount of every material after each job and calculate the differences.

@nallath, are there any plans to make these values, that is: both Cura Connect Analysis data, and the amount of material used by each print job, accessible by API in a future firmware version?

Thank you

Share this post


Link to post
Share on other sites

It's already accessible. See http://{ip}/cluster-api/v1/ for the documentation of the cura-connect API documentation. Using http://{ip}/cluster-api/v1/print_jobs/history should get you what you need.

 

On the bottom of the analytics page, there is also a link that allows you to download the data as a CSV.

As for the things that are exposed by means of the API; Everything the CuraConnect webpage does is exposed by means of an API. It's the only way for the front-end to actually tell the machine what needs to be done.

Edited by nallath
Added extra info
  • Thanks 1

Share this post


Link to post
Share on other sites

@nallath, there is one little flaw (for my use case) with getting the material amount from http://{ip}/cluster-api/v1/print_jobs/history.

The "job_material_amount_{x}"-fields show the material used if you don't cancel the print, is that correct?

By the way, what unit is this? mm³?

 

I've also tried to get the difference of the values in http://{ip}/api/v1/printer/heads/0/extruders/{x}/statistics/material_extruded.

But the values are rather low. Is this the same unit as the value in http://{ip}/cluster-api/v1/print_jobs/history (if the job is concluded)?

 

It would be really cool if the printer would store the real extruded values in http://{ip}/api/v1/print_jobs/history (printer, not cluster log) - the fields are there, but they are always 0.

 

PS: I've encountered a bug in Cura Connect. I've cancelled a job (because of a non adhering print), skipped cooldown, tried to avoid losing time by quickly extracting the piece (no problem as it didn't adhere) and immediately re-started the job. It was successful -  but does not appear in the log of completed jobs! Only the failed one with print time of 22 minutes (instead of 3 hours).

 

Share this post


Link to post
Share on other sites

Currently, it shows the material of the job as a whole, so not what it actually used.

 

As for aborting a print, those should show up in the history (That's also how it keeps track of the completion rate in the dashboard).

 

If I remember correctly, the unit in for the material extruded is mm3

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

    • How to 3D print with reinforced engineering materials
      Ultimaker is hosting a webinar where we explain how you can achieve and maintain a high print success rate using these new reinforced engineering materials. Learn from Ultimaker's Product Manager of Materials and top chemical engineer Bart van As how you can take your 3D printing to that next level.
      • 0 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!