Hello Guest it is March 28, 2024, 09:50:29 AM

Author Topic: Estimate(815)/Elasped(814) dro different  (Read 13568 times)

0 Members and 1 Guest are viewing this topic.

Re: Estimate(815)/Elasped(814) dro different
« Reply #10 on: March 11, 2013, 10:10:55 AM »
well, i got this to do what i want. don't know if i'm messing up something
else :)   is there another button(106) i can use ? not sure i should be using
a system button

DoButton(106)
InchMM = GetUserDRO(1010)
If GetUserLED (1012) = 0 Then
SetUserDRO(1010 , InchMM*25.4)
While IsMoving
Wend
SetUserLED(1012,1)
Else
SetUserDRO(1010 , InchMM/25.4)
While IsMoving
Wend
SetUserLED(1012,0)
End if
« Last Edit: March 11, 2013, 10:23:34 AM by Kenneth »
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Estimate(815)/Elasped(814) dro different
« Reply #11 on: March 11, 2013, 10:56:08 AM »
Kenneth I can't help you unless you tell me simply and concisely what your goal is. Forget buttons, LEDs and DROs and the rest for a moment - just say what your overall aim is.
Re: Estimate(815)/Elasped(814) dro different
« Reply #12 on: March 11, 2013, 10:58:59 AM »
i want to be able to enter an amount and click the button to change it to
either inch or mm and click again and it goes back to what i typed in.
without changing the othe dros

Thanks Ian
« Last Edit: March 11, 2013, 11:13:15 AM by Kenneth »
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Estimate(815)/Elasped(814) dro different
« Reply #13 on: March 11, 2013, 11:15:38 AM »
so you don't want to change system units or anything else?

just a USER DRO -( not an axis DRO, a feedrate DRO or any other SYSTEM DRO ) that flips between the two values when you click the button?
Re: Estimate(815)/Elasped(814) dro different
« Reply #14 on: March 11, 2013, 11:17:12 AM »
Yes sir.
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Estimate(815)/Elasped(814) dro different
« Reply #15 on: March 11, 2013, 11:26:48 AM »
I take it you have a user dro (number 1010) a user LED (number 1012) AND a button set to use VB code on your screenset? if so put this in your button.

Code: [Select]
If getUserLED (1012) Then 'if LED is ON we'll treat that as meaning the DRO is currently inches
  setUserDRO(1010 , GetUserDRO(1010) * 25.4) 'so change it to mm
  setUserLed(1012,0) 'set LED OFF which means the value now means mm
Else 'LED is OFF which we treat as meaning the DRO is currently mm
  setUserDRO(1010 , GetUserDRO(1010) / 25.4) 'so change the value to inches
  setUserLed(1012,1) 'set LED ON which means the value now means inches
End If
Re: Estimate(815)/Elasped(814) dro different
« Reply #16 on: March 11, 2013, 11:30:13 AM »
Thanks Ian,
THAT works !!!
Kenneth

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Estimate(815)/Elasped(814) dro different
« Reply #17 on: March 11, 2013, 11:37:50 AM »
Glad you're sorted.

Ian
Re: Estimate(815)/Elasped(814) dro different
« Reply #18 on: March 11, 2013, 01:03:13 PM »
i added inch/mm but is there a label like Error or Ticker0
so i can see the message. want to be able to tell when it's
inch or mm. right now i have to look at the inch/mm LEDs.
i can see the message in the Error label, but don't want to see
all the error messages in this label, just inch or mm.
Thanks

If getUserLED (1012) Then
SetUserDRO(1010 , GetUserDRO(1010) / 25.4)
SetUserLED(1012,0)
Message " Inch(es)"
Else
SetUserDRO(1010 , GetUserDRO(1010) * 25.4)
SetUserLED(1012,1)
Message "MM"
End If
Kenneth
Re: Estimate(815)/Elasped(814) dro different
« Reply #19 on: March 11, 2013, 03:03:25 PM »
is there a section where we can share set files ?
Kenneth