Page 1 of 1

SwLED - Bistate button to switch LED

PostPosted: Wed Nov 08, 2017 1:36 pm
by dezsoe
Sometimes you need a button to turn an LED on/off. Normally, you can do it with a macro where you call exec.SetLED and AS3.Switchbutton. But it doesn't work while UCCNC is in reset state, because then you cannot start a macro. I made a plugin to solve this problem. You have to put a bistate button on the screen with button number 5000+LED number. E.g. you put button 5400 on the screen then it will toggle LED 400, even if the reset state is active.

There is no user interface on this plugin, you just need to enable it.

Download

Alternate download

Re: SwLED - Bistate button to switch LED

PostPosted: Sat Feb 24, 2018 12:19 am
by dezsoe
The new version of SwLED plugin is available to download on the original links in post #1.

History:

1.0
  • Switch buttons 5001..5000 + MaxLED: toggle switchbutton (5000 + n) state and LED (n)

1.1
  • AnyCPU support: runs on x86 and x64 systems
  • Switch buttons 4000..4899: toggle switchbutton state (no additional LEDs)
  • Buttons 4900..4999: call plugin Showup
    In the profile create SwLED section and keys as in the example below:

    Code: Select all
    [SwLED]
    PluginButton4900=Console.dll,True
    PluginButton4901=Modbusmaster.dll

    If you write ",True" after the dll then the plugin will be called even if cycle is started, otherwise the buttons work like other macro buttons which do nothing while code is running.