SwLED - Bistate button to switch LED

This is where you talk about Plugins. How they are made and how they work, show examples.

SwLED - Bistate button to switch LED

Postby dezsoe » Wed Nov 08, 2017 1:36 pm

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
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: SwLED - Bistate button to switch LED

Postby dezsoe » Sat Feb 24, 2018 12:19 am

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.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to Plugins

Who is online

Users browsing this forum: No registered users and 12 guests