Exercise 12 - Constructing a Panel
In this exercise, you construct the panel, as shown in the following figure.
1. Click Panel Editor from the main Rational Statemate window (refer to the following figure).
2. Enter the name 'REAR_DEFOG_PNL' for the Panel Name.
Note: The first part of the panel design is to add some graphical elements that are used as a background and to separate a number of the input and output elements.
3. Click Create Filled Box from the Panel Graphic Editor (PGE) and stretch this to fill most of the panel canvas.
4. Select the Filled Box that you just created
5. Select Tools > Properties. Change the Fill color to BLUE 3 (or any color that you want) and the Line Width to 3.
6. Select Create Line Graphic and draw the lines as shown in the following figure.
8. Click Create Free Text' and enter the text as shown in the following figure. Select all of the text within the panel and then select Edit > Properties > Color and change the text color.
9. Click Create Textual Display Interactor. Create five of them as shown in the following figure.
10. Click Label Existing Interactor and label each of the Display Interactors. To attach a label, enter the name of the particular interactor and then click the mouse on the object.
11. Select the Display Interactor labeled 'Duty Cycle' and then select Tools > Bind to invoke the objects Bindings/Properties window (refer to the following figure).
●
Bind Method: Input Output
●
Controlled by: K_DUTY_CYCLE
●
Element type: Integer
●
Format: Decimal
●
Field length: 6
●
13. Click Apply.
14.
15.
●
Bind Method: Input Output
●
Controlled by: K_Period
●
Element type: Integer
●
Format: Decimal
●
Field length: 6
●
17. Click Apply.
18.
●
Bind Method: Input Output
●
Controlled by: K_RTIMER1
●
Element type: Integer
●
Format: Decimal
●
Field length: 6
●
20. Click Apply.
21.
●
Bind Method: Input Output
●
Controlled by: K_RTIMER2
●
Element type: Integer
●
Format: Decimal
●
Field length: 6
●
23. Click Apply.
24.
●
Bind Method: Input Output
●
Controlled by: K_SPEED1
●
Element type: Integer
●
Format: Decimal
●
●
26. Click Apply.
27.
28. Click Create Push Button Interactor and create a push button labeled 'Rear Defog Switch', as shown in the following figure.
29. Select the Push Button Interactor labeled 'Rear Defog Switch' and then select Tools > Bind to open the object's Bindings/Properties window.
● Bind Method: Input Output
● Controlled by: RDEFOG_SW_STATUS
● Element type: Event
● Button type: Flash
31. Select Create Slider Interactor icon and create a slider labeled 'Vehicle Speed' as shown in the following figure.
32. Select the Slider Interactor labeled 'Vehicle Speed' and then select Tools > Bind to open the object's Bindings/Properties window. See the previous figure.
●
Bind Method: Input Output
●
Controlled by: VEHICLE_SPEED_IN
●
Element type: Integer
34. Click Apply.
35. Select the 'Bindings' button and change it to 'Properties' in the Bindings/Properties window. Enter the following values for the properties settings:
●
Minimum Value: 0.0
●
Maximum Value: 150.0
●
Primary Scale Step: 10.0
●
All other values can remain unchanged.
36. Click OK.
37. Select Create Vertical Multi-Choice Interactor and place it below the Vehicle Speed object as shown in the following figure. For the number of buttons, enter 4.
38. Select the Create Label Interactor and label each button of the interactor as shown in the previous figure.
39. Select the Vertical Multi-Choice Interactor and then select Tools > Bind to invoke the object's Bindings/Properties window.
●
Bind Method: Input Output
●
Controlled by: LOAD_SHED_IN
●
Element type: Enum Type
●
Load Shed Level 0: LM_LEVEL0
●
Load Shed Level 1: LM_LEVEL1
●
Load Shed Level 2: LM_LEVEL2
●
Load Shed Level 3: LM_LEVEL3
●
Click OK.
41. Select Create Lamp Interactor and create a lamp labeled 'Rear Defog Lite' as shown in the following figure.
42. Select the Lamp Interactor and then select Tools > Bind to invoke the object’s Bindings/Properties window.
●
Bind Method: Output
●
Controlled by: RDEFOG_LED
●
Element type: Condition
●
Button type: Toggle
44. Click OK.
45. Select Create Box Graphic and create a box under the Rear Defog Lite'.
46. Select the Create Line Graphic and draw horizontal lines in the box that you just created (refer to the following figure).
47. Select the box and all of the lines that were just drawn. Then, select Group > Make Group. This combines the elements into a single object.
48.
49. Select Group: Group Color (refer to the following figure) from the Bindings window.
●
Controlled by: DEFOG_DRIVE_OUT
●
Element type: Bit
●
Select Add Color and choose Red with a value of 0.
●
Select Add Color and choose Black with a value of 1.
51. Click OK.
52.
53.