Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: KentCNC on February 20, 2021, 05:26:33 PM

Title: Read DRO from Lua
Post by: KentCNC on February 20, 2021, 05:26:33 PM
How do you read a DRO using Lua? Not sure how to reference the DRO?
Title: Re: Read DRO from Lua
Post by: rhtuttle on February 21, 2021, 03:13:26 PM
   
   local TempZ = mc.mcAxisGetPos (inst, 2) -- Get work position of Z-Axis
   local TempA = mc.mcAxisGetPos (inst, 3) -- Get work position of A-Axis
Title: Re: Read DRO from Lua
Post by: Bill_O on February 22, 2021, 08:57:07 AM
Kent,

This might help.
Use the version from 6_22_2020 towards the bottom.

https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695

Bill
Title: Re: Read DRO from Lua
Post by: KentCNC on February 22, 2021, 10:40:51 AM
Thank you for the replies. I have lots to learn, but slowly making progress.