Button State
VladaPUB
Posts: 139
BUTTON_EVENT[dvPANEL,59]
{
PUSH :
{
ON[dvRELAY,5]
SEND_COMMAND dvPanel,"'^ANI-1,1,2,100'"
}
}
I look around the forum, but I did not find answer. I want to change state of button when I press it, on meabye wneh I have some feed back, but . .. . problem is in SEND COMMAND to Panel. This code up don't work. I have made multistate button .. . but somewhere is problem ?! WHERE ?
Do i need to change feedback of the button in TP Design or something else ?
{
PUSH :
{
ON[dvRELAY,5]
SEND_COMMAND dvPanel,"'^ANI-1,1,2,100'"
}
}
I look around the forum, but I did not find answer. I want to change state of button when I press it, on meabye wneh I have some feed back, but . .. . problem is in SEND COMMAND to Panel. This code up don't work. I have made multistate button .. . but somewhere is problem ?! WHERE ?
Do i need to change feedback of the button in TP Design or something else ?
0
Comments
Make sure that the address port and address code for your button are assigned in the programming tab of button properties.
"'^ANI-<variable text address range>,<start state>,<end state>,<time>'"
Good Luck!
Can you post exapmle code ? I want to button remain in that state !
SEND_LEVEL, dvPanel, <level channel>, <device state>
... replacing the <> values with the appropriate numbers (no angle brackets).
Something I like to do with this method is have a state where the button is completely transparent, so I can make it disappear when it cannot be used.
I push a button and send a comand to device, i and recive a feedback of device. I want to change a state of button with feedback, something like this :
but the button don't remain ih that sate when i push some other button ! I recive a feedback from device, but button don't remain in state that is in this command when i recive some other feedback from same device. How to solve a problem ?
Make absolutely sure that you have set both the channel ID and the Address ID for the buttons you are trying to control.
I had a similar problem and I could not get the code to work until I noticed that the ^ANI command was referencing the button address code and not the channel code.
Once I had set the address code correctly, re-loaded the panel and ran my testing and troubleshooting program for this code, everything worked just as I intended it to.
I'm surprised that the ^ commands were written for the address code instead of the button channel code, but hey, there must have been a reason and we just have to get our brains used to the way the commands are written.
Brad Odegard
Hi all, new member here.
I'd like to use some multi-state buttons, but I don't want any animation, I want to set every state "by hand". I don't find any clear definition of the send_command syntax in this context.
In fact, send_command information at all has been pretty scarce. Is there a definitive reference?
Is this ^ANI command syntax the only way to directly control button states explicitly?
Thanks for any replies. This looks like an excellent forum.
Define it as a multi-state bargraph. In your properies, make as many states as you need, and set the level range to your number of states (ie., if you have 5 states, make the minimum level range 1, and the maximum 5). When ytoiu want to change the state of the button, use SEND_COMMAND dvPanel, <level code>, <button state value>.
I read some about that earlier in the thread, and it makes sense (I guess).
Sounds like that is about the cleanest route to really controlling multi-state buttons.
In a bigger picture sense, *is* there a definitive guide to the various send_commands and its parameters? I've found only scattered bits.
Yes. I know. I'm new. ;-)
Thanks again.
The netlinx and axcess help docs are always to be used in conjunction with the device manuals and software history... it helps keep unnecessary bloat out of the programming manual so it doesn't try to be all things to all devices