Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    NEEBE: How to send gcode through python

    Scheduled Pinned Locked Moved
    DSF Development
    3
    4
    613
    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.
    • chernogorskyundefined
      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

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        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

        chernogorskyundefined 1 Reply Last reply Reply Quote 1
        • chernogorskyundefined
          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
          • pjlundefined
            pjl
            last edited by pjl

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