QuArc is a model-based design library for Simulink focused on control systems and embedded software development. It provides reusable blocks, templates, and verification/scalability features aimed at improving development speed, code quality, and traceability for embedded control applications.
Open the Simulink Library Browser and navigate to > Hardware > HIL . Drag the HIL Initialize block into your model.
A smooth installation of QUARC requires careful attention. The most common issue is the 'QUARC Targets' not installed error, which almost always stems from an installation order problem. The core solution is simple: ensure MATLAB and Simulink are installed before installing the Quanser software. If the problem persists, the quarc_setup.m script (typically found in C:/Program Files/Quanser/QUARC/quarc ) can be run within MATLAB to manually establish the connection. Additionally, ensure your MATLAB version is at least 2020a, and try running the Quanser installer with administrator privileges or with MATLAB already open.
Click Connect to Target and press Run . The model executes on the target hardware in hard real-time, while scope blocks on your host computer display live physical data. Common Use Cases Academic Research and Education quarc library simulink
In a standard Simulink simulation, time is a variable calculated by the solver. If the computer is busy, the simulation slows down; the "wall-clock" time does not match the "simulation" time.
[Design Control Loop in Simulink] │ ▼ [Insert QUARC HIL Initialize & I/O Blocks] │ ▼ [Configure Simulation Parameters to QUARC Target] │ ▼ [Click 'Build Model' to Generate Real-Time C Code] │ ▼ [Connect to Target & Run in Hard Real-Time]
: These blocks are used for complex signal management tasks, such as routing an input signal to one of several outputs or replacing elements of a signal. QuArc is a model-based design library for Simulink
The library also includes that interface with specific drivers (e.g., HIL Initialize , HIL Read Analog , HIL Write PWM ).
. This library provides specialized blocks that extend standard Simulink capabilities for hardware-in-the-loop (HIL) testing and real-time communication. Data Acquisition (DAQ):
Ensure your QUARC system timebase matches your Simulink solver step size to avoid "overruns." Drag the HIL Initialize block into your model
Ensure QUARC is installed and integrated with MATLAB/Simulink.
When you build a model using QUARC, it leverages MATLAB Coder and Simulink Coder to generate production-quality C code. QUARC then compiles this code and runs it as a real-time process on a target machine—either your local Windows PC or a remote real-time operating system (RTOS) like Linux RT. Core Capabilities of QUARC
Configures the hardware card, sample rates, and initial channel states.
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.
Simulink + QUARC = Real-time control made simple ⚡