Hello Guest it is March 28, 2024, 05:48:09 PM

Author Topic: New i Mach3 macro. Startup help.  (Read 3912 times)

0 Members and 1 Guest are viewing this topic.

New i Mach3 macro. Startup help.
« on: April 22, 2009, 03:05:54 AM »
I just startet to make macro, and to quickly get on, I have some questions.  :)

I have make this macro:

code ("G00 X0 Y0")

very simple. But want a function more. Something like:

'move to Z135 in machinecoordinate'
whilemoving ()
wend
code ("G00 X0 Y0")

I don't know hove to adress the move to the machine coordinate system.
Re: New i Mach3 macro. Startup help.
« Reply #1 on: April 22, 2009, 10:49:50 AM »
G53 will move the machine in absolute machine coordinates

Then you can go back to work coordinates with G90

so you would write a macro with something like this:

CODE ("G53")
CODE ("G00 z135")
CODE ("G90")
CODE ("G00 x0 y0")

That should take care of it.
Fernando
Re: New i Mach3 macro. Startup help.
« Reply #2 on: April 23, 2009, 02:55:06 AM »
Thanks.

It was this I was looking for.

Now my code is:

code ("G53 Z135")
while IsMoving ()
wend
code("G90 G00 X0 Y0)

an i have assigned it to "Goto Zero" button, so when I press it, the mill go op to the higest pos, and then to Zero.