Hello Guest it is April 24, 2024, 07:07:58 PM

Author Topic: newbie help with button  (Read 3718 times)

0 Members and 1 Guest are viewing this topic.

newbie help with button
« on: October 29, 2018, 10:28:21 AM »
Hi guys
completely new to messing with the button functions etc
Friend of mine is looking to have a button added to the axis DRO that will half the readout
ie if the X axis reads 200mm he wants the button to halve it and rewrite the DRO as 100mm...
is this possible?

and if so , how the heck do I do it?


Offline RICH

  • *
  •  7,427 7,427
    • View Profile
Re: newbie help with button
« Reply #1 on: October 31, 2018, 09:44:08 AM »
Yes it is possible. I assume you this is in reference to Mach3. If Mach4, the following does not apply.
1. You will need a screen editor, like MachScreen to add the button.
2. You can write / assign some code to manipulate the DRO value in the screen editor.
 An option could be to ceate an M code which can do the same but you will need to call the Mcode via the MDI line.

Welcome to the learning curve........................,



Offline Tweakie.CNC

  • *
  •  9,199 9,199
  • Super Kitty
    • View Profile
Re: newbie help with button
« Reply #2 on: November 01, 2018, 05:56:54 AM »
Following the suggestion by Rich, if you add a new screen button then on the button press the following button code will half the value shown in the X axis DRO half it and then write the new value back to the X axis DRO.

Call SetOEMDRO(800,Tw/2)