QUARC MATLAB Functions QUARC Tab navigation bar

Table of Contents > QUARC > User's Guide

QUARC Menu

QUARC has its own designated menu in the model window. The QUARC menu has items for performing tasks such as building the model, starting/stopping the model and downloading the real-time code to the target. It also provides items to open the QUARC Console for real-time code and set QUARC options for the model.

The QUARC menu appears in the menu bar of the model window as shown here.

Below are the descriptions of all the QUARC menu items.

Build

Builds the model by generating C source code for the model, compiling and linking it into a QUARC real-time executable and finally downloading the QUARC executable to the target. For more information on the build process, please refer to the Building a Model section in the QUARC documentation. Alternatively, press Ctrl+B to build the 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.

Download

Downloads the generated real-time code to the target machine. If the real-time code has yet to be built then an error will be displayed informing the user that the model has not been built. This item is useful when the real-time code fails to download during the build process and needs to be downloaded manually (the build process normally downloads the model automatically). This situation can arise when the target machine is not online at the time the real-time code is built. Once the target is online, you may download the real-time code to the target machine using this menu item without having to rebuild the model.

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.

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.

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 menu item 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 the Set log file... menu item, which configures logging in the MEX-file arguments for the current 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 menu item 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.

Options...

Opens the Configuration Parameters dialog for the model. The Configuration Parameters dialog is used to set parameters for the model, such as the type of solver to use for integration, the fundamental sample time of the model, the external mode interfacing options, etc. For more information on the Configuration Parameters, please refer to the Configuring a Model section in the QUARC documentation.

Set default options

Sets the default options for the Configuration Parameters of the model based on the default target type set in the QUARC Preferences dialog. For more information on the Configuration Parameters and the QUARC preferences, please refer to the Configuring a Model and QUARC Preferences Dialog sections in the QUARC documentation repectively.

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.

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 menu item repairs all the broken links in the current model while preserving block parameters. Any blocks in use which have been discontinued will be reported.

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.

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.

Data acquisition cards

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

Demos

Opens the documentation for QUARC Targets Demos in the MATLAB help browser.

About...

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

 

navigation bar