shakil1740 wrote:Hello,
How can I call M31 macro from macroloop script. I tried this from mpg macro script
if(AS3.GetLED(12) != true) exec.Callbutton(196); // IF INPUT PIN 12 IS ACTIVE THEN START Z PROBE
but it stops with "The Probe sensor was active. The operation was aborted"
and some time probe crash.
Thanks in advance.
It looks like you are trying to call a G-code macro (M31) from a macro loop script in your CNC machine. In order to call a G-code macro from a macro loop, you need to use the appropriate G-code command.
Assuming that the M31 macro is defined in your machine's G-code firmware, you should be able to call it using the "G65" command followed by the macro's parameters. For example:
G65 P8000 X10.0 Y20.0 Z-0.5
This command would call macro number 8000 with the parameters X=10.0, Y=20.0, and Z=-0.5.
You can replace the example parameters with the ones required by the M31 macro you want to call. Make sure to also check the documentation of your machine's G-code firmware to confirm the correct syntax for calling macros with the G65 command.