Finishing and Managing the Project : Exercise 12 - Constructing a Panel

Exercise 12 - Constructing a Panel

In this exercise, you construct the panel, as shown in the following figure.

Rear Defog Panel
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.
Filled Box Properties
6.
Select Create Line Graphic and draw the lines as shown in the following figure.
7.
Line Graphics
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.
Free Text
9.
Click Create Textual Display Interactor. Create five of them as shown in the following figure.
Display Interactors
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).
Bindings/Properties Window
12.

Bind Method: Input Output

Controlled by: K_DUTY_CYCLE

Element type: Integer

Format: Decimal

Field length: 6

Fraction part: 0

13.
Click Apply.
14.
Select Bindings and change it to 'Properties' from the Bindings/Properties window.
15.
Change the Text Color value to BLACK (refer to the following figure). Click OK.
Properties Window
16.

Bind Method: Input Output

Controlled by: K_Period

Element type: Integer

Format: Decimal

Field length: 6

Fraction part: 0

17.
Click Apply.
18.
Change the Text Color value to BLACK and click OK.
19.

Bind Method: Input Output

Controlled by: K_RTIMER1

Element type: Integer

Format: Decimal

Field length: 6

Fraction part: 0

20.
Click Apply.
21.
Change the Text Color value to BLACK and click OK.
22.

Bind Method: Input Output

Controlled by: K_RTIMER2

Element type: Integer

Format: Decimal

Field length: 6

Fraction part: 0

23.
Click Apply.
24.
Change the Text Color value to BLACK and click OK.
25.

Bind Method: Input Output

Controlled by: K_SPEED1

Element type: Integer

Format: Decimal

Field length: 6

Fraction part: 0

26.
Click Apply.
27.
Change the Text Color value to BLACK and click OK.
28.
Click Create Push Button Interactor and create a push button labeled 'Rear Defog Switch', as shown in the following figure.
Push Button Interactor
29.
Select the Push Button Interactor labeled 'Rear Defog Switch' and then select Tools > Bind to open the object's Bindings/Properties window.
30.
Bind Method: Input Output
Controlled by: RDEFOG_SW_STATUS
31.
Select Create Slider Interactor icon and create a slider labeled 'Vehicle Speed' as shown in the following figure.
Vehicle Speed Interactor
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.
33.

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

No. of Secondary Partitions: 1

All other values can remain unchanged.

36.
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.
Vertical Multi-Choice Interactor
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.
40.

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.
Lamp Interactor
42.
Select the Lamp Interactor and then select Tools > Bind to invoke the object’s Bindings/Properties window.
43.

Bind Method: Output

Controlled by: RDEFOG_LED

Element type: Condition

Button type: Toggle

44.
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).
User Drawing
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.
Select the group and then select Tools > Bind to open the object's Bindings/Properties window.
49.
Select Group: Group Color (refer to the following figure) from the Bindings window.
Group Bindings
50.

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.
Group Color
52.
Select Create Free Text and enter Rear Defogger. Place it under the Rear Defogger object.
Note: Groups cannot be labeled.
53.
Select File > Save from the PGE and then File > Exit.