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

    Bug: Using variables for multiple extruders does not work

    Scheduled Pinned Locked Moved
    Beta Firmware
    4
    5
    340
    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.
    • tristanryerparkeundefined
      tristanryerparke
      last edited by tristanryerparke

      Just discovered this bug today while trying to extrude values based on several variables.
      My setup is MB6HC + SBC running RRF, DSF and DWC versions 3.3rc1 for all.

      global extruder1val = 10
      global extruder2val = 15
      ;for a tool with two extruders
      G0 E{global.extruder1val}:{global.extruder2val} 
      

      The G0 (also tried G1) command only works for the first extruder, the command gives no errors and on the dashboard only the value for extruder 1 increases.
      Same applies to to the following:

      G0 E5:{global.extruder2val} ;only 1st extruder moves
      G0 E0:{global.extruder2val} ;only 1st extruder moves
      G10 P0 X10 ;the current tool with two extruders
      echo tools[0].offsets[0] ;returns 10
      G0 E5:{tools[0].offsets[0]} ;only 1st extruder moves
      

      I wonder if this is a bug in the way commands with colons are parsed if they contain expressions?
      For the time being can anyone think of a workaround that would allow simultaneous extrusion based on variable, parameter or any expression?
      Update: For now I can use extra axes but would still like this functionality in the future.
      I see in this thread a similar issue, but @dc42 mentions it will be solved in 3.3?
      https://forum.duet3d.com/topic/20788/m572-s-d-parameter-doesn-t-process-expressions/5

      At this point just wondering what the status of this fix is
      Thanks,
      T

      o_lampeundefined gloomyandyundefined dc42undefined 3 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @tristanryerparke
        last edited by

        @tristanryerparke
        I was wondering how your tools are set up? AFAIK, only the extruder of the active tool can be addressed.
        If you have it set up as mixing tool, you would have to tinker with the mixing ratio instead of addressing both extruders with their own extrusion length.

        1 Reply Last reply Reply Quote 1
        • gloomyandyundefined
          gloomyandy @tristanryerparke
          last edited by

          @tristanryerparke Have you checked that you can address two extruders without the complication of variables? So for instance in your first example does

          G0 E10:15
          

          Do what you expect it to do?

          tristanryerparkeundefined 1 Reply Last reply Reply Quote 1
          • dc42undefined
            dc42 administrators @tristanryerparke
            last edited by

            @tristanryerparke there is currently the following limitation in SBC mode. A parameter taking two or more colon-separate values cannot use expressions to provide those values. So G0 E{global.extruder1val} will work, but G0 E{global.extruder1val}:{global.extruder2val} will not.

            We plan to introduce array-valued expressions in a future firmware release (possibly in 3.4). At that point it will become possible to use a different syntax, probably G0 E{[global.extruder1val,global.extruder2val]}.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • tristanryerparkeundefined
              tristanryerparke @gloomyandy
              last edited by

              @gloomyandy yes sending G0 E100:200 works perfectly, extruding the specified amount on each extruder.

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