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

    Is P is also a reserved macro param letter?

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    186
    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.
    • zaptaundefined
      zapta
      last edited by

      The macro parameters documentations says " do not use G, M, N or T as parameters" so I used P but it also doesn't seem to work.

      In macro.g

      echo {param.P}
      

      And then invoking using the command line which results in the error: unknown parameter 'P'.

      M98 P"macro.g" P100
      

      Is P also a reserved param letter?

      (I am using RepRapFirmware for Duet 3 Mini 5+ 3.4.0beta5 (2021-10-12))

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

        @zapta
        The P parameter is not accessible from within the macro.
        The reason I was given was that it's assumed we already know the name of the macro we are running.

        https://forum.duet3d.com/topic/22731/param-p-doesn-t-return-macro-name?_=1644101120714

        I think it would be handy to be able to parse the currently running macro, but effort vs return probably doesn't cut it with the other developments in the works.

        zaptaundefined 1 Reply Last reply Reply Quote 0
        • zaptaundefined
          zapta @OwenD
          last edited by

          Thanks @owend. In that case, may be useful to update the documentation, adding it to the list of 'problematic' macro parameters. Took me some time to figure this out.

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