Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Macro variables

    Tuning and tweaking
    3
    4
    927
    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.
    • kuhnikuehnast
      kuhnikuehnast last edited by

      Hi there,
      at the moment, I am installing a Nozzle clean adapter. To write the macro I have some questions:

      1. Is there a possibility to implement a variable like "for i = 1 to 5 do" (so I wouldn't have to paste the code to brush the nozzle 5 times)
      2. Is it possible to enter variables with a feedback window? (As I use different print surfaces and the brush is mounted to the frame, I could implement a popup window with a question how thick the used print surface is. So the Nozzle would be always brushed at the same Z-height)
      3. If 2 is impossible so is it possible to deliver the variable (e.g. thickness of print surface) when I call the macro? (Like M98 Clean_Nozzle.g X# (where # is the thickness)
      4. Is there any option to calculate in macros? (e.g. G1 X10 Y10 Z0.5+4)?

      Hope, you can help me 🙂

      greetings kuhni

      1 Reply Last reply Reply Quote 0
      • dc42
        dc42 administrators last edited by

        Currently there is no facility use variables, loops or conditions in the GCode supported by RepRapFirmware. This is on my list to look at. I haven't yet found any other implementation that does it in a nice way.

        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
        • resam
          resam last edited by

          @dc42 are you aware of http://linuxcnc.org/docs/2.7/html/gcode/overview.html#_parameters and https://ws680.nist.gov/publication/get_pdf.cfm?pub_id=823374 (Section 3.2.1)?

          1 Reply Last reply Reply Quote 0
          • dc42
            dc42 administrators last edited by

            Yes I am aware of the standard NIST parameters. What I am not aware of is an existing nice implementation of conditional execution or loops. The NIST numbered variable are rather horrible and although I may support them for CNC compatibility, users deserve something better.

            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 1
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA