Macro variables

  • 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

  • administrators

    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.

  • administrators

    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.

Log in to reply