The simplest but not always optimal way to move the axis from the macro level is to use the d.executeGCode() command.
Below is an example using rapids and machine coordinates (tested a moment ago with simCNC 3.420 Beta 10).
d.executeGCode("G0 G53 X100")
It is much more optimal and safe to use d.moveToPosition() or d.moveAxisIncremental().
These commands do not change any parameters or modes in simCNC.
We are talking about:
- f
- G0 or G1
- G53 or G54
- G90 or G91
Whenever I wrote macro scripts for Mach3, I had to save the above-mentioned parameters and modes to variables at the beginning of the macro to restore them at the end of the macro.
In simCNC, I don't have to do this when I use the d.moveToPosition() or d.moveAxisIncremental() commands.
It is very convenient and safe and significantly shortens the macro's length.
Just like armerolopezadrian wrote, you should look at the manual, pages 21 and 22: https://en.cs-lab.eu/wp-content/uploads/2020/06/simcnc-python-scripts-guide_en.pdf
W.T.
CS-Lab Support Team
The simplest but not always optimal way to move the axis from the macro level is to use the d.executeGCode() command.
Below is an example using rapids and machine coordinates (tested a moment ago with simCNC 3.420 Beta 10).
d.executeGCode("G0 G53 X100")
It is much more optimal and safe to use d.moveToPosition() or d.moveAxisIncremental().
These commands do not change any parameters or modes in simCNC.
We are talking about:
- f
- G0 or G1
- G53 or G54
- G90 or G91
Whenever I wrote macro scripts for Mach3, I had to save the above-mentioned parameters and modes to variables at the beginning of the macro to restore them at the end of the macro.
In simCNC, I don't have to do this when I use the d.moveToPosition() or d.moveAxisIncremental() commands.
It is very convenient and safe and significantly shortens the macro's length.
Just like armerolopezadrian wrote, you should look at the manual, pages 21 and 22: https://en.cs-lab.eu/wp-content/uploads/2020/06/simcnc-python-scripts-guide_en.pdf
W.T.
CS-Lab Support Team
armerolopezadrian has reacted to this post.