Creating a Vehicle Rear Defogger System : Exercise 9 - Describing Behavior

Exercise 9 - Describing Behavior

In this exercise, you learn two new methods for describing behavior within Rational Statemate - Mini-Specs and Truth Tables.

1.
Select the activity-chart called 'REAR_DEFOG_SS' from the Chart View.
2.
Select the activity called 'REAR_DEFOG_OUTPUT_FCTS' and then select Edit > Properties (refer to the following figure).
Properties for Activity
3.
Change the Selected Implementation from None to Mini-Spec.
4.

started/

DEFOG_DRIVE_OUT=0b1;; /* initialize to off*/

 

ch(DEFOG_DRIVE_SIG)/REAR_DEFOG_OUTPUT_TT;;

 

// The following is an alternative behavior if you did not want to use

// a truth table.

//

// ch(DEFOG_DRIVE_SIG)/

// if DEFOG_DRIVE_SIG then

// DEFOG_DRIVE_OUT=0b1;

// else

// DEFOG_DRIVE_OUT=0b0;

// end if;;

5.
Click Save.
6.
Click Open References.
7.
8.
Change the element Type from Event to Action and the Selected Implementation should be defined as Truth Table.
9.
Click Save. This enables the Truth Table Editor for this element. Selection is near the bottom of the form. Refer to the following figure.
Truth Table Implementation
10.
For the action statement 'REAR_DEFOG_OUTPUT_TT', click Edit to invoke a truth table editor.
11.
Select Worksheet > Redefine Table from the truth table editor window and input the settings, as shown in the following figure.
Redefine Worksheet
12.
Truth Table Settings