Working with real-time systems can introduce specific execution errors. Here is how to handle the most common issues in QUARC:
Related search suggestions: "suggestions":["suggestion":"QuArc Simulink tutorial examples","score":0.85,"suggestion":"QuArc code generation best practices","score":0.78,"suggestion":"Simulink libraries comparison for embedded control","score":0.72]
QUARC is a real-time control software that works seamlessly with MATLAB/Simulink . Unlike standard Simulink simulations that run in virtual time, QUARC generates C code from your Simulink model, compiles it, and runs it on a target processor in true real-time, interfacing directly with sensors and actuators.
[ Build Simulink Model ] ➔ [ Configure Code Generation ] ➔ [ Build & Connect ] ➔ [ Run in Real-Time ] Step 1: Initialize the Hardware Open a blank Simulink model.
It is worth noting the distinction between QUARC and MathWorks’ own Simulink Real-Time (formerly xPC Target). While both platforms enable real-time execution of Simulink models, QUARC offers several distinguishing advantages: support for Windows as a real-time target (not just dedicated real-time kernels), the ability to use standard Simulink sink blocks for visualization, a richer set of device and communications blocks, and integration with Quanser’s extensive ecosystem of educational and research hardware. However, QUARC is primarily tailored to Quanser’s hardware ecosystem and may not support all DAQ cards that Simulink Real-Time supports.
QUARC supports an extensive range of hardware interfaces, making it a versatile solution for diverse applications. The data acquisition support includes Quanser’s proprietary HIL boards (such as the Q4, Q8, QPID), third-party DAQ cards from manufacturers like National Instruments, and USB-based interfaces like the Q2-USB.
These blocks are the core of QUARC, allowing communication with data acquisition (DAQ) cards.
– Perhaps one of the most valuable features for control system development is the ability to tune block parameters while the real-time code is running. Simply double-click on a block, change a parameter, and the update is automatically downloaded to the running application.
: This category provides discrete-time blocks with convenient functionality, such as blocks that look like continuous-time blocks but automatically handle conversion to discrete time, along with other utilities like the "Stall Monitor".
Stream signals from the hardware target back to Simulink Scopes and MATLAB workspaces instantly.
This advanced feature allows a running real-time model to be replaced or modified without stopping the hardware. A supervisory Simulink model can dynamically reconfigure the running system, which is crucial for applications requiring high availability or system evolution without downtime.
The core of QUARC's utility lies in its specialized Simulink block library, organized into categories within the Simulink Library Browser under the section. Some of the most important categories include:
QUARC Targets Library is a specialized extension for Simulink that enables high-performance, real-time code generation and hardware-in-the-loop (HIL) testing. Unlike standard Simulink libraries, it provides unique blocks for hardware access, asynchronous communications, and advanced visualization. Core Capabilities Hardware Interfacing HIL (Hardware-in-the-Loop)