qc_remove_model_loaded_at_boot qc_simulate_load_model navigation bar

Table of Contents

qc_is_model_loaded

Determines whether a model is loaded on a target.

Syntax

result = qc_is_model_loaded(model, name)      % Determine if model NAME is loaded on the target associated with MODEL
result = qc_is_model_loaded(config_set, name) % Determine if model NAME is loaded on the target associated with the configuration set
result = qc_is_model_loaded(target_uri, name) % Determine if model NAME is loaded on the target specified by the target URI
result = qc_is_model_loaded(name)             % Determine if model NAME is loaded on the target associated with its active configuration
result = qc_is_model_loaded                   % Determine if the current model is loaded on the target associated with its active configuration
    

Description

Determines whether a model is loaded on a target. It returns 1 if the model is currently loaded on the target and 0 otherwise.

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.

This function returns the status of the model on the target regardless of whether Simulink is currently connected in external mode or not.

Parameters

model

A string indicating the name of the model from which to identify the target eg. 'q_a_lpbk'.

config_set

A Simulink.ConfigSet configuration set from which to identify the target (see

getConfigSet

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.

name

A string indicating the name of the model for which to check if it is loaded on the target.e.g. 'test_model'

Outputs

result

Returns 1 if the model is loaded on the target and 0 otherwise. If an error occurs then a negative error code is returned. 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_is_model_loaded('q_a_lpbk'); % Determines whether the q_a_lpbk model is loaded on the target
    

See Also

 

navigation bar