Exercise 5 - Constructing a Panel
This exercise takes you through the process of constructing the panel as shown in the following figure.
1. Select Panel Editor from the main Rational Statemate window. The Open Panel window opens.
2. Enter the name TRAFFIC_LIGHT_PNL for the Panel Name.
3. To begin the panel design, add a background to separate the input and output elements. Select Create Filled Box from the Panel Graphic Editor and stretch this to fill the panel canvas.
4. Select the new Filled Box and select Tools >Properties. The Bindings/Properties window opens.
5.
6. Select the Fill Color field and click Choose... The Color Viewer for PGE window opens. See the figure.
7.
8. Click Create Free Text, and typeTraffic Light System
.
9.
10. Click Push Button and add this element to the panel. See the figure.
11. Click Label Existing Interactor, type the wordCHANGE
. The label name follows the cursor. Place the label over the push button object and click.
12. Select the push button object that you created and then select Tools > Bind. Select the following for the binding values for the object labeled CHANGE. See the figure.
●
Bind Method - Input Output
●
Controlled by - CHANGE
●
Element type - Event
●
Button type - Flash
Note: The Controlled by: value must be manually typed into the field. All other values are selected from the drop-down menu that opens when clicking on the value.
13. Click Create Lamp Interactor and create three lamps as shown in the figure.
14. Select the top lamp interactor and then select Tools > Bind to invoke the object's Bindings/Properties window.
Enter the following information as the Binding values for the object:
●
Bind Method - Output
●
Controlled by - RED_LIGHT
●
Element type - Condition
●
Button type - Toggle
15. Click Apply.
16. Switch to the Properties page by selecting the Bindings/Properties tab. See the figure.
18. Click OK.
19. Select the middle lamp interactor and then select Tools > Bind to invoke the object’s Bindings/Properties window. Enter the following for the Binding values for the object:
●
Bind Method: Output
●
Controlled by: YELLOW_LIGHT
●
Element type: Condition
●
Button type: Toggle
20. Click Apply.
21. Switch to the Properties page by selecting the Bindings/Properties tab and enter the following information for the Property values:
●
Highlight Color: YELLOW
22. Click OK.
23. Select the bottom Lamp Interactor and then select Tools > Bind to invoke the object's Bindings/Properties window.
●
Bind Method - Output
●
Controlled by - GREEN_LIGHT
●
Element type - Condition
●
Button type - Toggle
25. Click Apply.
26. Switch to the Properties page by selecting the Bindings/Properties tab and enter the following for the Property values for the object:
●
Bind Method - Output
●
Highlight Color - GREEN
27. Click OK.
28. Select File > Save from the PGE and then File > Exit.