Software
Accessing the hardware with SBench 6
(c) Spectrum GmbH
39
all card types although it was never programmed to support the M2i natively.
• If for any reason a re-compile of the existing program is not possible one can simply rename the compatibility DLL spectrum_comp.dll to
spectrum.dll and copy it over the existing spectrum.dll in the Windows system directory. The program won’t notice that a different DLL is
used and uses the newly installed M2i card. Unfortunately a shared access to either MI or M2i is not possible using this method.
Abilities and Limitations of the compatibility DLL
The compatibility layer has been done to help you migrating software for the M2i cards and tries to hide the new hardware to older program
as best as possible. However as there are some basic differences between both hardware families not everything can be simulated. The
following list should give you an overview of some aspects of the compatibility layer:
• The data transfer is reorganized internally but still uses the same application data buffers. No data is copied for the data transfers. There-
fore the transfer speed that one will gain is the full transfer speed of the M2i card series which is between 20% and 130% faster than the
one of the MI series.
• As the compatibility layer tries to hide the new driver as much as possible none of the new or improved features are available to older
programs. If you need to use a new feature please use the new driver.
• The M2i driver checks the given parameters very carefully while the older driver was sometimes a little lazy and some false commands
and driver parameters weren’t noticed or were noticed but didn’t lock the driver. The M2i will check every register settings at every time
and lock the driver if an error occurs. It may be necessary to fix the application code for handling this more strict error checking.
• The compatibility DLL doesn’t support all special features that have been added to the MI series over the years as some of them are dis-
continued in the new hardware. As long as the application program sticks to the main features this won’t be a problem.
• The compatibility DLL does not add any delays from the MI series as the M2i series has been optimized for small delays. As an example,
the MI cards had a fixed delay from trigger to first sample when using Multiple Recording. The M2i cards now have a programmable pre-
trigger size. When using the compatibility layer this pretrigger is set to the minimum and data will be visible before the trigger event.
• Although the application software doesn’t see a difference between old an new cards there is no chance to synchronize both card types
together as the synchronization option uses different connectors, different signals and different timing.
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 program-
ming. 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 de-
livered with the card on CD also including a 30 starts Professional demo
version for plain card products. 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.
SBench 6 supports all current acquisition and generation cards and digitiz-
erNETBOX/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 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 programs.
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. If using
the digitizerNETBOX/generatorNETBOX, a SBench 6 version is also available on the webpages of the digitizerNETBOX/generatorNETBOX.
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.