Hello Guest it is March 28, 2024, 07:14:11 PM

Author Topic: Set a User LED to be On by default  (Read 5156 times)

0 Members and 1 Guest are viewing this topic.

Set a User LED to be On by default
« on: December 15, 2013, 04:29:03 AM »
Hello,

I created a User led with a user button, and i'd like to have this LED to be lit (turned on) by default when i launch Mach3
, and then when i would  press my button it would  turn the LED off.

I would like to know if there's a way to do this as LED states don't appear to be editable.
Maybe i should try to edit (carefully) the XML to force mach3 to light my LED as it starts ?

Thanks

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Set a User LED to be On by default
« Reply #1 on: December 15, 2013, 07:47:27 AM »
You could create a macro to turn the LED on and have the m code of that macro in ithe initialisation string.
Hood
Re: Set a User LED to be On by default
« Reply #2 on: December 15, 2013, 10:16:14 AM »
Thanks Hood.
Could you explain me more or give me an example please ?
You mean the LED would be turned on by the G-Code ?
But what if i don't load any G-Code ?
Thanks

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Set a User LED to be On by default
« Reply #3 on: December 15, 2013, 10:19:38 AM »
If you make a macro that switches the LED  On then save that macro in the macro folder of the profile you use. If you save the macro as , say, m101.m1s then enter m101 into the initialisation string  (General Config page) when you start Mach and press Reset the LED will be turned on.
Hood
Re: Set a User LED to be On by default
« Reply #4 on: December 15, 2013, 10:39:38 AM »
OK thanks Hood !
I understand now.
I didn't know about that initialisation string...Now it's done .
Thanks again.
Re: Set a User LED to be On by default
« Reply #5 on: December 15, 2013, 10:58:55 AM »
Hummmm.
How do i switch a LED ? (just the LED)
There's no kind of 'SetOEMLED' instruction.
I need to turn on an output to do this, but it uses a spare output...

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Set a User LED to be On by default
« Reply #6 on: December 15, 2013, 11:04:47 AM »
I dont know what number you are using for the LED but something like this (where **** represents the number you use) should work.

SetUserLED(****,1)

Hood

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Set a User LED to be On by default
« Reply #7 on: December 15, 2013, 11:05:50 AM »
SetUserLED (*********,1)
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Set a User LED to be On by default
« Reply #8 on: December 15, 2013, 11:09:29 AM »
Excuse me , i haven't looked at the documentation enough.
I thought the SetUserLED wasn't existing !!!!!
I'm an idiot !
Thanks Hood & ger 21

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Set a User LED to be On by default
« Reply #9 on: December 15, 2013, 11:23:51 AM »
No probs, the documentation is not the easiest to follow at the best of times :)
Hood