EnableButton() - The Enable/Disable Button Command
This command locks and unlocks buttons on a user interface. This is a more targeted approach compared to useing the PanelEnable(0x16) and PanelDisable(0x15) packets.
| This command works the same way as the LedOnOff() command. You can use the LED calculator and then just change the command. |
Syntax
EnableButton(Buttons 1-4 BitField, Buttons 5-8 BitField, Buttons 9-12 BitField, Buttons 13-16 BitField)
Each byte is for a set of 4 Buttons with the first 4 bits (high nibble) enabling buttons and the last 4 bits (low nibble) disabling buttons.
-
bit 8 - Button 1 Enable
-
bit 7 - Button 2 Enable
-
bit 6 - Button 3 Enable
-
bit 5 - Button 4 Enable
-
bit 4 - Button 1 Disable
-
bit 3 - Button 2 Disable
-
bit 2 - Button 3 Disable
-
bit 1 - Button 4 Disable
If both an enable and a disable bit set or neither set for the same button it will maintain state.
| Parameter | Enable | Disable | ||||||
|---|---|---|---|---|---|---|---|---|
Button Number |
1 |
2 |
3 |
4 |
1 |
2 |
3 |
4 |
Binary Value |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
Hex Value |
80 |
0 |
20 |
0 |
0 |
0 |
0 |
1 |
Hex Result |
100=A |
1=1 |
||||||
Packet |
EnableButton(0xA1,0.0.0) |
|||||||
Result |
B1 Enabled, B2 No Change, B3 Enabled, 8-16 No Change |
|||||||
| You can use the join setting of the virtual panel to help calculate the right values. Just remember the order is reversed. Bit 8 is button 1! |