QUARC Menu QUARC Preferences Dialog navigation bar

Table of Contents > QUARC > User's Guide

QUARC Tab

Starting with MATLAB R2021b, QUARC has its own designated tab in the Simulink toolstrip. The QUARC tab has buttons for performing tasks such as building, starting/stopping the model and deplying/connecting the real-time code to the target. It also provides buttons for the various tasks that can be done with the model.

QUARC tab also provides buttons to perform tasks to the target, as well as configuring QUARC settings.

The QUARC tab appears in the Simulink toolstrip as shown here.

The QUARC tab is divided into multiple sections. Below are the descriptions of each section and the buttons available in each of them.

RUN ON HARDWARE

The buttons in this section perform tasks to build, download, and run the model on the selected hardware target.

Monitor & Tune

Drop-down button for building, deploying, and starting or just building real-time executable with external mode support on the target.

Monitor & Tune

Build, download, connect, and start the model for real-time external mode operation.

Build for Monitoring

Build the model to generate real-time code.

Simulink simply examines the model and creates a database decribing everything in the model. Then the database is used to generate C/C++ code for the model with external mode support. The generated code is then compiled using the specific tools for the target. The compiled real-time code still resides on the host computer.

Start

Drop-down button for starting or disconnecting real-time executable on the target.

Start

Start the generated real-time executable on the target.

The generated real-time executable would start running on the target.

Disconect

Disconnect the model from the real-time executable on the target.

The real-time executable state would not be changed.

Stop

Drop-down button for stopping or disconnecting real-time executable on the target.

Stop

Stop the generated real-time executable on the target.

The generated real-time executable would stop running on the target, and Simulink would automatically disconnect from the target as well.

Disconect

Disconnect the model from the real-time executable on the target.

The real-time executable state would not be changed.

Deploy

Deploy the generated real-time executable (i.e. download it to the target).

The generated real-time executable is downloaded to the target and the model is started in a state that waits for the host Simulink model to connect to it.

Connect

Connect to the generated real-time executable on the target.

Simulink connects to the real-time executable on the target via external mode communication. The real-time executable is then ready to be started.

Build, Deploy & Start

Drop-down button for building, deploying, and starting or just building real-time executable without external mode support on the target.

Build, Deploy & Start

Build, download, connect, and start the model for real-time non-external mode operation.

Build

Build the model to generate real-time code.

Simulink simply examines the model and creates a database decribing everything in the model. Then the database is used to generate C/C++ code for the model without external mode support. The generated code is then compiled using the specific tools for the target. The compiled real-time code still resides on the host computer.

MODEL

The buttons in this section perform tasks to assist in configuring the model for deployment, as well as monitoring the status of the real-time executable.

Model Settings

Open the model's active configuration setting.

The model configuration parameters dialog will open, which allows setting various model parameters. See Configureing a Model for details on how to set model's parameters for QUARC targets.

Update Model

Compile model to check for static errors.

Simulink attempts to infer the most appropriate values for the various model attributes that are not specified. If Simulink cannot infer an attribute, it halts the update and display an error. This allows catching static errors before the real-time executable is generated.

Model Explorer

Open the model explorer.

View, modify, and add elements of Simulink models. Refer to

Model Explorer

MATLAB Command Line

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

doc('Rate Transition')
for details.

Clean

Drop-down button for cleaning generated code for model.

Clean

Erases the real-time code generated for the model. It also deletes the folder named <modelname>_quarc_<targettype> where <modelname> is the name of the model and <targettype> is the type of target for which the model was built. For example, for a model called "pid_controller" that is configured for the QUARC Windows target, the folder will be named pid_controller_quarc_windows.

Clean All

Erases the real-time code generated for the model. It also deletes the folder named <modelname>_quarc_<targettype> where <modelname> is the name of the model and <targettype> is the type of target for which the model was built. For example, for a model called "pid_controller" that is configured for the QUARC Linux target, the folder will be named pid_controller_quarc_linux_{target}. In addition, the sub-folder related to the model inside the shared folder named slprj is deleted as well.

Console

Drop-down button for console to monitor real-time executable.

Console

Opens a QUARC Console for the model. The QUARC Console is used to monitor the standard I/O of the real-time code. Print statements within the real-time code will show up in the QUARC Console. Code that reads from stdin will read from the QUARC Console. The QUARC console uses the target URI associated with the model to communicate with the QUARC Target Manager on the target machine. For more information on the target URI, please refer to the Communicating with the Target section in the QUARC documentation. For information on the QUARC Console, please refer to the QUARC Console - Model Standard I/O section in the QUARC documentation.

Console for all

Opens a QUARC Console for all models on the target. The QUARC Console is used to monitor the standard I/O of the real-time code. In this case, it monitors the standard I/O of all the models loaded on the target simultaneously. Print statements within any of the QUARC real-time executables running on the target will show up in this QUARC Console. The QUARC console uses the target URI associated with the model to communicate with the QUARC Target Manager on the target machine. For more information on the target URI, please refer to the Communicating with the Target section in the QUARC documentation. For information on the QUARC Console, please refer to the QUARC Console - Model Standard I/O section in the QUARC documentation.

Utilities

Drop-down button for miscellaneous utilities that can be used on the model.

Terminate unconnected ports

When simulating or building a model that contains blocks with unconnected input or output ports, Simulink issues warning messages to the MATLAB command window. This button avoids these warnings by causing all unconnected input ports to be connected to Ground blocks and all unconnected output ports to be connected to Terminator blocks.

Upgrade blocks

When upgrading to a newer version of QUARC, links to certain blocks in the QUARC Targets Library may occasionally get broken due to reorganization of the QUARC Targets Library. This button repairs all the broken links in the current model while preserving block parameters. Any blocks in use which have been discontinued will be reported.

Convert to non-toolchain

Starting with QUARC 2021, QUARC has switched to using toolchain-based system target files to build models. However, diagrams saved using QUARC 2021 will not be backward compatible with pre-QUARC 2021 versions (which use template makefile-based system target files). In this case, opening a diagram saved using QUARC 2021, or later, would result in error showing up in the Diagnostic Viewer. This command converts the model to use non-toolchains build process (i.e. using template makefiles). After converting the model to non-toolchain build process, save the model and transfer to a computer using previous QUARC versions, the model should now be able to open successfully.

Note that if a non-toolchain-based model is opened in QUARC 2021 and later, it will automatically be converted to a toolchain-based model. So do not open the converted model in QUARC 2021 and later after it's been saved.

Upload MAT file

When using MAT-file logging, the MAT-file is generated on the target. If the target is a remote machine then this MAT-file must be uploaded from the target to the host in order to load the results into Matlab. This button uses the name of the model and the current directory for the model specified in the -d option of the model arguments to locate the MAT-file on the target and upload it to the current Matlab directory on the host for analysis. The model does not need to be compiled with external mode for this option to work so it provides a convenient method of getting the MAT-file for any model and avoids the need to use ftp or another file transfer tool to get the MAT-file from the target.

Set Log File

QUARC's automatic logging facility allows a log to be maintained for every run of a model. It can also copy a model to a backup location every time the model is started. The QUARC Preferences dialog is used to set the defaults for the log and copy of the model when automatic logging is enabled for all models. To enable automatic logging for individual models use button to configures logging in the MEX-file arguments for the current model.

TARGET

The buttons in this section perform tasks that relate to the deployment targets.

QUARC targets

Drop-down button to set the desired target that the real-time executable will be generated for.

Only the targets that your license is entitled to will be shown. By selecting the desired target, the model's System target file will be chosen accordingly. For more information, please refer to System target file page in the QUARC documentation.

Manage target

Opens the QUARC Target dialog for the active target. The QUARC Target dialog is used to manage a QUARC target, allowing models to be downloaded, removed, loaded, stopped and more. It also provides a way to get detailed information about the version of QUARC installed on the target. For more information on the QUARC Target dialog, please refer to the QUARC Target dialog page in the QUARC documentation.

SETTING

The buttons in this section perform tasks that affects the QUARC installation.

Preferences

Opens the QUARC Preferences dialog, which is used to configure the communication protocol, as well as associated options, that will be used to communicate between the real-time code and the model, and between the QUARC Target Manager and the model. For more information, please refer to the QUARC Preferences Dialog section in the QUARC documentation.

License

Opens the QUARC License dialog, which is shows the installed license and the associated features.

The license information is useful when contacting technical support about QUARC issues.

About

Displays a dialog box providing a brief explanation of the QUARC software, its version and the Quanser website.

RESOURCES

The buttons in this section provides extra resources that helps with using QUARC.

Help

Opens the documentation for QUARC.

Demos

Opens the documentation for QUARC Examples in the MATLAB help browser.

Data acquisition cards

Opens the documentation for QUARC Data Acquisition Card Support in the MATLAB help browser.

How to

Opens useful help pages on how to do certain tasks in the MATLAB help browser.

Web resources

Directs the user to the web resources for QUARC.

Tip of the day

Opens the QUARC Tip of the Day dialog so that the tips may be viewed.

 

navigation bar