Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: kilooli 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
-
You could create a macro to turn the LED on and have the m code of that macro in ithe initialisation string.
Hood
-
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
-
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
-
OK thanks Hood !
I understand now.
I didn't know about that initialisation string...Now it's done .
Thanks again.
-
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...
-
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
-
SetUserLED (*********,1)
-
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
-
No probs, the documentation is not the easiest to follow at the best of times :)
Hood