Quarc Library Simulink !!link!! -
Stream signals from the hardware target back to Simulink Scopes and MATLAB workspaces instantly.
Click the button (formerly External Mode) on the Simulink toolstrip. Click Build to compile the model into optimized C code.
At its heart, QUARC (Quanser Real-Time Control) is Quanser's state-of-the-art rapid prototyping and production system for real-time control. Unlike a separate application, QUARC is designed to integrate seamlessly with Simulink, essentially transforming the familiar simulation environment into a powerful platform for real-time hardware control. It allows users to design and simulate a controller entirely within Simulink and then, with a single click, automatically generate, compile, and deploy real-time code to execute that controller on a physical system. This functionality is built upon the legacy of Quanser's pioneering real-time software, WinCon, with QUARC redefining the traditional design-to-implementation interface. It empowers engineers to apply complex control strategies quickly and effectively, making the verification of theory on real plants an accessible reality.
The most critical block. Every QUARC model requires exactly one HIL Initialize block. It configures the hardware board, sets initial analog/digital output voltages, and establishes safety watchdogs. quarc library simulink
: If needed, run the following command in the MATLAB Command Window to add QUARC to the path: quarc_setup Use code with caution. Copied to clipboard Opening the Library : You can access the blockset via the Simulink Library Browser or by entering qc_open_library('quarc_library') in the command window.
– Before installing QUARC, users need a compatible installation of MATLAB and Simulink (typically R2015b through R2025a depending on the QUARC version), along with MATLAB Coder, Simulink Coder, and the Control System Toolbox. For Windows targets, a suitable C/C++ compiler such as Microsoft Visual Studio (Community or Professional edition) is required.
Native drivers for Quanser plants, sensors (encoders, IMUs), actuators, and data acquisition cards (e.g., QPIDe, Q8-USB). Also supports third-party boards via generic I/O blocks. Stream signals from the hardware target back to
– Running systems can be dynamically reconfigured from a supervisory Simulink model, allowing one model to be replaced with another while running—without interruptions.
This architecture means the entire workflow—model building, downloading, starting, stopping, parameter tuning, and analysis—can be accomplished entirely from within the Simulink environment.
The QUARC library is more than just a collection of blocks; it is the interface to a full-featured real-time operating system. At its heart, QUARC (Quanser Real-Time Control) is
Once running, parameters can be tuned and signals monitored directly from the Simulink diagram in .
The HIL sub-library is the backbone of hardware interaction. It provides a universal interface, meaning you can swap out data acquisition (DAQ) boards without rewriting your control logic.
When you open the Simulink Library Browser after installing QUARC, you will find a dedicated QUARC Targets library. The blocks are organized into functional categories: 1. Hardware Integration (HIL Blocks)
Sends commands to physical actuators, motors, analog outputs, and digital outputs. 2. Communications Blocks
Run models on Windows targets, specialized Quanser QPid/Q-Control boards, or embedded Linux devices like the Raspberry Pi. Core Blocks in the QUARC Library