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

    M291 now fails in macro when concentating parameter value

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    93
    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.
    • jgrg1undefined
      jgrg1
      last edited by

      Hi,

      just installed 3.5.1, running in SBC mode. I have a custom macro for handling filament load/unload, and I pass in the desired temperature as a parameter with name K. E.g.

      M98 P"0:/macros/03-Filament_Handling/00-Load_Filament" K215            ; execute macro to load and purge filament
      

      As of 3.5.1, I'm now getting an error when popping up a display message that uses that parameter:

      if exists(param.K)
          M291 P"Please wait while the nozzle is being heated up" R"Heating: " ^ {param.K} ^ "°C" S1 T5; display message
          ....
      

      I get a red error popup on the web page saying "invalid character '^' on line 17"

      Line 17 is the M291 call.

      OwenDundefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD @jgrg1
        last edited by OwenD

        @jgrg1

        Try this

        M291 P"Please wait while the nozzle is being heated up" R{"Heating: " ^ param.K ^ "°C"} S1 T5
        

        The parameter is looking for a quoted string which it will see as having been completed at the second set of parentheses.
        Most parameters that use variable etc must be enclosed in curly braces to ensure they are evaluated correctly

        jgrg1undefined 1 Reply Last reply Reply Quote 1
        • jgrg1undefined
          jgrg1 @OwenD
          last edited by

          @OwenD Cool beans. Will try that.

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