• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    jgrg1
    last edited by 5 Jun 2024, 08:25

    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.

    undefined 1 Reply Last reply 5 Jun 2024, 09:01 Reply Quote 0
    • undefined
      OwenD @jgrg1
      last edited by OwenD 6 May 2024, 09:28 5 Jun 2024, 09:01

      @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

      undefined 1 Reply Last reply 5 Jun 2024, 19:43 Reply Quote 1
      • undefined
        jgrg1 @OwenD
        last edited by 5 Jun 2024, 19:43

        @OwenD Cool beans. Will try that.

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