Hello Guest it is December 07, 2019, 07:27:47 PM

Author Topic: How to set up OEM LED IN MACH3?  (Read 6066 times)

0 Members and 1 Guest are viewing this topic.

How to set up OEM LED IN MACH3?
« on: July 09, 2013, 09:39:29 AM »
Hello,

Can anyone please help me , how to configure OEM LED in mach3, I whant to light up an LED when the M30 comand apperars, to have a signal when the program has ended.
I haven a secound printer port enabled and i whant to get a ''1 logic'' when the program has ended.
I saw that in OEM LED Code list there are codes that emulates that state burt I can not find where to put that code say:, output 3 enabled pin 14 port 2 when M30 is shown, I gues that there is a method to do that not only for what I wand but for other functions that Mach can light a LED Output say: (spindle running) useing the OEM Led code list ???

Thank You!

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: How to set up OEM LED IN MACH3?
« Reply #1 on: July 09, 2013, 01:55:21 PM »
The easiest method would be to make a custom macro up to switch the output you want and then insert the Mcode into your G Code just before the M30.

An example would be ;
Operator menu in Mach then Edit VB Scripts.
The editor will open.
Type/paste in the following

ActivateSignal(OutPut3)

Then save as something like m123.m1s (User M Codes should be above 100)  and save it to the macro folder of the profile you are using. Once done then any time you have m123 in your code that output will switch on.

Hood
Re: How to set up OEM LED IN MACH3?
« Reply #2 on: July 09, 2013, 03:18:52 PM »
OK. Thank you:))I've learned something today.I have tried it and it works:P but it stops only with E-stop

But how do I make it without macros, I wanna do it by useing the OEM led codes, for others signals,and where can I find tutorials for doeing so?
 
Thank you again!

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: How to set up OEM LED IN MACH3?
« Reply #3 on: July 09, 2013, 03:29:12 PM »
OEM LED codes are not for doing things like that, they are codes so you can access functions from VB or Brains. For example you may want to do something when the LED for cycle start is active. To do that something you would have the macropump or a Brain look out for that LED and when its seen it will do whatever you have asked it to do.


If you want to switch off the output you have activated via the aforementioned macro then you could make up a VB screen button to shut it off.

Hood
Re: How to set up OEM LED IN MACH3?
« Reply #4 on: July 09, 2013, 04:53:52 PM »
it sounds ok , but for my level on VB and Brain writeing might sound too much, can you plese give me some hints or some links to learn that? Romanian forums do not cover that.

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: How to set up OEM LED IN MACH3?
« Reply #5 on: July 09, 2013, 05:38:09 PM »
You will find some info regarding VB in the manuals here
http://www.machsupport.com/help-learning/product-manuals/

There is a video showing the basics of Brains here
http://www.machsupport.com/videos/

And you will also find some info regarding VB in the wiki, here
http://www.machsupport.com/Mach3Wiki/index.php?title=Main_Page


Hood