VOLTAGE ORIENTED CONTROL – IMPLEMENTATION
Figure 4.7 : Control Panel in Control Desk
In each Simulink block, you can specify an Initialization and Termination value. The following table shows the links with the simState variable.
STATE STOP SIMSTATE 0 RESULT Termination code executed. Termination value are used. If the previous state was in RUN, no Termination values are used, the current outputs are kept. If the system was in STOP mode, the Initialization values are used. If the simulation was previously in the PAUSE mode, the execution of the application is re enabled. If the previous state was STOP, the states of the model are reset to their initial values and the execution of the application is restarted. Table 4.4 : Relation between application state and Initialization and Termination values PAUSE 1 RUN 2
SIMULATION PARAMETERS AND “BUILD MODEL”
When your Simulink model is modified, you can BUILD the model from Simulink using : //Tools/Real Time Workshop/Build Model (or CTRL+B)
But before that, you may need to modify the Configuration Parameters as follow :
PARAMETERS Solver/Step Solver/Stop Time
VALUE Fixed INF
Optimization/block reduction Real Time Workshop/System Target File
Table 4.5 : Configuration Parameters before BUILD
Before pressing “CTRL+B” (build), we advice to open Control Desk software. In this case, Control Desk will automatically detect that a new file have been built (variable description file with extension “.sdf”).
Then, a “new experiment” should be created, and the “.sdf” file should be “added to experiment”. You can now create a new “layout”. Since you have the layout open, you can add buttons, knobs, display, gauge, numeric input (to write a value) and so on. After that, you can link your Simulink variables (or labels) to graphical instruments, for example, a button to control this variable or a