
Software
Accessing the hardware with SBench 6
(c) Spectrum Instrumentation GmbH
45
Accessing the hardware with SBench 6
After the installation of the cards and the drivers it can be useful to first test the
card function with a ready to run software before starting with programming. If
accessing a digitizerNETBOX/generatorNETBOX a full SBench 6 Professional
license is installed on the system and can be used without any limitations. For
plug-in card level products a base version of SBench 6 is delivered with the card
on CD also including a 30 starts Professional demo version for plain card prod
-
ucts. If you already have bought a card prior to the first SBench 6 release please
contact your local dealer to get a SBench 6 Professional demo version. All dig
-
itizerNETBOX/generatorNETBOX products come with a pre-installed full
SBench 6 Professional.
SBench 6 supports all current acquisition and generation cards and
digitizerNETBOX/generatorNETBOX products from Spectrum. Depending on
the used product and the software setup, one can use SBench as a digital stor
-
age oscilloscope, a spectrum analyzer, a signal generator, a pattern generator,
a logic analyzer or simply as a data recording front end. Different export and
import formats allow the use of SBench 6 together with a variety of other pro
-
grams.
On the CD you’ll find an install version of SBench 6 in the directory „/In
-
stall/SBench6“.
The current version of SBench 6 is available free of charge directly from the Spectrum website: www.spectrum-instrumentation.com. Please
go to the download section and get the latest version there.
SBench 6 has been designed to run under Windows 7, Windows 8 and Windows 10 as well as Linux using KDE, Gnome or Unity Desktop.
C/C++ Driver Interface
C/C++ is the main programming language for which the drivers have been designed for. Therefore the interface to C/C++ is the best match.
All the small examples of the manual showing different parts of the hardware programming are done with C. As the libraries offer a standard
interface it is easy to access the libraries also with other programming languages like Delphi, Basic, Python or Java . Please read the following
chapters for additional information on this.
Header files
The basic task before using the driver is to include the header files that are delivered on CD together with the board. The header files are
found in the directory /Driver/c_header. Please don’t change them in any way because they are updated with each new driver version to
include the new registers and new functionality.
Example for including the header files:
Please always keep the order of including the four Spectrum header files. Otherwise some or all of the func
-
tions do not work properly or compiling your program will be impossible!
Table 4: list of C/C++ header files in driver
dlltyp.h
Includes the platform specific definitions for data types and function declarations. All data types are based on these definitions. The use of this type definition
file allows the use of examples and programs on different platforms without changes to the program source. The header file supports Microsoft Visual C++, Bor
-
land C++ Builder and GNU C/C++ directly. When using other compilers it might be necessary to make a copy of this file and change the data types accord
-
ing to this compiler.
regs.h
Defines all registers and commands which are used in the Spectrum driver for the different boards. The registers a board uses are described in the board spe
-
cific part of the documentation. This header file is common for all cards. Therefore this file also contains a huge number of registers used on other card types
than the one described in this manual. Please stick to the manual to see which registers are valid for your type of card.
spcm_drv.h
Defines the functions of the used SpcM driver. All definitions are taken from the file dlltyp.h. The functions themselves are described below.
spcerr.h
Contains all error codes used with the Spectrum driver. All error codes that can be given back by any of the driver functions are also described here briefly. The
error codes and their meaning are described in detail in the appendix of this manual.
// ----- driver includes -----
#include "dlltyp.h" // 1st include
#include "regs.h" // 2nd include
#include "spcerr.h" // 3rd include
#include "spcm_drv.h" // 4th include
Image 40: SBench 6 overview of main functionality with demo data
Summary of Contents for M2p.59 Series
Page 190: ......