Table of Contents
qc_start_model
Starts a model in normal simulation or external mode.
qc_start_model(model, mode) % Start a given model with the desired simulation mode qc_start_model(model) % Start a given model with the model's simulation mode qc_start_model % Start the current model with the model's simulation mode
Starts a model's associated real-time code on a QUARC target if the simulation mode is external. If the simulation mode is normal then it starts a normal simulation.
Starting from Simulink R2019b, it is no longer possible to select simulation mode via Simulink menu due to the switch to use a toolstrip in Simulink. In order to use this command to start a model in external mode, you either manually set the simulation mode via the set_param
command as follow before calling this command:
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: doc('set_param')set_param(model, 'SimulationMode', 'external'); or call the command as: qc_start_model(model, 'external'); In order to use this command to start a model in normal mode, you either manually set the simulation mode via the set_param
command as follow before calling this command:
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: doc('set_param')set_param(model, 'SimulationMode', 'normal'); or call the command as: qc_start_model(model, 'normal'); |
This command is equivalent to selecting
from the toolstrip of the diagram for normal mode, or selecting from the toolstrip for external mode. In external mode, the model will be connected if it is not connected already, and then started.If no model was specified then the current model as returned by
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('bdroot')If no mode was specified then the model's current SimulationMode is used.
model
A string indicating the name of the model to start.
mode
A string indicating the desired model's SimulationMode to start the model with.
This function has no outputs.
qc_start_model('q_a_lpbk'); % Starts the 'q_a_lpbk' model. qc_start_model('q_a_lpbk', 'external'); % Starts the 'q_a_lpbk' model in external mode.
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.