qc_stop_model qc_disconnect_model navigation bar

Table of Contents

qc_kill_model

Forcefully terminates a model on the target.

Syntax

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
    

Description

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 bdroot, was passed as a single input argument.

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 drawnow command or just move the mouse over the Simulink diagram for the model.

Parameters

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 getConfigSet).

target_uri

A string containing the URI used for communicating with the QUARC Target Manager on the target.

Outputs

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.

Examples

result = qc_kill_model('q_a_lpbk'); % Forcefully terminates the 'q_a_lpbk' model
    

See Also

 

navigation bar