Hi. I'm totally new in G-Code, and maybe somebody can help me.
I have a Ender-3 Pro 3D printer running Marlin 1.1.6.2 firmware. And I need to use it for a very simple task such as constanly moving Y axis couple of centimeters back and forth when it's turned on. Now I manage to do this with Terminal application by simply sending gcode commands to it. So my question is - maybe therese is a way to use some kind of macro to loop this process? Or even put a file on sdcard so the process would start when I turn on the printer?
I know nothing about your specific machine but it is fairly normal for a CNC machine to move all axes a short distance back and forth when switched on to establish the machine's home position by means of a sensor.If it does it several times then you may have a problem,Have you tried seeking help from owners of similar machines?
Quite possibly,but your code contains some unnecessary information-G1 is modal and only heeds to be there once and being modal,the F rate will carry over from the last instance.If I have ever needed to do this sort of thing I have called up a sub routing using the M98P command and L(number of instances) it can contain any feed rate you choose.Having run as many instances as desired it is cancelled by an M99.Being unfamiliar with your machine,I don't know if this might be a suitable option.
#501 =100( number of repitations)
While[#501 NE 0]DO 1
G00 U-10.0 mm ( axis in x will move minus 10 )
G00 U10.0 (Axis will move 10 plus}
#501=[#501-1] (count down )
End 1 (repeat return to start for 100 times }