Hello Guest it is March 28, 2024, 04:58:58 AM

Author Topic: Assign Led to step value  (Read 10231 times)

0 Members and 1 Guest are viewing this topic.

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Assign Led to step value
« Reply #10 on: September 13, 2017, 01:20:53 PM »
Klaus1311,

What I get is that rather than toggling between the the different steps which are defined in config he just wants to set the jogging incremental distance to the value that is on the button and the led lights up to indicate the selection.

Three button's for three different steps........... 

Why wanted dosen't need to make sense to anyone.
Seems like a waste of time, but that's just my opinion............

Correct me if I am wrong.

RICH
Re: Assign Led to step value
« Reply #11 on: September 13, 2017, 03:50:45 PM »
RICH ,

You have understood well.
Three buttons for three different increments, as in Tormach  PathPilot.

Roberto
Re: Assign Led to step value
« Reply #12 on: September 13, 2017, 03:55:13 PM »
Hi Rich,

I thought the task was selecting one increment out of 5 (specified in config) by hitting a button and light up the according LED. OK, however, thats what my sample is doing.


Klaus
« Last Edit: September 13, 2017, 03:57:53 PM by Klaus1311 »
The brain isn't a soap, it doesn't shrink when used.

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Assign Led to step value
« Reply #13 on: September 13, 2017, 05:27:06 PM »
To start:
Just add the following script to each of your buttons:

Your BUTTON LABELED 1.00
SetDRO (28,1.00)


Your BUTTON LABELED 0.10
SetDRO (28,0.10)

Your BUTTON LABELED 0.01
SetDRO (28,0.01)

When you click the button the Jog INC DRO will change to the values in the script.
Now where did you get the LED's from? What type?
You would simply add additional script to each of the button's to turn the pressed button LED on and the other two off.

Just one way of doing it................

RICH

Re: Assign Led to step value
« Reply #14 on: September 14, 2017, 05:08:40 AM »
Hi RICH,

Now where did you get the LED's from? What type?
Image with Photoshop
Button 1.00 with Image Button ( Image Trasparent and function Select Step Value 3)
Button 0.10 with Image Button ( Image Trasparent and function Select Step Value 2)
Button 0.01 with Image Button ( Image Trasparent and function Select Step Value 1)
Led with Photoshop image (Function ??? )

I would like to press it directly without going lap (1.00-0.10-0.01-1.00-0.10-0.01 etc. etc.)
Re: Assign Led to step value
« Reply #15 on: September 16, 2017, 12:34:40 PM »
Hi,

I solved this script.

If DoOEMButton (266) Then
End If

If (GetUserLED(1121) = 0) Then
   SetUserLED(1121,1)
   SetUserLED(1122,0)
   SetUserLED(1120,0)
End If

Klaus1311 Thank you for your wonderful work.

Roberto

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Assign Led to step value
« Reply #16 on: September 16, 2017, 09:02:52 PM »
Good for you Roberto... :)

RICH