Hi,
a few things that might help.
First name all your m code macros m100 or higher. All of Machs built in macros are m99 or less. If you name your macro
in the same namespace you risk corrupting a in built function.
Second all macro names an calls should be lowercase without leading zeros. On a windows PC
M25 and m25
are the same, however Machs Gcode interpreter is looking for 'm25', I suggest using lowercase because you will end up with
impossible to detect errors otherwise. On a Linux PC which is case sensitive the equivalence fails.
X10M25
There is no 'goto' command contained within that line. I assume you mean g0 or g1?
The linear movement commands are modal thus:
g0 x10
x0
x10
x0
x10
x0
will cause the x axis to move back an forth 10 units at rapid traverse rate established by the modal g0 at the top.
The line that you posted:
X10M25
is relying on Mach already being in g0 (or g1) mode already, but because you have include an m25 command on the same line
the previously prevalent mode is lost.
This would work:
x10
m25
In this circumstance the x10 'goto' command is executed under the existing motion mode and then the second (m25) line is executed.
Look up mcCntlGcodeExecuteWait() and mcCntlGcodeExecute() in the API.chm
Craig