nmpButtonFlash (Function) |
Top Previous Next |
This function will make the background of a configurable button on the NMP begin or stop alternating between its normal background color and its specified color. This feature can be used to bring attention to the device.
Input: id : INT The ID of the button - between 1 and the button count defined in nmpButtonsDefine.
flash : BOOL This determines if the button should flash or not. If false, the remaining parameters are ignored.
duration : INT (0..32767, default : 0) The number of seconds to flash for. Use 0 to keep flashing until stopped with a call to nmpButtonFlash.
period : INT (100..32767, default : 1000) The number of milliseconds between each color change. This can be used to change the flashing frequency and is rounded up to the next 100 milliseconds.
color: DINT (16#00_00_00..16#FF_FF_FF, default: 16#00_FF_00) Determines the color that the button should flash to. Instead of specifying the color directly, the nmpRGBToDint function can be used.
night_color: DINT (-1, 16#00_00_00..16#FF_FF_FF, default: -1) Determines the color of the button to use when flashing in the night theme. If -1, the normal color will be used. Instead of specifying the color directly, the nmpRGBToDint function can be used.
Returns: INT
Declaration: FUNCTION nmpButtonFlash : INT;
Example: INCLUDE rtcu.inc |