Target Information Reconfiguration Group navigation bar

Table of Contents

Target Load Model

Loads a model on a QUARC target.

Library

QUARC Targets/Advanced/Dynamic Reconfiguration

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Advanced/Dynamic Reconfiguration')

Description

Target Load Model

The Target Load Model block loads the generated code for a model on the QUARC target identified by the connection name. The connection name matches the name of a Target Connect block in the diagram. A Target Connect block must be present.

The model must have already been downloaded to the target. "Loading" the model means actually loading the model into the target's memory and initializing the model. If the "-w" (wait) option is specified as a model argument then the model will initialize but will wait for an external mode connection from the Simulink diagram before entering its control loop. If the "-w" option is not specified as a model argument then the model will begin running immediately.

In particular, suppose the supervisory model containing the Target Load Model block is running on Target A. Furthermore, suppose the supervisory model contains a Target Connect block configured to connect to Target B. Thus, if the Target Load Model block's Name of model to load parameter is set to Model A then when the supervisory model is run on Target A, the Target Load Model block will load Model A on Target B.

This block is part of the dynamic reconfiguration facilities of QUARC which allow running models to be swapped for another model on-the-fly. In particular, dynamic reconfiguration may be performed under the control of a supervisory model.

Models which will be dynamically reconfigured should have the Support dynamic reconfiguration option checked on the Code Generation/QUARC tab of the Configuration Parameters dialog.

Input Ports

This block has no input ports.

Output Ports

This block has no output ports.

Parameters and Dialog Box

Target Load Model

Connection name

The name of the connection identifying the QUARC target on which the specified model will be loaded. The connection names correspond to the names of Target Connect blocks in the diagram. Using connection names as an alias for the actual target URI allows the target URI to be changed in one place rather than in every block using the connection.

Name of model to load

The name of the model to load. The code for this model must have already been built and downloaded to the target associated with the connection.

Arguments for model to load

The command-line arguments to pass to the model loaded. Standard command-line arguments are:

-tf <time>
set the final time for the model to <time>. The model will stop at this time. Set to inf to run indefinitely.
-d <folder>
set the initial current directory for the model to <folder>.
-pri <priority>
set the base priority of the model threads to <priority>.
-ss <stack_size>
set the stack size of the model threads to <stack_size>.
-w
causes the model to wait for an external mode connection from the model's Simulink diagram before starting. This option is only available when external mode is enabled.
-uri <uri>
set the URI used by the model for external mode communications to <uri>. This option is only available when external mode is enabled.
-part <partition>
causes the model to run in the adaptive partition <partition>. The <partition> argument may be the name or identifier of the adaptive partition. This option is only supported on QNX targets.
-reconfig <group_id>
set the reconfiguration group of the model to <group_id>. This option is only available when dynamic reconfiguration is enabled.

Sample time

The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.

A sample time of -1 indicates that the block inherits its sample time. The sample time must be inherited when the block is placed in a conditionally executed subsystem, like a Triggered Subsystem, Enabled Subsystem, Function Call Subsystem or in a referenced model.

To use the fundamental sampling time of the model, set the sample time to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model.

The default sample time is set to -1 because this block is typically used in a conditionally-executed or asynchronous subsystem.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

Unlike normal simulation, the Target Load Model block will load code on the QUARC Target indicated by the Target URI.

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

The Target Load Model block will open the Simulink diagram of the model to be loaded. If the "-w" option is not specified as a model argument then the Simulink diagram of the "loaded" model will be run in normal simulation.

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar