Table of Contents
Target Download Model
Downloads a model to 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 Download Model block downloads the generated code for a model to 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 built for the appropriate target type for the code to be downloaded. The code typically resides in the same directory as the code for the model that is running so that no path is required, only the model name. This is generally true since models downloaded to a target are stored in a common spool directory on the target.
In particular, suppose the supervisory model containing the Target Download Model block is built and downloaded to Target A. Suppose another model, called Model A, is also built and downloaded to Target A. The supervisory model and Model A will both reside in the spool directory of Target A. Furthermore, suppose the supervisory model contains a Target Connect block configured to connect to Target B. Thus, if the Target Download Model block's "Path of model code to download" parameter is set to Model A then when the supervisory model is run on Target A, the Target Download Model block will download Model A to Target B.
The file extension should generally be omitted from the path to the model code. The appropriate file extension will automatically be determined from the target to which the block is connected. Hence, the code appropriate to the specific target type will always be downloaded. For example, if the Target Connect block is connected to a QNX x86 target then the code generated for QNX is downloaded. If the Target Connect block is connected to a Windows target then the code generated for Windows is downloaded. Furthermore, this technique allows the model to be run on different types of targets with no change to the block parameters.
If the file extension is specified then that model code is downloaded, whether it is appropriate for the connected target or not. Specifying a file extension may be necessary in hierarchical supervisory systems containing multiple target types.
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 to which the specified model will be downloaded. 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.
Path of model code to download
The path to the model code to download. The code for this model must have already been built and resided at the specified path. In general, it is best to omit the file extension so that it is determined automatically by the type of target to which the block is connected. Often only the model name is required (see discussion above).
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 |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.