Hello Guest it is April 17, 2024, 08:35:15 PM

Author Topic: Need help with a simple macro  (Read 2488 times)

0 Members and 1 Guest are viewing this topic.

Offline SScnc

*
  •  77 77
    • View Profile
Need help with a simple macro
« on: September 13, 2011, 06:13:21 AM »
In my M6Start macro I have this code.

X = GetUserDRO ( 1200 )
Z = GetUserDRO ( 1201 )

code "G53G0 , Z" & Z
While IsMoving
Wend
code "G53G0 , X" & X

Basically it just looks at two DRO's I have on the screen and moves the machine to whatever I have in those DRO's. My problem is, I want to move X&Z at the same time. I've tried all different configurations and I can't seem to figure it out.

I have it working right now with this code.

code "G53G0 , X-.125 Z-10.75"

and it works great. However if I want to change the values I have to edit the macro.

Any help is appreciated.

Thanks

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Need help with a simple macro
« Reply #1 on: September 13, 2011, 07:24:52 AM »
Hi,

This should do what you want:

x = GetUserDRO ( 1200 )
z = GetUserDRO ( 1201 )
code "G53G0 X" &x & "Z" &z

Dan

Offline SScnc

*
  •  77 77
    • View Profile
Re: Need help with a simple macro
« Reply #2 on: September 13, 2011, 03:16:13 PM »
Okay thanks, I was very close to that. Just my syntax was off. I will try it and get back.