As far as I know, continuous change if feedrate is not possible. It can be changed in steps.
Hello,
I have a cnc wood lathe and currently I only use g-code to program it, which is enough since I only produce simple things. The problem is that I cannot control acceleration or deceleration of the axes' movements. For example I want the Z axis start at a certain speed (say F15000) and I want it to slow down until F5000 when it moves 800 mm away. I read somewhere about this and it says we just write the speed code at the end of the line where we specify the end point as coordinates; for instance G01 F15000 / G01 Z825 X-110 F5000 (slash stands for next line). Supposedly it starts at F15000 and it is at Z70 X-80 for example, and it becomes F5000 when came to Z825 X-110. But this doesn't work! It just perceives the F code at the end of the last line as the speed of the whole movement. So I couldn't manage to observe any acceleration or deceleration that way.
Anybody has any knowledge about this and a suggestion? Even if you have any idea, please tell, I most probably need it!
Similar Threads:
As far as I know, continuous change if feedrate is not possible. It can be changed in steps.
It depends on the controller you are using.
There are controllers which support this feature and there are others which don't.
Im thinking a macro would help you here if there aren't any other functions, i have a simple program you can try, might need to adjust it for your machine and function.
(A=#1 NUMBER OF STEPS)
(Z=#26 Z DISTANCE TO GO)
(X=#24 X DISTANCE TO GO)
#104=#5003 (CURRENT Z)
#105=#5001 (CURRENT X)
#106=#4109 (CURRENT F)
#101=ABS[[#26-#5003]/#1] (Z MOVEMENT FOR EACH STEP)
#102=ABS[[#24-#5001]/#1] (X MOVEMENT FOR EACH STEP)
#103=ABS[[#9-#4109]/#1] (F CHANGE FOR EACH STEP)
N1
WHILE [#104 GE #26] DO1
#104=#104-#101
#105=#105-#102
#106=#106-#103
IF [#104 LT #26] THEN GOTO9999 (SAFETY CHECK)
IF [#105 LT #24] THEN GOTO9999 (SAFETY CHECK)
G1Z#104 X#105 F#106
END1
N9999
M99
A macro is a routine or sub-program that includes non-G-code commands. It is typically used for common operations that will be called many times in a program.
So the program works like a sub program, so put that in program O8000 or something then change G01 Z825 X-110 F5000 to G65 P8000 Z825 X-110 F5000 A1000(this value can be bigger og smaller depends on how often you want the feed to change)
Mach3 does not support If...Then and While in g-code.
Gerry
UCCNC 2017 Screenset
[URL]http://www.thecncwoodworker.com/2017.html[/URL]
Mach3 2010 Screenset
[URL]http://www.thecncwoodworker.com/2010.html[/URL]
JointCAM - CNC Dovetails & Box Joints
[URL]http://www.g-forcecnc.com/jointcam.html[/URL]
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)