Hello Guest it is September 24, 2021, 05:37:44 AM

Author Topic: DRO ZERO VB Script  (Read 3746 times)

0 Members and 1 Guest are viewing this topic.

DRO ZERO VB Script
« on: April 09, 2016, 03:34:33 PM »
Hi Everyone,

Could someone pls help me with my macro? What i am trying to achieve is after Z moved 10 in incremental ZERO the Z DRO and back to Absolute mode. BUt instead of zeroing always stays 10. What is wrong? Anyone has idea? Here it is:

Code "G91"
Sleep(20)
Code "G00 Z 10"
Sleep(50)
Call SetDro (2,0.0000)
Sleep(200)
Code "G90"
Sleep(20)

Thank You for any input

Offline ger21

*
  • *
  •  6,292 6,292
    • View Profile
    • The CNC Woodworker
Re: DRO ZERO VB Script
« Reply #1 on: April 09, 2016, 05:22:49 PM »
Code "G91"
Sleep(100)
Code "G00 Z10"
While IsMoving()
Wend
Call SetOEMDro (802,0)
Sleep(200)
Code "G90"
Sleep(100)
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: DRO ZERO VB Script
« Reply #2 on: April 10, 2016, 02:36:17 AM »
Ger21!

Thank you very much!!!

Offline rcaffin

*
  •  1,035 1,035
    • View Profile
Re: DRO ZERO VB Script
« Reply #3 on: April 19, 2016, 07:01:43 AM »
> Call SetOEMDro (802,0)
Why is it that the Macro Programmer's Reference manual on page 70 says that this should be SetOEMDRO(2,0)? While the examples given for some of these get/set DRO functions are kinda confusing, since they use the wrong functions?

OK, OK, so I read the one wrong page when trying to use these functions.
Mumble.

Cheers
Roger