Engineering student, researcher, and industry professional alike use QUARC to rapidly prototype control systems, hardware-in-the-loop (HIL) simulations, and robotics applications. What is the QUARC Library?
One of the biggest challenges in hardware-in-the-loop (HIL) testing is debugging a system that is running faster than the human eye can track. Quarc solves this with advanced monitoring tools.
: These are the heart of hardware integration. The HIL Initialize block is mandatory for any hardware model to configure the data acquisition (DAQ) card. Sub-libraries like Immediate I/O provide HIL Read and HIL Write blocks to interact with sensors and motors instantly.
Mastering Real-Time Control: The Ultimate Guide to the QUARC Library for Simulink quarc library simulink
Used to read analog/digital inputs (like sensors or encoders) and write analog/digital outputs (like motor commands). Communications Blockset
| Feature | QUARC | Simulink Real-Time (SLRT) | Homegrown C-code | | :--- | :--- | :--- | :--- | | | Windows (with real-time patch), Linux | Dedicated target PC (DOS-like) | Any, but high dev time | | Hardware Support | Quanser, NI, Measurement Computing, Advantech, etc. | Speedgoat, some NI | Full control, but driver writing needed | | Ease of Use | Drag-and-drop blocks | Moderate (requires Speedgoat) | Very difficult | | Educational Focus | Strong (excellent documentation for control labs) | Industrial/Research | N/A | | Cost | Moderate (academic licenses available) | High | Low (but high effort) |
Test physical controllers against virtual plants or vice versa. Quarc solves this with advanced monitoring tools
These blocks are the core of QUARC, allowing communication with data acquisition (DAQ) cards.
to enable the design, development, and deployment of real-time applications directly onto hardware. It serves as a bridge between high-level graphical modeling and real-world execution, allowing users to run controllers on various targets—such as Windows or Linux—without writing manual code. The QUARC Targets Library The core of QUARC’s functionality within Simulink is the QUARC Targets Library
: Go to the Interface sub-pane and ensure "External mode" is selected to allow real-time tuning and monitoring. 2. Access the QUARC Library Sub-libraries like Immediate I/O provide HIL Read and
Click the Build Model button. QUARC automatically compiles the Simulink model into highly optimized C/C++ code.
QUARC is a powerful real-time control software developed by Quanser. It integrates seamlessly with MathWorks Simulink to turn a standard computer into a real-time control workstation.
Click the (or external mode) button on the Simulink toolbar. Click Build Model . QUARC compiles the block diagram into executable machine code, downloads it to the target processor, and begins real-time execution. Troubleshooting Common QUARC Errors Error: "HIL Initialize block is missing"
Solution: The CPU cannot process the math within the requested step size. Increase your fixed-step size (e.g., from 0.001s to 0.002s) or optimize your Simulink code by removing heavy algorithmic blocks.
In the world of control systems and robotics, the transition from a Simulink simulation to a working physical prototype is often fraught with complexity. This is where the (by Quanser) becomes an indispensable tool.