Hello Guest it is December 26, 2024, 06:19:27 PM

Author Topic: Half the DRO  (Read 32793 times)

0 Members and 1 Guest are viewing this topic.

Half the DRO
« on: January 23, 2013, 12:11:59 PM »
i'm using mach3 and machscreen 1.56. don't know if possible with script or
brain, but can i make a button that would half the DRO readout. on the manual mill DRO(wizard550),
i have that option. i 1/2 and then select the axis. it's then halved.
like DRO 4.....would change to DRO 2
Thanks for any help !!!

kenneth
Kenneth
Re: Half the DRO
« Reply #1 on: February 12, 2013, 10:07:58 AM »
did i do this right. is this the wrong place for this post ? was there something else i needed to
do before posting ?  i posted this almost three weeks ago and got nothing. not even what i may
have did worng. new to the forum and still learning. Thanks for any help.
Kenneth

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Half the DRO
« Reply #2 on: February 12, 2013, 12:44:56 PM »
Hi Kenneth,

Welcome to the forum.
You haven't done anything wrong, it is just that your posting has for some reason gone un-noticed, my apologies.

I have read your post a couple of times and I am still unsure what you are asking.

You could add a button to a Mach screen (as long as the screen .set is not protected) which could read a DRO value, half it, then write the new value but I don’t think you could do this within a wizard (although I stand to be corrected). The function would, of course only happen each time the button is pressed.

Tweakie.
PEACE
Re: Half the DRO
« Reply #3 on: February 12, 2013, 12:47:12 PM »
Hi Kenneth

if you just want to display the half of a DRO value when a button is clicked, you could try the following:
place your DRO for holding the value / 2,  give it an user defined id e. g. 1500
place a button, double click "Function" in the propertybox of MachScreen , select "Execute Basic-Script", double click the value field in the "Execute code" line
EDIT:

value = GetOEMDRO(800)    ' e.g X POS
SetUserDRO(1500, value / 2)

exit the editor  File -> use data and close
save your screenset


Klaus


The brain isn't a soap, it doesn't shrink when used.
Re: Half the DRO
« Reply #4 on: February 12, 2013, 12:50:11 PM »
Thanks for your reply Tweakie.CNC ,
i want to touch one side of the stock and zero the DRO....then move to the other side
of the stock and touch again....then select an axis and click my button. that would half my
DRO display so that when i move the axis to the center of the stock, the DRO would read zero.
THANKS again !
Kenneth
Re: Half the DRO
« Reply #5 on: February 12, 2013, 12:51:02 PM »
OOPS....i'm sorry Klaus1311
THANKS!!!!!!!!!!!!!!!!!!!
Kenneth
Re: Half the DRO
« Reply #6 on: February 12, 2013, 12:52:31 PM »
D###, i need to read before i post. Thanks Tweakie.CNC AND Klaus1311 !!!!
Kenneth
Re: Half the DRO
« Reply #7 on: February 12, 2013, 01:04:17 PM »
Thanks Klaus1311,
i have the buttom configured as you say and it does nothing when i click the button.
and would that just zero X DRO ? i tried selecting a DRO and clicking the button...nothing.
i did save the set and even restarted mach3.

Hi Kenneth

if you just want to display the half of a DRO value when a button is clicked, you could try the following:
place your DRO for holding the value / 2,  give it an user defined id e. g. 1500
place a button, double click "Function" in the propertybox of MachScreen , select "Execute Basic-Script", double click the value field in the "Execute code" line
EDIT:

value = GetOEMDRO(800)    ' e.g X POS
SetUserDRO(1500, value / 2)

exit the editor  File -> use data and close
save your screenset


Klaus



Kenneth
Re: Half the DRO
« Reply #8 on: February 12, 2013, 01:48:20 PM »
Hi Kenneth

could you please try the attached mini screen and have a look, what is different to your screenset.  



Klaus
The brain isn't a soap, it doesn't shrink when used.
Re: Half the DRO
« Reply #9 on: February 12, 2013, 02:02:47 PM »
ok. you have two dro's. oem and user.
i have oem. so i will need two dro's for each axis ?
i need to make another dro(user 1500) to get it to work.
so this will only half X? i will need the same for YZ ?
Thanks

Kenneth
Kenneth