Flasher ?
mex_lithuania
Junior Member
Hey guys,
I'm wondering what is the best way to make a button/relay/etc on-off flasher?
I came up with few models, but the code is too big for such a simple task. I believe you have better solutions.
For example if we need to flash button for a specific time. And for this time we have a variable: flasherTime = 8; // 8 is for 8/10 sec
Ideas?
I'm wondering what is the best way to make a button/relay/etc on-off flasher?
I came up with few models, but the code is too big for such a simple task. I believe you have better solutions.
For example if we need to flash button for a specific time. And for this time we have a variable: flasherTime = 8; // 8 is for 8/10 sec
Ideas?
Comments
-
Probably the easiest way would be to create a flasher variable and then another variable o enable he thing.
So something likedefine_program wait 7 { flasher=!flasher } [tp_01,1]=flasher && button_fb_enable
So, the idea is that you just turn on the varialbe button_fb_enable whenever you want the button to flash. -
-
you're welcome.
-
Flasher
Hey Eric is been a while I havent hear from you.
Here is a simple code for blank screen that I was able to make with the help from Vinning, Eric, and Daniel.
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
VOLATILE INTEGER FLASHER
VOLATILE INTEGER PROJECTOR_MUTE_STATUS
VOLATILE INTEGER nSource = 0
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
BUTTON_EVENT[dvTP,2] // System Off
{
PUSH:
{
SEND_STRING dvProjector,"$02,'POF',$03";
g_bProj_Main_Power = 0;
PROJECTOR_MUTE_STATUS = 0; //IT WOULD STOP FLASHING BUTTON
SEND_STRING dvSwitcher,"'7!',$0D";
BUTTON_EVENT[dvTP,55] //Shutter
{
PUSH:
{
PROJECTOR_MUTE_STATUS=!PROJECTOR_MUTE_STATUS;
IF (PROJECTOR_MUTE_STATUS)
{
SEND_STRING dvProjector,"$02,'OSH:1',$03";
}
ELSE
{
SEND_STRING dvProjector,"$02,'OSH:0',$03";
}
}
}
(***********************************************************)
(* THE ACTUAL PROGRAM GOES BELOW *)
(***********************************************************)
WAIT 7 // Changes the flasher state every .7 seconds
{
FLASHER=!FLASHER
}
[dvTP,55] = (PROJECTOR_MUTE_STATUS && FLASHER) // Flashes only if muted AND flashing enabled -
Get a little jiggier with it
You can also use a send command to set the button's feedback state to blink.
^BFB-1,On
^BFB-1,Off
^BFB-1,Blink
(1 is the button's address code in my example)
I have used use this extensively for projector lamp status as well as alarm system arming up status. -
Nice
I will try it on m code, thanks
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums