I was trying the voice command functions in DC-24 today and noticed that while it works as it should the voice-commanded switches are momentary. And since I was after a ON-OFF function I needed a way to make a function that on first activation would make things go ON and on the next activation would make things go OFF.
Perfect opportunity to learn some more LUA…
What does this LUA-script do?
A few things actually:
- Possibility to configure 5 switches
- Has a monitor screen for easy testing
- Activate momentary switch -> latching switch goes ON
- Activate momentary switch again -> latching switch goes OFF
- All switches created bu application are OFF on initialization of model
There is one important thing to remember, the momentary switch is allowed to be ON for max. 2 seconds. Any longer than that makes the latching switch return to its previous state. Leaving the momentary switch ON for a long period results in application switch jumping between states every two seconds.
Where to get it
Use of application
This is easy to use. Open from menu “Application” -> “Momentary to Latching” and from the applications “Momentary To Latching”-screen set switches as you would normally do:
To the left of your switch is the status display of corresponding latching function:
In the picture above we can see the latching switch 1 being active even when selected switch Sf is not. Activating Sf again will return the latching switch 1 to OFF.
This application is perfect for those voice command switches, after giving a voice command the voice switches are active only for a small moment, they are not latching. This gives you more possibilities to use them.
After setting the desired amount of momentary to latching switches up you can use them where ever you would use switches:
That was so easy!
If you use this I’d very much would like to hear it so post in the comments or drop me an email!