A2 Support:

 

How to compile and execute the (Starter) Heater System:

  1. Go to Component View
  2. Set HSComponent to Active
  3. Build Model (Click on Hammer symbol in Toolbox toolbar)
  4. Go to Deployment View
  5. Set HSComponentInstance to Active
  6. Execute the Model (Click on Flash symbol in Toolbox toolbar)

 

How to (artificially) inject signals into Ports (or how to set up a probe):

(this is useful to debug your model)

  1. Execute the Model
  2. Press the Start button (Play)
  3. Expand the tab “HeatingSystem” (in Runtime View) and choose the capsule to which you want to send a signal
  4. Open Structure Monitor of that capsule (right click on capsule and choose “Structure Monitor”)
  5. Click on the Probe symbol (black cross in the toolbar)
  6. In order to assign a probe to a port click on the port (in the structure diagram) to which you want to send a signal
  7. Expand the tab “Probes” (in Runtime View) and open the specification of the probe that you have just set up.
  8. Under Details insert the signal(s) that you want to inject.
  9. Apply changes
  10. Double click on the signal in order to inject the signal.
  11. (You may monitor the state changes of a particular capsule in the corresponding “State Monitor”)

 

How to use the Timer:

 

Declaration:

For the capsule that uses the Timing Port create an attribute of type RTTimer

 

Activation:

Use the following C++ command (as an Action attached to a state transition) to activate the timer (creating a TimeOut):

attributeName = timerPortName. informIn(mSec);

     

***

Replace attributeName with the name of attribute that is of type RTTimer     

Replace timerPortName with the name of the Timing Port

                Replace mSec with the desired time interval (in milliseconds)

***

 

Cancellation:

In order to cancel the running timer (TimeOut) use:

timerPortName.cancelTimer(attributeName);

 

TimeOut Signal:

When the timer times out a “timeout” signal will be send to the Timing Port.