xPC Target |
 |
Description of the User Interface Model
xPC Target includes the Simulink model xpctank.mdl
. This is the model of a water tank with a pump, drain, and valve controller. See Creating a Target Application Model. Using Real-Time Workshop, xPC Target, and a third-party compiler, you can create a real-time target application from this model.
An user interface model is a Simulink user interface model you create as a graphical interface to a target application. You do this by using dial blocks, gauges blocks, and xPC Target interface blocks.
After you create an user interface template model with xPC Target interface blocks, you can create a user interface model with the following controls and displays:
- Pump switch -- Override the bang-bang controller by using a manual switch to turn the pump on and off. Turn the pump on or off by setting PumpSwitch to 1 or 0. Use a toggle switch.
- Drain valve -- Open or close the drain valve by setting ValveSwitch to 1 or 0. Use a toggle switch.
- Selected water level -- Change the level of the water in the tank by changing the SetPoint block parameter Constant value. Use a slider to set this value.
- Actual water level -- This is the water level and the output from the integrator block TankLevel. Use a tank gauge to visualize this signal.
- Pump flow rate -- Change the pump flow rate by changing the Controller block parameter Output when on. Use a slider to set this value.
- Hysteresis -- Select the upper and lower water level by changing the Controller block parameters Switch on point and Switch off point. Use a slider to set these values.
- This single value adjusts the offset, which is the maximum and minimum change the water level is allowed above or below the set point before corrective action is taken by either turning the pump on or turning the pump off.
| Marking Block Signals | | Creating a User Interface Model |  |