41
General Mach Discussion / Can Mach3 Do a simple loop to increment a variable?
« on: August 13, 2023, 10:56:15 AM »
I searched but couldn't find an answer.
I am writing a program where I set X at a starting point, Run a subroutine, Then move X .003 and do it again about 35 times. Can Mach3 Loop a variable to increment X?
I have to do this up to 16 times in a single program. If not possible in Mach3 what about Mach4? I have everything I need to upgrade Just too lazy to rewire my panel and switch over. Also many people who may use this code are probably still running Mach3.
Something like this?
start loop
Increment variable .003
X=Variable
if variable < end Number
Call subroutine
else
Exit loop
end if
Loop
I am writing a program where I set X at a starting point, Run a subroutine, Then move X .003 and do it again about 35 times. Can Mach3 Loop a variable to increment X?
I have to do this up to 16 times in a single program. If not possible in Mach3 what about Mach4? I have everything I need to upgrade Just too lazy to rewire my panel and switch over. Also many people who may use this code are probably still running Mach3.
Something like this?
start loop
Increment variable .003
X=Variable
if variable < end Number
Call subroutine
else
Exit loop
end if
Loop