Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    NEEBE: How to send gcode through python

    DSF Development
    3
    4
    318
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chernogorsky
      chernogorsky last edited by

      Hi,
      Quite a newbe to Python DSF. may you please point me to the right direction
      I'd like to be able to send multiple commands to Duet through python

      Thanks

      T3P3Tony 1 Reply Last reply Reply Quote 0
      • T3P3Tony
        T3P3Tony administrators @chernogorsky last edited by

        @chernogorsky have you seen the example here:
        https://github.com/Duet3D/dsf-python/blob/main/examples/send_simple_code.py

        once you have that working then you can base a python script on the premise to get your gcode stream and send it. you will probably need to leave the connection open between commands (not open and close it per command). @chrishamm may be able to comment about best practices for the connection (permanently open, idle close etc).

        That python library implements bindings for the DSF IPC API which has more information here:
        https://github.com/Duet3D/DuetSoftwareFramework/wiki/API-Overview

        www.duet3d.com

        chernogorsky 1 Reply Last reply Reply Quote 1
        • chernogorsky
          chernogorsky @T3P3Tony last edited by chernogorsky

          @t3p3tony Thank you
          and following our conversation the other day
          pendant video

          Next newbe question would be how to set it as a plugin

          1 Reply Last reply Reply Quote 0
          • pjl
            pjl last edited by pjl

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • Referenced by  infiniteloop infiniteloop 
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA