Hello Guest it is April 19, 2024, 05:54:55 AM

Author Topic: Script question ?  (Read 2073 times)

0 Members and 1 Guest are viewing this topic.

Offline JMF

*
  •  62 62
    • View Profile
Script question ?
« on: May 01, 2014, 05:10:44 PM »
How can I setup a script to move to a X, Y location which I would specify in two DRO's ?

I'm not sure how to do something like this,

Code "G53z0"
  While IsMoving()
  Wend
Code "G53x0y0"

Where only x and y for the last line would be from two DRO's

Like this,

Code "G53x(dro_xvar)y(dro_yvar)  something like this, I tried it but gives me errors.


Thanks,
    John

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Script question ?
« Reply #1 on: May 01, 2014, 06:21:35 PM »
Existing DRO's, or new ones?

You need to do something like:


xval = getoemdro(x)
yval = getoemdro(x)
Code "G53 X" & xval & " Y" & yval



the (x) in the GetOEMDRO(x) is the DRO #.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline JMF

*
  •  62 62
    • View Profile
Re: Script question ?
« Reply #2 on: May 01, 2014, 07:31:39 PM »
Ger21,

Thanks for the reply, these will be new DRO's

I will try the code right away.


--------


Just tried it, it works great, thanks !!
« Last Edit: May 01, 2014, 07:34:37 PM by JMF »