Hello Guest it is December 09, 2024, 06:18:41 PM

Author Topic: External LED's Again  (Read 2253 times)

0 Members and 1 Guest are viewing this topic.

External LED's Again
« on: March 05, 2015, 04:31:03 AM »
Sorry about this, I' sure it must have been covered but I've done a search and gained some info but am still not sure how to achieve what I want.

I am trying to drive 2 external led's to duplicate the Flood and Mist Led's in Mach 3. The OEM codes are 12 and 13 for these Led's

From another post I've gathered the following Macro will do what I want if I assign Output 8 to an output pin connected to my Flood led.

If GetOEMLED (12) Then
ActivateSignal (Output 8)
End If

Have I got this exactly right? and if so where/how do I enter and save the Macro

Many thanks, I'm nearly there now!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: External LED's Again
« Reply #1 on: March 05, 2015, 04:41:45 AM »
Would also likely need an Else,

If GetOemLED(12) Then
ActivateSignal (OutPut 8 )
Else
DeActivateSignal(OutPut 8 )
End If


You would write it in the macropump so that it is always running in the background. You would have to enable the macropump in General Config and then restart Mach for it to be loaded.

If you do not already have a macropump just save the above code and name it macropump.m1s and save to the macro folder of the profile you are using.

Alternatively you could use a Brain.

Hood
Re: External LED's Again
« Reply #2 on: March 05, 2015, 05:13:15 AM »
Many thanks, all sorted!