Table of Contents
Target Load Model
Loads a model on a QUARC target.
Library
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
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
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:
inf
to run indefinitely.
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 |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
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. |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.