Documentation

Real-Time Controller

This model shows how to build a simple closed-loop real-time controller using Simulink Desktop Real-Time™. The output of the controlled plant is connected to the analog input of your data acquisition board. This signal is subtracted from the set point value generated by the signal generator and processed by a PID controller. The output of the controller drives the input of the plant using the analog output of your data acquisition board.

This model is a simplified version of the controller used for the CE152 Magnetic Levitation Model.

How to run this model in Normal Mode:

  1. Open the Analog Input and Analog Output blocks and select your data acquisition board. If there's no board installed, install it using the Install new board button.

  2. Double-click the orange button to switch to Normal Mode if needed.

  3. Start the real-time execution using Simulation->Run.

How to run this model in External Mode:

  1. Open the Analog Input and Analog Output blocks and select your data acquisition board. If there's no board installed, install it using the Install new board button.

  2. Double-click the orange button to switch to External Mode if needed.

  3. Start the real-time execution using Simulation->Run. The model will automatically build, connect to Simulink in External Mode and start.

Note: To run this model, you must have a data acquisition board connected to your computer.

Was this topic helpful?