Touchscreen Buttons
Figure 3.3.3.a – Display Touchscreen Button Blocks
The Raptor™ Touchscreen Display does not have hardware buttons like the other display
modules. In order to get the same kind of functionality, Raptor™ provides a set of blocks to draw
buttons on the screen that act just like physical buttons.
There are two parts to the touchscreen buttons. A
Button Def
block and a
Button Status
block.
The
Button Def
block does the work of both drawing and initializing the button status in
software. This block should be placed in the
Create_Backgound()
subsystem of a
Screen_Definition
. This
ensures that the button will only be active when the current scree on which the button is drawn is
active.
The
Button Status
block may be placed anywhere in the model and acts just like a digital input,
outputting a high value when the button is pressed, and low when released.
Note: When using a touchscreen button to switch between screens, it is highly recommended to place
the
Goto Screen
block inside of a triggered subsystem with a falling-edge trigger to allow the button
status value that triggered the switch to reset before changing screens. This helps to prevent infinite
loops, or being prevented from returning to this screen again.
21