beautypg.com

BrightSign Object Reference Manual (FW 5.1) User Manual

Page 279

background image

271

specifies the button number (0-11), while the second integer uses a bit field to specify the on/off behavior of the button
LED. The size of the bit field (up to 32 bits) is determined with the Offset 0 – Byte 3 value described in the section above.

Each bit specifies the on/off behavior of a single cycle, and the BP200/BP900 button boards run at approximately 11Hz.
For example, if you want an LED to cycle on every other second, you would set the Offset 0 – Byte 3 value to

&h16 (22

bits) and the bit field itself to

&h3FF800 (0000000000011111111111).


Example: The following code sets a BP900 to “twinkle” by turning off each button LED at a different point in the cycle.

led=CreateObject("roControlPort", "TouchBoard-0-LED")
led_setup=CreateObject("roControlPort", "TouchBoard-0-LED-SETUP")
led_setup.SetOutputValue(0, &h000B00A0)
led.SetOutputValue(0, &h07fe)
led.SetOutputValue(1, &h07fd)
led.SetOutputValue(2, &h07fb)
led.SetOutputValue(3, &h07f7)
led.SetOutputValue(4, &h07ef)
led.SetOutputValue(5, &h07df)
led.SetOutputValue(6, &h07bf)
led.SetOutputValue(7, &h077f)
led.SetOutputValue(8, &h06ff)
led.SetOutputValue(9, &h05ff)
led.SetOutputValue(10, &h03ff)