User`s manual

Writing Custom Applications
Chapter 6: Writing Custom Applications
Most scientific and engineering applications require the acquisition and storage of data for analysis after the fact. Even in
cases where most data analysis is done in place, there is usually a requirement that some data be saved to monitor the system.
In many cases a pure data that does no immediate processing is the most common application.
The X3 and X5 XMC card families are high bandwidth analog capture modules with an advanced architecture that provides
ultimate flexibility and speed for the most advanced hardware-assisted signal processing and ultrasonic signal capture. The
maximum data rate from these module are often above 250 Msamples/s. This means that a simple logger that saves all of the
data to the host disk is not feasible using standard operating system disk I/O calls, as the slower disk writes eventually cause
overflow and data loss in the streaming system.
Some modules support decimation so that long duration samples can be taken without data. Also quick snapshots of analog
data can be taken without loss as long as the amount of data is less than the net capacity of system memory and what the
baseboard holds. The example program provided for nearly all cards is this limited capacity data logger, called the Snap
example
The Snap Example
The Snap example in each software distribution demonstrates this logging functionality. It consists of a host program in
Windows, which works with the logic provided on the board's flash to stream data to the host. It uses the Innovative Malibu
software libraries to accomplish the tasks.
Tools Required
In general, writing applications for the X5 family requires the development of host program. This requires a development
environment, a debugger, and a set of support libraries from Innovative.
Table 12. Development Tools for the Windows Snap Example
Processor Development Environment Innovativ
e Toolset
Project Directory
Host PC Codegear Developers Studio C++
Microsoft Visual Studio 2008
Common Host Code
Malibu Examples\Snap\Bcb11
Examples\Snap\VC9
Examples\Snap\Common
On the host side, the Malibu library is provided in source form, plus pre-compiled Microsoft, Borland or GCC libraries. The
application code that implements the entirety of the board-specific functionality of example is factored into the
ApplicationIo.cpp/h unit. All User Interface aspects of the program are completely independent from the code in
ApplicationIo, which contains code portable to either compilation environment (i.e., it is common code). While each
X5-GSPS User's Manual 45