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

    Alternative to variable substitution of parameter letter

    Scheduled Pinned Locked Moved
    Firmware wishlist
    2
    4
    214
    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.
    • GeneRisiundefined
      GeneRisi
      last edited by GeneRisi

      Third idea: What if I create a virtual axis and map it onto the desired stepper just before using it in a macro?

      UPDATE: @dc42 What if the G[0/1/2/3] commands had a new parameter that allowed mentioning the axis by string? For example, G1 Q"x150 y100" F2400 ?

      The documentation right now says "Using an expression to replace a parameter latter, or to replace the command number after the initial G or M, is not supported. (so for example G1 {global.extruder_axis}^2 is not supported)"

      Might this change soon? My use case is I have two nozzle wiper tools and instead of duplicating the gcode for each tool (with some minor tool-specific code included) I could use a variable to specify the stepper intended.

      Thanks!

      GeneRisiundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
      • GeneRisiundefined
        GeneRisi @GeneRisi
        last edited by

        @dc42 Maybe the best of the ideas so far 😊

        implement something like this:

        command "G1 X150 Y100 F24000" or command "G1 " ^ var.something

        so that a string can be passed to the parser for execution. I don't think it's much different than calling a macro file, where the difference is that the command is in a passed string vs in a named file. It allows one to build a string conditionally and then send it to be executed.

        What do you think?

        1 Reply Last reply Reply Quote 0
        • fcwiltundefined
          fcwilt @GeneRisi
          last edited by

          @generisi

          Hi,

          Would it be possible to change the mapping for a given axis to one of two steppers?

          Frederick

          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

          GeneRisiundefined 1 Reply Last reply Reply Quote 0
          • GeneRisiundefined
            GeneRisi @fcwilt
            last edited by

            @fcwilt I don't know. There is underlying housekeeping that the firmware must be doing. The drive mapping could be changed but I don't know whether that would be sufficient.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA