Hello Guest it is March 28, 2024, 06:41:51 AM

Author Topic: new button and led  (Read 6840 times)

0 Members and 1 Guest are viewing this topic.

Offline amnon

*
  •  40 40
    • View Profile
new button and led
« on: January 29, 2015, 01:57:37 PM »
Hello,

How can I add a led to my new button?

Best Regards
Amnon

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: new button and led
« Reply #1 on: January 30, 2015, 09:04:48 AM »
What exactly are you meaning, is it to have a LED within a button such as the pic below or is it to have a LED associated with something that the button does?

If the latter you will have to explain what your button is for and whether it is a standard button or a VB one.

Hood

Offline amnon

*
  •  40 40
    • View Profile
Re: new button and led
« Reply #2 on: January 31, 2015, 07:40:04 AM »
Hej Hood,

I'd like to add button and LED, but made in mach Screen (not a standard). LED will give me information, if a VB code was executed.

Respect
Amnon

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: new button and led
« Reply #3 on: February 01, 2015, 04:52:00 AM »
If your button is a VB button then you just need to include code to turn on/off the LED when appropriate. The LED will most likely have to be a User LED unless of course what the VB is turning on/off is a standard output.
Hood

Offline amnon

*
  •  40 40
    • View Profile
Re: new button and led
« Reply #4 on: February 01, 2015, 03:25:16 PM »
Thank's Hood,
Is it a VB button, if I create It in Mach Screen? hmmm... How can I create such a button in VB, VB studio?

Amnon

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: new button and led
« Reply #5 on: February 02, 2015, 03:43:03 PM »
In the screen designer you make a VB button then once back in Mach you go to Operator menu then Edit Button Scripts. The VB button will be flashing, click it then enter your VB in the editor that appears then save and close the editor.

Hood

Offline amnon

*
  •  40 40
    • View Profile
Re: new button and led
« Reply #6 on: February 05, 2015, 06:33:07 AM »
When I push a button my led does not turn on. Wrong OEM LED number?  What number should I used.

Respect
Amnon

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: new button and led
« Reply #7 on: February 05, 2015, 06:40:20 AM »
Unless you say what your VB is actually doing then afraid there is no way that anyone can tell you what is wrong.
Hood

Offline amnon

*
  •  40 40
    • View Profile
Re: new button and led
« Reply #8 on: February 07, 2015, 03:44:08 AM »

My button is changing Feed Rate and turning on JOG, if it is not active. When I push it, macro is changing Feed Rate and turn on 1 LED, then check if JOG is active or not and then turning on LED.

Amnon

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: new button and led
« Reply #9 on: February 07, 2015, 04:13:33 AM »
Can you attach/paste the VB please.
Hood