Table of Contents
qc_kill_model
Forcefully terminates a model on the target.
result = qc_kill_model(model, name) % Forcefully terminate model NAME on the target associated with MODEL result = qc_kill_model(config_set, name) % Forcefully terminate model NAME on the target associated with the configuration set result = qc_kill_model(target_uri, name) % Forcefully terminate model NAME on the target specified by the target URI result = qc_kill_model(name) % Forcefully terminate model NAME result = qc_kill_model % Forcefully terminate current model
Forcefully terminates a model. This function is NOT recommended because system resources may be lost on the target as a result of this operation. Use qc_stop_model instead. Only use qc_kill_model if absolutely necessary. If MODEL is specified, then the target URI associated with the active configuration set of that model is used to identify the target. If a configuration set is specified then its associated target URI is used. If a target URI is specified then it is used directly to access the target.
If only a model NAME is specified, then the target is identified by the settings for the active configuration for the model.
If no model is specified then it behaves as if the currently selected 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')Note that this function will kill the model on the target even if the model is not currently connected in external mode.
Note that qc_kill_model does not update the Simulink diagram graphics when it kills the model, if the model is connected in external mode. Hence, the Simulink diagram toolbar may still indicate that the model is running, even though it is not and the plots have stopped. To update the Simulink diagram graphics, execute the
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('drawnow')model
A string indicating the name of the model from which to identify the target eg. 'q_a_lpbk
'.
name
A string indicating the name of the model to kill eg. 'test_model
'.
config_set
A Simulink.ConfigSet
configuration set from which to identify the target (see
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('getConfigSet')target_uri
A string containing the URI used for communicating with the QUARC Target Manager on the target.
result
Returns 0 on success and a negative error code on failure. See qc_error and qc_get_error_message for handling error codes. If no result output is assigned it issues an error on failure.
result = qc_kill_model('q_a_lpbk'); % Forcefully terminates the 'q_a_lpbk' model
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.