Machsupport Forum
Mach Discussion => Mach Screens => Machscreen Screen Designer => Topic started by: Kenneth on March 07, 2013, 10:31:34 AM
-
is there a way to adjust the Estimate(815) DRO to get closer to the
Elasped(814) DRO ? thirty minutes seems like a big different.
Thanks for any help !
-
also, i'm trying to use a button to change a userdro(1011) between inch and mm.
below is what i have. it works but i have to toggle unit button(106), THEN click
my button and it changes back to whichever is opposite from what it was before.
if i enter 1" and click the button, the dro changes to 25.4mm. if i click the same button,
it should change back to 1". doesn't have to say " or mm.
Thanks for any help !
InchMM = GetUserDRO(1011)
If GetOEMLED(802) Then
SetUserDRO(1011 , InchMM*25.4)
Else
SetUserDRO(1011 , InchMM/25.4)
End If
-
Hi Kenneth,
try the folowing:
a user defined DRO 1011
a Button with Standard code 34(Execute Basic Script)
the script:
DoOEMButton(106)
InchMM = GetUserDRO(1011)
If GetOEMLED(802) = 0 Then
SetUserDRO(1011 , InchMM*25.4)
Else
SetUserDRO(1011 , InchMM/25.4)
End If
Klaus
-
Thanks Kluaus, but that uses the OEM button to toggle units.
so it changes ALL the DROs by using the OEMLED. was looking to
have it just to do a quick convert as i use inches all the time and sometimes
they bring me mm. used inches for 20 years and just started to have to convert.
so i would like one DRO to change. is there a way to use DoButton for a user button ?
and i got your email about the 1010 DRO. Thanks
-
i got this working by adding a UserLED.
but it still changes all my DROs.
DoOEMButton(106)
InchMM = GetUserDRO(1010)
If GetUserLED (1012) = 0 Then
SetUserDRO(1010 , InchMM*25.4)
SetUserLED(1012,1)
Else
SetUserDRO(1010 , InchMM/25.4)
SetUserLED(1012,0)
End if
-
i know it's dat dang dobutton but can't
find where to use a user button.
-
I'm not entirely clear what it is you want to do.... however....
Your USER DRO was just mimicking the SYSTEM units DRO so there's no point in having it. Try this code and see if it does what you want.
Note that whenever you change the system units then the axis DROs WILL change UNLESS you have "Lock DROs to setup units" ticked in general config.
DoOEMButton(106) 'toggle system units
InchMM = GetUserDRO(1010) 'get whatever
If GetOEMLED (802) Then 'if the system is now in mm
SetUserDRO(1010 , InchMM*25.4)
Else 'else it's now in inches
SetUserDRO(1010 , InchMM/25.4)
End If
Ian
-
Thanks Ian,
that helped the system DRO, but it still changes the feed rate(18)
and the overridden fr(55). but i'll take what i can get :)
was hoping to be able to enter a number(say 12) and then click
my button to change it to inch or mm. that's it. just a simple
convertion button.
-
You need to be clear what it is you want to do. If ALL you want is...
was hoping to be able to enter a number(say 12) and then click
my button to change it to inch or mm. that's it. just a simple
convertion button.
Then WHY are you toggling the system units?
-
because i was given a script(Thanks Klaus) and was working from there.
the script using the unit toggle but i was looking for an altenate button to
use. that's why i asked if it was possible to get the status of a user button.
when i couldn't find a user button to use, i created a LED.. i'm working on that
but it still toggles system. Thanks Ian
-
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
-
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.
-
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
-
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?
-
Yes sir.
-
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.
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
-
Thanks Ian,
THAT works !!!
-
Glad you're sorted.
Ian
-
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
-
is there a section where we can share set files ?