Hello Guest it is March 29, 2024, 09:08:23 AM

Author Topic: changing value in CurrentX dro  (Read 1260 times)

0 Members and 1 Guest are viewing this topic.

Offline Bill_O

*
  •  563 563
    • View Profile
changing value in CurrentX dro
« on: February 28, 2019, 12:13:30 PM »
I have tried several things to get a specific number in the CurrentX dro.
G92 works but it also is an offset which messes up some other things.

Offline thosj

*
  •  532 532
    • View Profile
Re: changing value in CurrentX dro
« Reply #1 on: February 28, 2019, 12:23:43 PM »
I have tried several things to get a specific number in the CurrentX dro.

Have you tried clicking in the DRO and typing the number you want?

Tom
--
Tom

Offline Bill_O

*
  •  563 563
    • View Profile
Re: changing value in CurrentX dro
« Reply #2 on: February 28, 2019, 12:26:15 PM »
tom,

i need to do it within a lua script
in mach3 when i used g92 it behaved much different than it does in mach4
it all has to do with some positioning that i need to adjust multiple times

bill

Offline gorf23

*
  •  183 183
    • View Profile
Re: changing value in CurrentX dro
« Reply #3 on: February 28, 2019, 12:41:59 PM »
off the top of my head i think that I used something like this in a script

xpos = mc.mcAxisGetPos(inst, mc.X_AXIS) -- Get X Axis Position
scr.SetProperty("dro134","Value", tostring(xpos))

gary

Offline Bill_O

*
  •  563 563
    • View Profile
Re: changing value in CurrentX dro
« Reply #4 on: February 28, 2019, 02:00:13 PM »
Gary,

I will give that a try.
I tried using droCurrentX and that did not work.
Where did you find the dro numbers?

Bill

Offline Bill_O

*
  •  563 563
    • View Profile
Re: changing value in CurrentX dro
« Reply #5 on: February 28, 2019, 03:16:24 PM »
Gary,

That did not work but thanks for the assistance.

Bill

Offline gorf23

*
  •  183 183
    • View Profile
Re: changing value in CurrentX dro
« Reply #6 on: February 28, 2019, 04:11:06 PM »
screen edit just rename the  x dro name to whatever you like and replace your dro name with  scr.SetProperty("your dro name","Value", tostring(xpos))

gary

Offline Bill_O

*
  •  563 563
    • View Profile
Re: changing value in CurrentX dro
« Reply #7 on: February 28, 2019, 05:50:48 PM »
Gary,

I just made a new dro and it appears to be working.
Not sure why the one native to mach4 wouldn't do it.
Having another problem so I am not positive  it is working but it looks like it.

Thanks,
Bill
Re: changing value in CurrentX dro
« Reply #8 on: February 28, 2019, 07:28:53 PM »
Make sure that the droCurrentX editor property is not still set as read only.  This was reported a year ago for the lathe screen set and wasn't changed the last time I downloaded a new version last fall.

Not sure what you are trying to do but I think you probably should be using mc.mcAxisSetPos(inst,mc.X_AXIS,10.3456) rather than changing screen  values.

Just my 2 cents worth

HTH

RT