This example shows how to produce an analog output signal by using Simulink Desktop Real-Time™. Because analog output can require less configuration and is easier to connect than analog input, this model is useful for working with data acquisition boards. You can verify the presence of the generated signal, for example by connecting an oscilloscope to the analog output pins of your data acquisition board.
Note: To run this model, you must have a data acquisition board connected to your computer.
Open the Analog Output block and select your data acquisition board. If there is no board installed, install it by clicking the Install new board button.
To switch to normal mode if needed, on the Simulation tab, select Normal mode.
To start the real-time execution, on the Simulation tab, click Run.
Open the Analog Output block and select your data acquisition board. If there's no board installed, install it by clicking the Install new board button.
To start the real-time execution in external mode, on the Desktop Real-Time tab, click Run in Real Time. The model builds, connects to Simulink in external mode, and starts.
close_system(find_system(gcs ,'BlockType', 'Scope'));
clear close all bdclose all