Machsupport Forum

Mach Discussion => Mach Screens => Machscreen Screen Designer => Topic started by: BobMill on September 09, 2017, 06:58:13 PM

Title: Assign Led to step value
Post by: BobMill on September 09, 2017, 06:58:13 PM
Hello,

How can I assign the LED to the step value Button?


Thank you in advance
Roberto
Title: Re: Assign Led to step value
Post by: Klaus1311 on September 10, 2017, 05:40:03 AM
Hi Roberto,

assign Funktion "Jog mode Incr LED" (OEM-Code = 15). If you look at page 50 of the standard screen set you'll see a sample.

Klaus
Title: Re: Assign Led to step value
Post by: RICH on September 10, 2017, 05:45:45 AM
Make it easy by adding the Jog Mode button so you can toggle between Cont, Step, MPG.

Otherwise, have a check of the button / led / dro list if  there is a button to just select step.

RICH
Title: Re: Assign Led to step value
Post by: BobMill on September 10, 2017, 04:46:28 PM
Hi,

I meant the led at 1.00 - 0.10 - 0.01.
By pressing the button directly without making a loop.

Roberto
Title: Re: Assign Led to step value
Post by: RICH on September 10, 2017, 10:22:55 PM
Hmm.....
I didn't find a LED which is associated with any of the Jog Increment positions for 1 to 10.
May be able to add some scripting which would turn the led on/off.
Can't be of much help on the scripting.

RICH

Title: Re: Assign Led to step value
Post by: Klaus1311 on September 11, 2017, 05:17:01 AM
I added 2 samples to my sample list. One of it shows how to set the jog width using a button. You can download it from my website under:
Program Downloads -> Script samples.

Klaus
Title: Re: Assign Led to step value
Post by: BobMill on September 11, 2017, 11:45:05 AM
Hi,

I'll try to do it, but I do not think I can do it, I do not know anything about scripts.

Thanks
Roberto
Title: Re: Assign Led to step value
Post by: Klaus1311 on September 11, 2017, 01:15:50 PM
if you download the samples from my website, doublecliick that file. This will put the sample files into the mach directory. Copy and paste the sample screenset to your screenset page and adapt it to your needs.

Klaus
Title: Re: Assign Led to step value
Post by: BobMill on September 13, 2017, 06:52:18 AM
HI,

Your script and OK
The problem is that it has to perform 3 functions.
Press button 1.00
1) Performs the function of the key( Slect step value1)
2) LED ON
3) LED OFF button 0.10  or 0.01

Thanks
Title: Re: Assign Led to step value
Post by: Klaus1311 on September 13, 2017, 10:37:26 AM
Hi,

I don't understand what you are trying to say. Could you please put your question on other words.

Klaus
Title: Re: Assign Led to step value
Post by: RICH 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
Title: Re: Assign Led to step value
Post by: BobMill on September 13, 2017, 03:50:45 PM
RICH ,

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

Roberto
Title: Re: Assign Led to step value
Post by: Klaus1311 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
Title: Re: Assign Led to step value
Post by: RICH 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

Title: Re: Assign Led to step value
Post by: BobMill 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.)
Title: Re: Assign Led to step value
Post by: BobMill 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
Title: Re: Assign Led to step value
Post by: RICH on September 16, 2017, 09:02:52 PM
Good for you Roberto... :)

RICH