Macro variables
-
Hi there,
at the moment, I am installing a Nozzle clean adapter. To write the macro I have some questions:- 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)
- 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)
- 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)
- Is there any option to calculate in macros? (e.g. G1 X10 Y10 Z0.5+4)?
Hope, you can help me
greetings kuhni
-
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.
-
@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)?
-
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.