Start of trail It's a Whole Different World - Using QUARC Versus WinCon navigation bar

Table of Contents > QUARC > Getting Started with QUARC > Migrating From WinCon

How the QUARC Architecture Differs from WinCon's

This article describes the architecture of WinCon and QUARC. It highlights the differences between the two architectures and highlights the advantages of the QUARC architecture.

WinConArchitecture

The WinCon product has a somewhat confusing architecture consisting of four principal components:

WinCon Server is the graphical front-end to WinCon. It provides the plotting and data storage facilities of WinCon and is the primary interface for interacting with real-time code. It also provides services to Simulink for interacting with the model - hence the name.

WinCon Client is an application that controls the real-time code - loading, starting and stopping it. It also acts as the communication node to which WinCon Server(s) connect. All interaction between the WinCon Server and the real-time code is done through the WinCon Client. The WinCon Server communicates with the WinCon Client via TCP/IP and the WinCon Client communicates with the real-time code via shared memory.

The real-time code is the RTSS executable generated from the Simulink diagram when the model is built. It runs in hard real-time under Ardence's RTX kernel. The real-time code is loaded and controlled by WinCon Client.

Simulink acts as a front-end for generating real-time code and for tuning parameters in the model. Data is not streamed back to Simulink for plotting, so the Simulink Sink blocks, such as Scopes and Displays, do not work in WinCon. All plotting in WinCon must be done via the WinCon Server. Thus, WinCon has two "front-end" graphical interfaces: WinCon Server, for plotting, and Simulink, for parameter tuning and code generation.

The interaction between these components is illustrated in the following diagram.

The target PC and host PC may be the same computer. However, WinCon Client and WinCon Server still communicate via TCP/IP in this case. The WinCon architecture involves multiple components, with different communications protocols between each component. The user interface is split between two components: WinCon Server and Simulink. Furthermore, WinCon is limited to one target - the RTX real-time kernel running under Windows. Only one model may be run at a time and both the real-time code and WinCon Client are single-threaded. Finally, this diagram is a gross simplification of what goes on under the hood. Basically, a new, simpler, architecture was required.

QUARC Architecture

QUARC's architecture has three fundamental components.

The QUARC Target Manager is similar to WinCon Client. It manages the real-time code on the target system. However, the QUARC Target Manager runs in the real-time environment, unlike WinCon Client. Hence, QUARC's architecture is much better suited to embedded systems, since a "desktop" operating system is not required on the target system. Indeed, QUARC currently supports Windows, and Linux as targets. The Windows target is a soft real-time target ideally suited for situations where third-party libraries and devices are required that are only supported in Windows.

The real-time code is the executable generated from the Simulink diagram when the model is built. It runs in real-time on the target system. Unlike WinCon, QUARC supports a variety of targets. The real-time code is loaded and controlled by the QUARC Target Manager.

Simulink acts as the front-end for generating real-time code, tuning parameters and plotting or data streaming. Unlike WinCon, the Simulink Sink blocks, such as Scopes and Displays, all work in QUARC. Thus, the model may be built, downloaded, started, stopped, tuned and analyzed entirely from the Simulink environment.

The interaction between these components is illustrated in the following diagram.

The target system and host PC may be the same computer. Communications between the QUARC Target Manager and Simulink are shown with a dotted line labelled "download code" because this connection is only used for downloading and running the real-time code. Once the real-time code is executing on the target system, the connection between Simulink and the QUARC Target Manager is no longer used. Instead, parameter and signal information is all passed directly between the real-time code and Simulink. Refer to the section entitled It's a Whole Different World - Using QUARC Versus WinCon for more details on how parameter tuning, plotting and data streaming differ in QUARC.

Unlike WinCon, more than one model may be run on the same target at the same time. Each model may be connected to Simulink. Also, models may be fully multithreaded in QUARC. Multirate models are configured by default so that each subrate task runs in its own thread. QUARC also supports asynchronous threads which have no rate at all. Thus, QUARC is designed to take full advantage of today's multi-core CPUs.

Furthermore, the communication protocol is completely configurable. If the target and host are the same system, then shared memory communications may be used, to maximize bandwidth. If the target and host are separate systems, then TCP/IP or another reliable communication protocol may be used. Refer to Communicating with the Target for more details on communications with the target system.

Another dotted connection labelled "console I/O" is shown between the QUARC Target Manager and the real-time code. The QUARC Target Manager spawns the real-time code as a separate process. When it launches the real-time code it redirects the standard I/O of the child process so that it can monitor the stdin, stdout and stderr streams of the real-time code. An application called the QUARC Console may be used on any host or target system to connect to the QUARC Target Manager and monitor the standard I/O of any or all models running on the target system. The QUARC Console is a great debugging aid and may even be used as a primitive interface to the real-time code, since it can pass information back to the stdin stream of the real-time code. Refer to QUARC Console - Model Standard I/O for more details.

 

navigation bar