A2 Support:
How to compile and
execute the (Starter) Heater System:
- Go to
Component View
- Set HSComponent to Active
- Build
Model (Click on Hammer symbol in Toolbox toolbar)
- Go to
Deployment View
- Set HSComponentInstance to Active
- 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)
- Execute
the Model
- Press
the Start button (Play)
- Expand
the tab “HeatingSystem” (in Runtime View) and
choose the capsule to which you want to send a signal
- Open
Structure Monitor of that capsule (right click on capsule and choose
“Structure Monitor”)
- Click
on the Probe symbol (black cross in the toolbar)
- 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
- Expand
the tab “Probes” (in Runtime View) and open the specification of the probe
that you have just set up.
- Under
Details insert the signal(s) that you want to inject.
- Apply
changes
- Double
click on the signal in order to inject the signal.
- (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.