Jump to content

Livestream of current G-Code execution


timotub

Recommended Posts

Posted · Livestream of current G-Code execution

Is there a possibility to stream the currently executed G-Codes somewhere? - Maybe this could be integrated into the REST API?

I guess I have to implement this feature myself, for that I have the following questions

1. Is it possible to upgrade python to a later version without danger of destroying something? - On my printer there is an installation of python 3.4.

2. Could I add pykafka to the existing python installation without dangers?

3. Where in the architecture would you sugguest me to plug in this feature? - I have figured out that the actual transmission of G-Codes to the Ultiboard is done in physicalLayer.py, using a SerialDumpFormatter. I would then modify the SerialDumpFormatter to only include the plaintext of transmitted code and stream it out either using pykafka or integrate it to Flask.

 

What are your thoughts?

  • Link to post
    Share on other sites

    Posted · Livestream of current G-Code execution
    1 hour ago, timotub said:

    1. Is it possible to upgrade python to a later version without danger of destroying something? - On my printer there is an installation of python 3.4.

    Possible, yes. But it will come with a lot of risk.
     

    1 hour ago, timotub said:

    2. Could I add pykafka to the existing python installation without dangers?

    Changing things is never without danger and all modifications that you make are on your own risk. I don't think that this is likely to cause issues though.

     

    1 hour ago, timotub said:

    3. Where in the architecture would you sugguest me to plug in this feature? - I have figured out that the actual transmission of G-Codes to the Ultiboard is done in physicalLayer.py, using a SerialDumpFormatter. I would then modify the SerialDumpFormatter to only include the plaintext of transmitted code and stream it out either using pykafka or integrate it to Flask.

    I'm not with the firmware team, so I can't give you a good answer to that.

    But to remove the risk of the XY problem (https://xyproblem.info/) being a thing here. Why do you want this in the first place?

    • Like 1
    Link to post
    Share on other sites

    Posted · Livestream of current G-Code execution

    Thank you for your reply and sorry that this may sound strange.

     

    There are additional sensors mounted to the printer, whose data is already streamed to Kafka by separate hardware. I want to stream the G-Code instructions as well, to gather all the live data in one place and to analyze it to enable a better control of the printing process.

    Why I want to process the data on a separate machine? - Because I think that the embedded UM3-system should not get more compute load to work on.

  • Link to post
    Share on other sites

    Posted · Livestream of current G-Code execution
    2 hours ago, timotub said:

    Thank you for your reply and sorry that this may sound strange.

     

    There are additional sensors mounted to the printer, whose data is already streamed to Kafka by separate hardware. I want to stream the G-Code instructions as well, to gather all the live data in one place and to analyze it to enable a better control of the printing process.

    Why I want to process the data on a separate machine? - Because I think that the embedded UM3-system should not get more compute load to work on.

    Ah, yes, that makes sense! I will notify one of our FW engineers about this topic, they are better able to answer your questions.

    • Like 1
    Link to post
    Share on other sites

    Posted · Livestream of current G-Code execution

    Here one of the firmware developers:
    You mention python 3.4, from this I assume your printer is an UM3? The S3 and S5 printers updated last year to a new Linux version with python 3.6

     

    1) Updating python is possible, but like @nallath said there is a lot of risk. I'd expect you have to update several of the related packages like Flask, etc. It will be a lot of work. Perhaps for a first try it would be easier to stick with python 3.4 and install older versions of the packages you want to use. When you have those older version working and time left, then you can always decide to upgrade.

     

    2) installing extra packages like pykafka is possible. The only problem we sometimes run into is a short of memory

     

    3) SerialDumpFormatter is not how we do the actual communication but is a part of the code for dumping the raw communication data to files. You could do your thing here if you want to, just check the option switch that's there somewhere. By default we are not dumping the raw data.

     

    • Like 2
    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 the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
    ×
    ×
    • Create New...