Spectrum M2i.3020 Hardware Manual

M2i.30xx series m2i.30xx-exp series fast 12 bit transient recorder, a/d converter board for pci-x, pci and pci express bus
Table of Contents

Advertisement

Quick Links

M2i.30xx
M2i.30xx-exp
fast 12 bit transient recorder,
A/D converter board
for PCI-X, PCI and PCI Express bus
Hardware Manual
Software Driver Manual
English version
May 24, 2018
SPECTRUM INSTRUMENTATION GMBH · AHRENSFELDER WEG 13-17 · 22927 GROSSHANSDORF · GERMANY
PHONE: +49 (0)4102-6956-0 · FAX: +49 (0)4102-6956-66 · E-MAIL: info@spec.de · INTERNET: www.spectrum-instrumentation.com

Advertisement

Table of Contents
loading

Summary of Contents for Spectrum M2i.3020

  • Page 1 PCI-X, PCI and PCI Express bus Hardware Manual Software Driver Manual English version May 24, 2018 SPECTRUM INSTRUMENTATION GMBH · AHRENSFELDER WEG 13-17 · 22927 GROSSHANSDORF · GERMANY PHONE: +49 (0)4102-6956-0 · FAX: +49 (0)4102-6956-66 · E-MAIL: info@spec.de · INTERNET: www.spectrum-instrumentation.com...
  • Page 2 (c) SPECTRUM INSTRUMENTATION GMBH AHRENSFELDER WEG 13-17, 22927 GROSSHANSDORF, GERMANY SBench, digitizerNETBOX and generatorNETBOX are registered trademarks of Spectrum Instrumentation GmbH. Microsoft, Visual C++, Visual Basic, Windows, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 and Windows Server are trademarks/registered trademarks of Microsoft Corporation.
  • Page 3: Table Of Contents

    Additional options ................................12 Star-Hub ..................................12 System Star-Hub ................................12 BaseXIO (versatile digital I/O) ............................13 Digital inputs................................13 The Spectrum type plate ..............................14 Hardware information................................. 15 Block diagram................................15 Technical Data ................................16 Dynamic Parameters ..............................18 Hardware Installation .....................
  • Page 4 Software ......................... 31 Software Overview................................31 Card Control Center ................................31 Discovery of Remote Cards and digitizerNETBOX/generatorNETBOX products..............32 Wake On LAN of digitizerNETBOX/generatorNETBOX ....................32 Netbox Monitor ................................33 Hardware information..............................33 Firmware information ..............................34 Software License information............................34 Driver information.................................
  • Page 5 Programming the Board ....................57 Overview ..................................57 Register tables ................................... 57 Programming examples............................... 57 Initialization..................................58 Initialization of Remote Products ............................58 Error handling..................................58 Gathering information from the card............................. 59 Card type ..................................59 Hardware version................................. 60 Production date ................................60 Last calibration date (analog cards only) .........................
  • Page 6 Trigger modes and appendant registers ................89 General Description................................89 Trigger Engine Overview..............................89 Trigger masks ..................................89 Trigger OR mask ................................89 Trigger AND mask................................ 91 Software trigger ................................. 92 Force- and Enable trigger ..............................92 Delay trigger ..................................93 External TTL trigger ................................
  • Page 7 ABA mode (dual timebase) .................... 130 General information ................................. 130 Standard Mode................................130 FIFO Mode ................................131 Limits of pre trigger, post trigger, memory size ........................131 Example for setting ABA mode: ............................ 132 Reading out ABA data ..............................132 General..................................
  • Page 8 Appendix ........................158 Error Codes ..................................158 Spectrum Knowledge Base ............................159 Continuous memory for increased data transfer rate ......................160 Background ................................160 Setup on Linux systems ..............................161 Setup on Windows systems............................161 Usage of the buffer ..............................162 Pin assignment of the multipin connector ..........................
  • Page 9: Introduction

    133 MHz x 64 bit = 1 GByte/s per bus, is more and more replaced by the PCI Express standard with up to 4 GByte/s data transfer rate per slot. The Spectrum M2i boards are available in two versions, for PCI/PCI-X as well as for PCI Express. The 100% software compatible standards allow to combine both standards in one system with the same driver and software commands.
  • Page 10: Different Models Of The M2I.30Xx Series

    The following overview shows the different available models of the M2i.30xx series. They differ in the number mounted acquisition modules and the number of available channels. You can also see the model dependent allocation of the output connectors. • M2i.3010 • M2i.3020 • M2i.3010-exp • M2i.3020-exp •...
  • Page 11 Introduction Different models of the M2i.30xx series • M2i.3013 • M2i.3014 • M2i.3016 • M2i.3023 • M2i.3024 • M2i.3026 • M2i.3033 • M2i.3013-exp • M2i.3014-exp • M2i.3016-exp • M2i.3023-exp • M2i.3024-exp • M2i.3026-exp • M2i.3033-exp (c) Spectrum GmbH...
  • Page 12: Additional Options

    Additional options Introduction Additional options Star-Hub The star hub piggy-back module al- lows the synchronisation of up to 16 M2i cards. It is possible to synchro- nize cards of the same type with each other as well as different types. Two different versions of the star-hub module are available.
  • Page 13: Basexio (Versatile Digital I/O)

    2 additional digital bits per channel with 14 bit resolu- tion boards. The connectors for these digital out- puts are mounted on an additional bracket. The figures show the option on boards with either one or two modules. (c) Spectrum GmbH...
  • Page 14: The Spectrum Type Plate

    The Spectrum type plate The Spectrum type plate, which consists of the following components, can be found on all of our boards. Please check whether the printed information is the same as the information on your delivery note. All this information can also be read out by software: The board type, consisting of the two letters describing the bus (in this case M2i for the PCI-X bus) and the model number.
  • Page 15: Hardware Information

    Introduction Hardware information Hardware information Block diagram (c) Spectrum GmbH...
  • Page 16: Technical Data

    Hardware information Introduction Technical Data Analog Inputs Resolution 12 bit Input Range software programmable ±200 mV, ±500 mV, ±1 V, ±2 V, ±5 V, ±10 V Input Mode fixed bipolar, single-ended Input Offset software programmable ±100% of input range in steps of 1% ADC Differential non linearity (DNL) ADC only ±1 LSB...
  • Page 17: Power Consumption

    M2i.30x3, 30x4, 30x6 (256 MSample memory) 2.6 A 1.4 A 15.6 W 0.4 A 1.4 A 18.1 W M2i.3026 (2 GSample memory) max power 3.7 A 1.4 A 19.2 W 0.4 A 2.0 A 25.3 W MTBF MTBF 500000 hours (c) Spectrum GmbH...
  • Page 18: Dynamic Parameters

    Hardware information Introduction Dynamic Parameters M2i.3011 M2i.3021 M2i.3031 M2i.3010 M2i.3020 M2i.3015 M2i.3025 M2i.3013 M2i.3023 M2i.3033 M2i.3012 M2i.3022 M2i.3016 M2i.3026 M2i.3014 M2i.3024 M2i.3027 min internal clock 1 kS/s 1kS/s 1kS/s 1kS/s 1kS/s 1kS/s 1kS/s max internal clock 40 MS/s 50 MS/s 62.5 MS/s...
  • Page 19 Remote Server Software Package - LAN remote access for M2i/M3i/M4i/M4x/M2p cards SPc-SCAPP Spectrum’s CUDA Access for Parallel Processing - SDK for direct data transfer between Spectrum card and CUDA GPU. Includes RDMA activation and examples. Signed NDA needed for access.
  • Page 20: Hardware Installation

    System Requirements All Spectrum M2i/M3i.xxxx instrumentation cards are compliant to the PCI standard and require in general one free full length slot. This can either be a standard 32 bit PCI legacy slot, a 32 bit or a 64 bit PCI-X slot. Depending on the installed options additional free slots can be necessary.
  • Page 21: Installing The Board In The System

    Before installing the board you first need to unscrew and remove the dedicated blind-bracket usually mounted to cover unused slots of your PC. Please keep the screw in reach to fasten your Spectrum card afterwards. All Spectrum cards require a full length PCI, PCI-X slot (either 32Bit or 64Bit) or PCI Express slot (either x1, x4, x8 or x16) with a track at the backside to guide the board by its retainer.
  • Page 22 Installing the board in the system Hardware Installation Installing the M2i/M3i.xxxx-exp PCI Express card in a PCIe x1 slot Installing the M2i/M3i.xxxx-exp PCI Express card in a PCIe x4, x8 or x16 slot M2i.30xx / M2i.30xx-exp Manual...
  • Page 23: Installing A Board With Digital Inputs/Outputs Mounted On An Extra Bracket

    Before installing the board you first need to unscrew and remove the dedicated blind-brackets usually mounted to cover unused slots of your PC. Please keep the screws in reach to fasten your Spectrum board and the extra bracket afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by its retainer.
  • Page 24: Installing A Board With Option Basexio

    Before installing the board you first need to unscrew and remove the dedicated blind-brackets usually mounted to cover unused slots of your PC. Please keep the screws in reach to fasten your Spectrum board and the extra bracket afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by its retainer.
  • Page 25: Installing Multiple Boards Synchronized By Star-Hub Option

    Before installing the cards you first need to unscrew and remove the dedicated blind-brackets usually mounted to cover unused slots of your PC. Please keep the screws in reach to fasten your Spectrum cards afterwards. All Spectrum boards require a full length PCI slot with a track at the backside to guide the card by its retainer.
  • Page 26: Software Driver Installation

    Microsoft Website for available matching driver modules. Prior to running the Spectrum installer, the card will appear in the Windows device manager as an generalized card (in case of Windows 10 as a „PCIe Data Acquisition and Signal Processing Controller“...
  • Page 27: After Installation

    Software Driver Installation Windows After installation After running the Spectrum driver installer, the card will appear in the Windows device manager with its name matching the card se- ries. The card is now ready to be used. (c) Spectrum GmbH...
  • Page 28: Linux

    Unfortunately this won’t work in most cases as most Linux system refuse to load a driver which is not exactly matching. In this case it is possible to get the kernel driver sources from Spectrum. Please contact your local sales representative to get more details on this procedure.
  • Page 29: Standard Driver Update

    The matching version is installed automatically in the /usr/lib directory by the kernel driver install script for card level products. The library is renamed for easy access to libspcm_linux.so. For digitizerNETBOX/generatorNETBOX products and also for evaluating or using only the software simulated demo cards the library is in- stalled with a separate install script: sh install_libonly.sh (c) Spectrum GmbH...
  • Page 30: Control Center

    To start programming the cards under Linux please use the standard C/C++ examples which are all running under Linux and Windows. Control Center The Spectrum Control Center is also available for Linux and needs to be installed sepa- rately. The features of the Control Center are described in a later chapter in deeper de- tail.
  • Page 31: Software

    Software Overview The Spectrum drivers offer you a common and fast API for using all of the board hardware features. This API is the same on all supported operating systems. Based on this API one can write own programs using any programming language that can access the driver API. This manual describes in detail the driver API, providing you with the necessary information to write your own programs.
  • Page 32: Discovery Of Remote Cards And Digitizernetbox/Generatornetbox Products

    This is the stored information that allows other Spectrum products to access previously found cards. Using the „Update cached cards“ button will try to re-open these cards and gather information of it. Afterwards the remote cards may disappear if they’re in use from somewhere else or the complete information of the remote products is shown again.
  • Page 33: Netbox Monitor

    • Starting manually from the Spectrum Control Center using the context menu as shown above • Starting from command line. The Netbox Monitor program is automatically installed together with the Spectrum Control Center and is located in the selected install folder. Using the command line tool one can place a simple script into the autostart folder to have the Net- box Monitor running automatically after system boot.
  • Page 34: Firmware Information

    Software Firmware information Another sub-tree is informing about the cards firmware ver- sion. As all Spectrum cards consist of several programmable components, there is one firmware version per component. Nearly all of the components firmware can be updated by software. The only exception is the configuration device, which only can receive a factory update.
  • Page 35: Driver Information

    Installing and removing Demo cards With the help of the card control center one can install demo cards in the system. A demo card is simulated by the Spectrum driver in- cluding data production for acquisition cards. As the demo card is...
  • Page 36: Software License Upgrade

    28000000] = 112000000 Bytes/second. Taking the above figures measured on a standard 33 MHz PCI slot the system is just capable of reaching this transfer speed: 108.0 MB/s = 108 * 1024 * 1024 = 113246208 Bytes/second. Unfortunately it is not possible to measure transfer speed on a system without having a Spectrum card installed. M2i.30xx / M2i.30xx-exp Manual...
  • Page 37: Debug Logging For Support Cases

    Device mapping Within the „Device mapping“ tab of the Spectrum Control Center, one can en- able the re-mapping of Spectrum devices, be it either local cards, remote instru- ments such as a digitizerNETBOX or generatorNETBOX or even cards in a remote PC and accessed via the Spectrum remote server option.
  • Page 38: Firmware Upgrade

    A new firmware version is provided there as an installer, that copies the latest firmware to your system. All files are located in a dedicated subfold- er „FirmwareUpdate“ that will be created inside the Spectrum installation folder. Under Windows this folder by default has been created in the stan- dard program installation directory.
  • Page 39: Abilities And Limitations Of The Compatibility Dll

    • 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.
  • Page 40: Header Files

    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.
  • Page 41: C++ Builder 32 Bit

    DLL: Example of function loading: hDLL = LoadLibrary ("spcm_win64.dll"); // Modified: Load the 64 bit version of the Spcm driver here pfn_spcm_hOpen = (SPCM_HOPEN*) GetProcAddress (hDLL, "spcm_hOpen"); pfn_spcm_vClose = (SPCM_VCLOSE*) GetProcAddress (hDLL, "spcm_vClose"); (c) Spectrum GmbH...
  • Page 42: National Instruments Labwindows/Cvi

    Software National Instruments LabWindows/CVI Include Drivers To use the Spectrum driver under LabWindows/CVI it is necessary to first load the functions from the driver dll. Please use the library file spcm_win32_cvi.lib to access the driver functions. Examples Examples for LabWindows/CVI can be found on CD in the directory /examples/cvi. Please mix these examples with the standard C/C++ examples to have access to all functions and modes of the cards.
  • Page 43 The available software registers for the driver are listed in the board specific part of the documentation below. The function returns a 32 bit error code if an error occurs. If no error occurs the function returns ERR_OK, what is zero. (c) Spectrum GmbH...
  • Page 44 Driver functions Software Function spcm_dwGetParam uint32 _stdcall spcm_dwGetParam_i32 ( // Return value is an error code drv_handle hDevice, // handle to an already opened device int32 lRegister, // software register to be read out int32* plValue); // pointer for the return value uint32 _stdcall spcm_dwGetParam_i64m ( // Return value is an error code drv_handle...
  • Page 45 Call this function if you want to delete the buffer memory after calling the spcm_dwDefTransfer function. If the buffer already has been transferred after calling spcm_dwDefTransfer it is not necessary to call this function. When calling spcm_dwDefTransfer any further defined buffer is automatically invalidated. (c) Spectrum GmbH...
  • Page 46 Driver functions Software Function spcm_dwInvalidateBuf uint32 _stdcall spcm_dwInvalidateBuf ( // invalidate the transfer buffer drv_handle hDevice, // handle to an already opened device uint32 dwBufType); // type of the buffer to invalidate as // listed above under SPCM_BUF_XXXX Function spcm_dwGetErrorInfo The function returns complete error information on the last error that has occurred.
  • Page 47: Delphi (Pascal) Programming Interface

    Besides including the driver files in the project it is also necessary to include them in the uses section of the source files where functions or constants should be used: uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, SpcRegs, SpcErr, spcm_win32; (c) Spectrum GmbH...
  • Page 48: Examples

    The example implements a very simple scope program that makes single acquisitions on button pressing. A fixed setup is done inside the example. The spcm_scope example can be used with any analog data acquisition card from Spectrum. It covers cards with 1 byte per sample...
  • Page 49: Visual Basic Programming Interface And Examples

    To use the driver function and all the defined constants it is necessary to include the files into the project as shown in the picture on the right. The project overview is taken from one of the examples delivered on CD. (c) Spectrum GmbH...
  • Page 50: Examples

    The example implements a very simple scope program that makes single acquisitions on button pressing. A fixed setup is done inside the example. The spcm_scope example can be used with any analog data acquisition card from Spectrum. It covers cards with 1 byte per sample...
  • Page 51: Net Programming Languages

    Library For using the driver with a .NET based language Spectrum delivers a special library that encapsulates the driver in a .NET object. By adding this object to the project it is possible to access all driver functions and constants from within your .NET environment.
  • Page 52: Using Managed C++/Cli

    .NET programming languages Software Using Managed C++/CLI The SpcmDrv.NET.dll needs to be included within the project options. Please select „Project“ - „Properties“ - „References“ and finally „Add new Reference“. After this all functions and constants of the driver object are available. Please see the example in the directory CppCLR as a start: // ----- open card ----- hDevice = Drv::spcm_hOpen("/dev/spcm0");...
  • Page 53: Python Programming Interface And Examples

    # use cdll because all driver access functions use cdecl calling convention under linux spcmDll = cdll.LoadLibrary ("libspcm_linux.so") # the loading of the driver access functions is similar to windows: # load spcm_hOpen spcm_hOpen = getattr (spcmDll, "spcm_hOpen") spcm_hOpen.argtype = [c_char_p] spcm_hOpen.restype = drv_handle # ... (c) Spectrum GmbH...
  • Page 54: Examples

    Python Programming Interface and Examples Software file regs.py The regs.py file defines all constants that are used for the driver. The constant names are the same names compared to the C/C++ examples. All constant names will be found throughout this hardware manual when certain aspects of the driver usage are explained. It is recommended to only use these constant names for better readability of the programs: SPC_M2CMD = 100l # write a command...
  • Page 55: Java Programming Interface And Examples

    Examples for Java can be found on CD in the directory /examples/java. The directory contains the above mentioned header files and some examples, each of them working with a certain type of card. Please feel free to use these examples as a base for your programs and to modify them in any kind. (c) Spectrum GmbH...
  • Page 56: Labview Driver And Examples

    The MATLAB drivers have their own manual. The MATLAB drivers, examples and the manual are found on the CD that has been included in the delivery. The latest version is also avail- able on our webpage www.spectrum-instrumentation.com Please follow the description in the MATLAB manual for installation and useage of the MAT- LAB drivers for this card.
  • Page 57: Programming The Board

    (!hDrv) // check whether we can access the card return -1; spcm_dwGetParam_i32 (hDrv, SPC_PCITYP, &lCardType); // simple command, read out of card type printf (“Found card M2i/M3i/M4i.%04x in the system\n”, lCardType & TYP_VERSIONMASK); spcm_vClose (hDrv); return 0; (c) Spectrum GmbH...
  • Page 58: Initialization

    Initialization Programming the Board Initialization Before using the card it is necessary to open the kernel device to access the hardware. It is only possible to use every device exclusively using the handle that is obtained when opening the device. Opening the same device twice will only generate an error code. After ending the driver use the device has to be closed again to allow later re-opening.
  • Page 59: Gathering Information From The Card

    One of the following values is returned, when reading this register. Each card has its own card type constant defined in regs.h. Please note that when reading the card information as a hex value, the lower word shows the digits of the card name while the upper word is a indication for the used bus type. (c) Spectrum GmbH...
  • Page 60: Hardware Version

    Hardware version Since all of the boards from Spectrum are modular boards, they consist of one base board and one or two piggy-back front-end modules and eventually of an extension module like the star-hub. Each of these three kinds of hardware has its own version register. Normally you do not need this information but if you have a support question, please provide the revision together with it.
  • Page 61: Serial Number

    Is set on the card that has a special amplifier module for mounted (M2i.60xx/61xx only). SPCM_FEAT_STARHUBSYSSLAVE 4000h Is set in the card that carries a System Star-Hub Slave module to connect with System Star-Hub master systems (M2i). SPCM_FEAT_NETBOX 8000h The card is physically mounted within a digitizerNETBOX or generatorNETBOX. (c) Spectrum GmbH...
  • Page 62: Miscellaneous Card Information

    Gathering information from the card Programming the Board SPCM_FEAT_REMOTESERVER 10000h Support for the Spectrum Remote Server option is installed on this card. SPCM_FEAT_SCAPP 20000h Support for the SCAPP option allowing CUDA RDMA access to supported graphics cards for GPU calculations...
  • Page 63: Reset

    Reset Every Spectrum card can be reset by software. Concerning the hardware, this reset is the same as the power-on reset when starting the host computer. In addition to the power-on reset, the reset command also brings all internal driver settings to a defined default state. A software reset is automatically performed, when the driver is first loaded after starting the host system.
  • Page 64: Analog Inputs

    Channel Selection One key setting that influences all other possible settings is the channel enable register. A unique feature of the Spectrum cards is the possibility to program the number of channels you want to use. All on-board memory can then be used by these activated channels.
  • Page 65: Important Note On Channels Selection

    The following example reads out the number of available input ranges and reads and prints the minimum and maximum value of all input ranges. spcm_dwGetParam_i32 (hDrv, SPC_READIRCOUNT, &lNumberOfRanges); for (i = 0; i < lNumberOfRanges; i++) spcm_dwGetParam_i32 (hDrv, SPC_READRANGEMIN0 + i, &lMinimumInputRage); spcm_dwGetParam_i32 (hDrv, SPC_READRANGEMAX0 + i, &lMaximumInputRange); printf („Range %d: %d mV to %d mV\n“, i, lMinimumInputRange, lMaximumInputRange); (c) Spectrum GmbH...
  • Page 66: Input Offset

    This results in a much better use of the converters resolution. On this acquisition boards from Spectrum you have the pos- sibility to adjust the input offset separately for each channel. The example in the right figure shows signals with a range of ±1.0 V that have offsets up to ±1.0 V.
  • Page 67: Input Termination

    As all settings are temporarily stored in the driver, the automatic adjustment will only affect these values. After exiting your program, all cal- ibration information will be lost. To give you a possibility to save your own settings, most Spectrum card have at least one set of user settings that can be saved within the on-board EEPROM.
  • Page 68: Read Out Of Input Features

    Please note that the following table shows all input features settings that are available throughout all Spectrum acquisition cards. Some of these features are not installed on your specific hardware.
  • Page 69: Acquisition Modes

    Continuous data acquisition for one single trigger event. The on-board memory is used completely as FIFO buffer. SPC_REC_FIFO_MULTI Continuous data acquisition for multiple trigger events. SPC_REC_FIFO_GATE Continuous data acquisition using an external gate signal. SPC_REC_FIFO_ABA Continuous data acquisition for multiple trigger events together with continuous data acquisition with a slower sampling clock. (c) Spectrum GmbH...
  • Page 70: Commands

    Commands Acquisition modes Commands The data acquisition/data replay is controlled by the command register. The command register controls the state of the card in general and also the state of the different data transfers. Data transfers are explained in an extra chapter later on. The commands are split up into two types of commands: execution commands that fulfill a job and wait commands that will wait for the occurrence of an interrupt.
  • Page 71: Card Status

    As soon as the trigger event is received the status changes to M2STAT_CARD_TRIGGER and the card starts with the data replay. After replay has been finished - depending on the programmed mode - the status changes to M2STAT_CARD_READY and the card stops. (c) Spectrum GmbH...
  • Page 72: Data Transfer

    Commands Acquisition modes Data Transfer Data transfer consists of two parts: the buffer definition and the commands/status information that controls the transfer itself. Data transfer shares the command and status register with the card control commands and status information. In general the following details on the data transfer are valid for any data transfer in any direction: •...
  • Page 73 To keep the example simple it does no error checking. Please be sure to check for errors if using these command in real world programs! Users should take care to explicitly send the M2CMD_DATA_STOPDMA command prior to invalidating the buffer, to avoid crashes due to race conditions when using higher-latency data transportation layers, such as to remote Ethernet devices. (c) Spectrum GmbH...
  • Page 74: Standard Single Acquisition Mode

    The standard single mode is the easiest and mostly used mode to acquire analog data with a Spectrum acquisition card. In standard single recording mode the card is working totally independent from the PC, after the card setup is done. The advantage of the Spectrum boards is that regardless to the system usage the card will sample with equidistant time intervals.
  • Page 75: Fifo Single Acquisition Mode

    // here is the right position to do something with the data (printf is limited to 32 bit variables) printf ("Currently Available: %d, total: %d\n", (int32) llAvailBytes, (int32) llTotalBytes); // now we free the number of bytes and wait for the next buffer spcm_dwSetParam_i64 (hDrv, SPC_DATA_AVAIL_CARD_LEN, llAvailBytes); dwError = spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_DATA_WAITDMA); (c) Spectrum GmbH...
  • Page 76: Limits Of Pre Trigger, Post Trigger, Memory Size

    Limits of pre trigger, post trigger, memory size Acquisition modes Limits of pre trigger, post trigger, memory size The maximum memory size parameter is only limited by the number of activated channels and by the amount of installed memory. Please keep in mind that each sample needs 2 bytes of memory to be stored.
  • Page 77: Buffer Handling

    DMA transfers that are running actually. It is also absolutely criti- cal to define the application data buffer with an unmatching length as DMA can than try to access memory outside the application data (c) Spectrum GmbH...
  • Page 78 Buffer handling Acquisition modes area. • As shown in the drawing above the DMA control will announce new data to the application by sending an event. Waiting for an event is done internally inside the driver if the application calls one of the wait functions. Waiting for an event does not consume any CPU time and is therefore highly desirable if other threads do a lot of calculation work.
  • Page 79 However the DATA_AVAIL_USER_LEN register will give you the com- plete amount of available bytes even if one part of the free area is at the end of the buffer and the second half at the beginning of the buffer. (c) Spectrum GmbH...
  • Page 80: Data Organisation

    Converting ADC samples to voltage values The Spectrum driver also contains a register that holds the value of the decimal value of the full scale representation of the installed ADC. This value should be used when converting ADC values (in LSB) into real-world voltage values, because this register also automatically takes any specialities into account, such as slightly reduced ADC resolution with reserved codes for gain/offset compensation.
  • Page 81 Acquisition modes Data organisation (c) Spectrum GmbH...
  • Page 82: Clock Generation

    Synchronization clock (optional) The star-hub option allows the synchronization of up to 16 cards of the M2i series from Spectrum with a minimal phase delay between the different cards. As this clock is also available at the dividers input, cards of the same or slower sampling speeds can be synchronized. For details on the synchronization option please take a look at the dedicated chapter in this manual.
  • Page 83: Clock Mode Register

    The minimum internal sample rate on all M2i cards is limited to 1 kHz and the maximum sample rate depends on the specific type of board. The maximum sample rates for your type of card are shown in the tables below. (c) Spectrum GmbH...
  • Page 84: Using Plain Quartz1 Without Pll

    Using plain Quartz1 without PLL In some cases it is useful for the application not to have the on-board PLL activated. Although the PLL used on the Spectrum boards is a low- jitter version it still produces more clock jitter than a plain quartz oscillator. For these cases the Spectrum boards have the opportunity to switch off the PLL by software and use a simple clock divider.
  • Page 85: External Reference Clock

    • When using the timestamp option the counter is also running with the real A/D converter clock and not with the programmed slower sam- pling clock. When interpreting timestamp values it is therefore necessary to check the oversampling factor and take it into account. (c) Spectrum GmbH...
  • Page 86: External Clocking

    External clocking Clock generation External clocking Direct external clock An external clock can be fed in on the external clock connector of the board. This can be any clock, that matches the specification of the card. The external clock signal can be used to synchronize the card on a system clock or to feed in an exact matching sampling rate. Register Value Direction...
  • Page 87: External Clock With Divider

    How to read this table? If you have a card with a total number of four channels (available on two modules with two channels each), you have an external clock source with 30 MHz and you activate channel 0 and channel 2 (one channel per module), you will have to set the external (c) Spectrum GmbH...
  • Page 88 External clocking Clock generation range to EXRANGE_LOW. If you activate channel 0 and channel 1 on the same card and use the same 30 MHz external clock, you will have to set the external range EXRANGE_HIGH instead. Example: spcm_dwSetParam_i32 (hDrv, SPC_CLOCKMODE, SPC_CM_EXTERNAL); // activate ext.
  • Page 89: Trigger Modes And Appendant Registers

    Trigger modes and appendant registers General Description The trigger modes of the Spectrum M2i series A/D cards are very extensive and give you the possibility to detect nearly any trigger event, you can think of. You can choose between seven external TTL trigger modes and up to 20 internal trigger modes (on analog acquisition cards) including soft- ware and channel trigger, depending on your type of board.
  • Page 90 Trigger masks Trigger modes and appendant registers Every trigger source of the M2i series cards is wired to one of the above men- tioned OR masks. The user then can program which trigger source will be recognized, and which one won’t. This selection for the general mask is realized with the SPC_TRIG_ORMASK register in combination with constants for every possible trigger source.
  • Page 91: Trigger And Mask

    The explanation and a detailed description of the different trigger modes for the channel trigger will be shown in the dedicated passage within this chapter. spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH_ANDMASK0, SPC_TMASK_CH0); // Enable channel0 trigger within the AND mask spcm_dwSetParam_i32 (hDrv,SPC_TRIG_CH0_MODE, SPC_TM_HIGH // Setting up ch0 trigger for HIGH levels (c) Spectrum GmbH...
  • Page 92: Software Trigger

    Trigger modes and appendant registers Software trigger The software trigger is the easiest way of triggering any Spectrum board. The acquisition or replay of data will start immediately af- ter starting the board. The only delay results from the time the board needs for its setup.
  • Page 93: Delay Trigger

    Delay trigger All of the Spectrum M2i series cards allow the user to program an additional trigger delay. As shown in the trigger overview section, this delay is the last element in the trigger chain. Therefore the user does not have to care for the sources when programming the trigger delay.
  • Page 94: Edge And Level Triggers

    External TTL trigger Trigger modes and appendant registers If you choose an external trigger mode the SPC_TRIGGEROUT register will be overwritten and the trigger connector will be used as an input any ways. Register Value Direction Description SPC_TRIG_OUTPUT 40100 read/write Enables the trigger output if internal trigger is detected If external trigger modes are used, this register will have no effect.
  • Page 95: Pulsewidth Triggers

    Register Value Direction set to Value SPC_TRIG_EXT0_PULSEWIDTH 44210 read/write Sets the pulsewidth in samples. 2 up to 65535 SPC_TRIG_EXT0_MODE 40510 read/write (SPC_TM_POS | SPC_TM_PW_GREATER) 4000001h (c) Spectrum GmbH...
  • Page 96: Channel Trigger

    Channel Trigger Trigger modes and appendant registers TTL pulsewidth trigger for short HIGH pulses This mode is for detecting HIGH pulses of an external TTL signal that are shorter than a programmed pulsewidth. If the pulse is longer than the programmed pulsewidth, no trigger will be detect- ed.
  • Page 97 (hDrv, SPC_TRIG_CH_ORMASK0, SPC_TMASK0_CH0 | SPC_TMASK0_CH1); // Enable channel 0 + 1 spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH0_MODE, SPC_TM_POS ); // Set triggermode of channel 0 to positive edge spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH1_MODE, SPC_TM_NEG ); // Set triggermode of channel 1 to negative edge (c) Spectrum GmbH...
  • Page 98: Channel Trigger Level

    Reading out the number of possible trigger levels The Spectrum driver also contains a register that holds the value of the maximum possible different trigger levels considering the above men- tioned exclusion of the most negative possible value. This is useful, as new drivers can also be used with older hardware versions, because you can check the trigger resolution during run time.
  • Page 99: Spc_Trig_Ch_Ormask0

    These edge triggered channel trigger modes correspond to the trigger possibilities of usual oscilloscopes. Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read/write SPC_TM_POS SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the desired trigger level relatively to the channel’s input range. board dependant (c) Spectrum GmbH...
  • Page 100: Spc_Tm_Neg

    Channel Trigger Trigger modes and appendant registers Channel trigger on negative edge The analog input is continuously sampled with the selected sample rate. If the programmed trigger level is crossed by the channel’s signal from higher values to lower values (fall- ing edge) then the triggerevent will be detected.
  • Page 101 04000002h SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the desired trigger level relatively to the channel’s input range. board dependant SPC_TRIG_CH0_PULSEWIDTH 44101 read/write Sets the pulsewidth in samples. Values from 2 to 65535 are allowed. 2 to 65535 (c) Spectrum GmbH...
  • Page 102 Channel Trigger Trigger modes and appendant registers Channel pulsewidth trigger for short positive pulses The analog input is continuously sampled with the selected sample rate. If the programmed trigger level is crossed by the channel’s signal from lower to higher values (rising edge) the pulsewidth counter is started.
  • Page 103 SPC_TRIG_CH0_LEVEL1 42300 read/write Set it to the lower trigger level relatively to the channel’s input range. board dependant SPC_TRIG_CH0_PULSEWIDTH 44101 read/write Sets the pulsewidth in samples. Values from 2 to 65535 are allowed. 2 to 65535 (c) Spectrum GmbH...
  • Page 104 Channel Trigger Trigger modes and appendant registers Channel window trigger for short inner signals The analog input is continuously sampled with the selected sample rate. The upper and the lower levels define a win- dow. Every time the signal enters the window from the out- side, the pulsewidth counter is started.
  • Page 105 SPC_TRIG_CH0_LEVEL1 42300 read/write Set it to the lower trigger level relatively to the channel’s input range. board dependant SPC_TRIG_CH0_PULSEWIDTH 44101 read/write Sets the pulsewidth in samples. Values from 2 to 65535 are allowed. 2 to 65535 (c) Spectrum GmbH...
  • Page 106: Mode Multiple Recording

    Recording modes Mode Multiple Recording Mode Multiple Recording The Multiple Recording mode allows the acquisition of data blocks with multiple trigger events without restarting the hard- ware. The on-board memory will be divided into several segments of the same size. Each segment will be filled with data when a trig- ger event occurs (acquisition mode).
  • Page 107: Limits Of Pre Trigger, Post Trigger, Memory Size

    Please keep in mind that the trigger events are timestamped, not the begin- ning of the acquisition. The first sample that is available is at the time position of [Timestamp - Pretrigger]. The programming details of the timestamp option is explained in an extra chapter. (c) Spectrum GmbH...
  • Page 108: Trigger Modes

    Trigger Modes Mode Multiple Recording Trigger Modes When using Multiple Recording all of the card’s trigger modes can be used except the software trigger. For detailed information on the avail- able trigger modes, please take a look at the relating chapter earlier in this manual. Trigger Counter The number of acquired trigger events in Multiple Recording mode is counted in hardware and can be read out while the acquisition is running or after the acquisition has finished.
  • Page 109: Mode Gated Sampling

    Value Direction Description SPC_LOOPS 10020 read/write Defines the number of gates to be recorded Recording will be infinite until the user stops it. 1 … [4G - 1] Defines the total number of gates to be recorded. (c) Spectrum GmbH...
  • Page 110: Limits Of Pre Trigger, Post Trigger, Memory Size

    Limits of pre trigger, post trigger, memory size Mode Gated Sampling Limits of pre trigger, post trigger, memory size The maximum memory size parameter is only limited by the number of activated channels and by the amount of installed memory. Please keep in mind that each sample needs 2 bytes of memory to be stored.
  • Page 111: Spc_Tm_High

    With the next low level the gate will be stopped. Register Value Direction Description SPC_TRIG_EXT0_MODE 40510 read/write Sets the external trigger mode for the board SPC_TM_HIGH Sets the trigger mode for external TTL trigger to detect high levels. (c) Spectrum GmbH...
  • Page 112: Spc_Tm_Low

    Trigger Mode Gated Sampling Positive TTL double edge trigger This mode is for detecting the rising edges of an external TTL sig- nal. The gate will start on the first rising edge that is detected after starting the board. As this mode is purely edge-triggered, the high level at the cards start time, does not trigger the board.
  • Page 113 The gate will stop on the second falling edge that is detected. Register Value Direction Description SPC_TRIG_EXT0_MODE 40510 read/write Sets the external trigger mode for the board SPC_TM_NEG | 08000002h Sets the gate mode for external TTL trigger to start and stop on negative edges SPC_TM_DOUBLEEDGE (c) Spectrum GmbH...
  • Page 114: Pulsewidth Triggers

    Trigger Mode Gated Sampling Pulsewidth triggers For all external edge and level trigger modes, the OR mask must contain the corresponding input, as the following table shows: Register Value Direction Description SPC_TRIG_ORMASK 40410 read/write Defines the OR mask for the different trigger sources. SPC_TMASK_EXT0 Enable external trigger input for the OR mask SPC_TMASK_XIO0...
  • Page 115: Channel Triggers Modes

    As this mode is purely edge-triggered, the low level at the cards start time does not trigger the board. Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read/write SPC_TM_NEG SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the desired trigger level relatively to the channel’s input range. board dependant (c) Spectrum GmbH...
  • Page 116 Trigger Mode Gated Sampling Channel trigger LOW level The analog input is continuously sampled with the selected sample rate. If the signal is equal or lower than the pro- grammed trigger level the gate starts. When the signal is higher than the programmed trigger lev- el the gate will stop.
  • Page 117: Spc_Tm_Pw_Greater

    00000020h SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the upper trigger level relatively to the channel’s input range. board dependant SPC_TRIG_CH0_LEVEL1 42300 read/write Set it to the lower trigger level relatively to the channel’s input range. board dependant (c) Spectrum GmbH...
  • Page 118: Spc_Tm_Winleave

    Trigger Mode Gated Sampling Channel window trigger for leaving signals The analog input is continuously sampled with the selected sample rate. The upper and the lower level define a win- dow. When the signal leaves the window from the inside to the outside, the gate will start.
  • Page 119: Spc_Tm_Winenter

    512); // Set the posttrigger to 512 samples spcm_dwSetParam_i32 (hDrv, SPC_LOOP, 1024); // 1024 gates will be recorded spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_NEG);// Use external trigger (falling edge) spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0);// and enable it within the trigger OR-mask (c) Spectrum GmbH...
  • Page 120: Timestamps

    General information Timestamps Timestamps General information The timestamp function is used to record trigger events relative to the beginning of the measurement, relative to a fixed time-zero point or synchronized to an external reset clock. The reset clock can come from a radio clock a GPS signal or from any other external machine. The timestamp is internally realized as a very wide counter that is running with the currently used sampling rate.
  • Page 121: Limits

    100h Counter is running with complete width on sampling clock Please keep in mind that this mode only work sufficiently as long as you don’t change the sampling rate between two acquisitions that you want to compare. (c) Spectrum GmbH...
  • Page 122: Startreset Mode

    Timestamp modes Timestamps StartReset mode In StartReset mode the timestamp counter is set to zero on every start of the card. After starting the card the counter counts continuously. The timestamps of one recording are referenced to the start of the recording. This mode is very useful for Multiple Recording and Gated Sampling (see according chapters for detailed information on these two optional modes) The following table shows the valid values that can be written to the timestamp command register.
  • Page 123: Reading Out The Timestamps

    Starts the DMA transfer for an already defined buffer. M2CMD_EXTRA_WAITDMA 200000h Waits until the data transfer has ended or until at least the amount of bytes defined by notify size are available. This wait function also takes the timeout parameter into account. (c) Spectrum GmbH...
  • Page 124: Data Transfer Using Dma

    Reading out the timestamps Timestamps M2CMD_EXTRA_STOPDMA 400000h Stops a running DMA transfer. Data is invalid afterwards. M2CMD_EXTRA_POLL 800000h Polls data without using DMA. As DMA has some overhead and has been implemented for fast data transfer of large amounts of data it is in some cases more simple to poll for available data. Please see the detailed examples for this mode.
  • Page 125: Data Transfer Using Polling

    The buffer handling is also similar to the DMA transfer. As soon as one of the registers SPC_TS_AVAIL_USER_LEN or SPC_ABA_AVAIL_USER_LEN is read the driver will read out all available data from the hardware and will return the number of bytes that has been read. In minimum this will be one DWORD = 4 bytes. (c) Spectrum GmbH...
  • Page 126: Comparison Of Dma And Polling Commands

    Reading out the timestamps Timestamps Buffer handling example for polling timestamp transfer (ABA transfer is similar, just using other registers) char* pcData = new char[lBufSizeInBytes]; // we now define the transfer buffer with the minimum notify size of one page = 4 kByte spcm_dwDefTransfer_i64 (hDrv, SPCM_BUF_TIMESTAMP, SPCM_DIR_CARDTOPC, 4096, (void*) pcData, 0, lBufSizeInBytes);...
  • Page 127: Combination Of Memory Segmentation Options With Timestamps

    // as we now have the timestamps we just print them and calculate the time in milli seconds int32 lSamplerate, lOver, i; spcm_dwGetParam_i32 (hDrv, SPC_SAMPLERATE, &lSamplerate); spcm_dwGetParam_i32 (hDrv, SPC_OVERSAMPLINGFACTOR, &lOver); for (i = 0; i < 4; i++) printf ("#%d: %I64d samples = %.3f ms\n", i, pllStamps[i], 1000.0 * pllStamps[i] / lSamplerate / lOver); (c) Spectrum GmbH...
  • Page 128: Gated Sampling And Timestamps

    Combination of Memory Segmentation Options with Timestamps Timestamps Gated Sampling and Timestamps Gated Sampling and the timestamp mode fit very good together. If timestamp recording is activated each gate will get timestamped as shown in the draw- ing on the right. As you can see, both beginning and end of the gate interval are timestamped.
  • Page 129 M3i: driver version V2.06 (or newer) and firmware version V6 (or newer) Please update your system to the newest versions to run this mode. The programming details of the ABA mode and timestamp modes are each explained in a dedicated chapter in this manual. (c) Spectrum GmbH...
  • Page 130: Aba Mode (Dual Timebase)

    General information ABA mode (dual timebase) ABA mode (dual timebase) General information The ABA mode allows the acquisition of data with a dual timebase. In case of trigger event the inputs are sampled very fast with the pro- grammed sampling rate. This part is similar to the Multiple Recording mode. But instead of having no data in between the segments one has the opportunity to continuously sample the inputs with a slower sampling rate the whole time.
  • Page 131: Fifo Mode

    512 MSample 1 GSample Mem / 4 8 MSample 16 MSample 32 MSample 64 MSample 128 MSample 256 MSample 512 MSample Mem / 8 4 MSample 8 MSample 16 MSample 32 MSample 64 MSample 128 MSample 256 MSample (c) Spectrum GmbH...
  • Page 132: Example For Setting Aba Mode

    Reading out ABA data ABA mode (dual timebase) Please keep in mind that this table shows all values at once. Only the absolute maximum and minimum values are shown. There might be additional limitations. Which of these values is programmed depends on the used mode. Please read the detailed documentation of the mode. Example for setting ABA mode: The following example will program the standard ABA mode, will set the fast sampling rate to 100 MHz and acquire 2k segments with 1k pretrigger and 1k posttrigger on every rising edge of the trigger input.
  • Page 133: Data Transfer Using Dma

    However it is not necessary to use the wait functions and one can simply request the current status whenever the program has time to do so. When using this polling mode the announced available (c) Spectrum GmbH...
  • Page 134: Data Transfer Using Polling

    Reading out ABA data ABA mode (dual timebase) bytes still stick to the defined notify size! • If the on-board FIFO buffer has an overrun data transfer is stopped immediately. Buffer handling example for DMA timestamp transfer (ABA transfer is similar, just using other registers) char* pcData = new char[lBufSizeInBytes];...
  • Page 135: Comparison Of Dma And Polling Commands

    Enables storage of one additional timestamp for the first A area sample (B time base related) in addition to the trigger related timestamps. SPC_TSFEAT_NONE No additional timestamp is created. The total number of stamps is only trigger related. (c) Spectrum GmbH...
  • Page 136 Reading out ABA data ABA mode (dual timebase) This mode is compatible with all existing timestamp modes. Please keep in mind that the timestamp counter is running with the B area time- base. // normal timestamp setup (e.g. setting timestamp mode to standard using internal clocking) uint32 dwTimestampMode = (SPC_TSMODE_STANDARD | SPC_TSMODE_DISABLE);...
  • Page 137: Option Basexio

    Sets the direction of the lower group (bit D3…D0) to input. XD_CH1_INPUT Sets the direction of the upper group (bit D7…D4) to input. XD_CH0_OUTPUT Sets the direction of the lower group (bit D3…D0) to output. XD_CH1_OUTPUT Sets the direction of the upper group (bit D7…D4) to output. (c) Spectrum GmbH...
  • Page 138: Special Input Functions

    Different functions Option BaseXIO Special Input Functions This way of operating the option BaseXIO requires the lower of the above mentioned group of four lines (XIO3…XIO0) to be set as input. The upper group can be programmed to be either input or output. The four lower input bits then can have additional func- tions besides working as asynchronous digital inputs: •...
  • Page 139: Option Star-Hub

    As this multi-system synchronization comes with some limits on certain settings and also needs some special attention on synchronizing the application software as well, it is therefore described in a separate section later in this manual. (c) Spectrum GmbH...
  • Page 140: Star-Hub Clock Engine

    Software Interface Option Star-Hub Star-Hub clock engine One of the cards can be the clock master for the complete system. This can be any card of the system even one card that does not contain the Star-Hub. As shown in the drawing on the right the clock master can use any of its clock sources to be broadcasted to all other cards.
  • Page 141 2 star-hub A /dev/spcm2 sync0 0 (of star-hub A) 0x0001 card 3 star-hub B /dev/spcm3 sync1 1 (of star-hub B) 0x0002 card 4 /dev/spcm4 1 (of star-hub A) 0x0002 card 5 /dev/spcm5 2 (of star-hub A) 0x0004 (c) Spectrum GmbH...
  • Page 142: Setup Of Synchronization And Clock

    Software Interface Option Star-Hub Now the program has to check both star-hubs: for (j = 0; j < lStarhubCount; j++) spcm_dwGetParam_i32 (hSync[j], SPC_SYNC_READ_SYNCCOUNT, &lSyncCount); for (i = 0; i < lSyncCount; i++) spcm_dwGetParam_i32 (hSync[j], SPC_SYNC_READ_CARDIDX0 + i, &lCardIdx); printf ("star-hub %c logical index %d is connected with card %d\n“, (!j ? ’A’ : ’B’), i, lCardIdx); printf ("\n");...
  • Page 143: Setup Of Trigger

    When starting the card the trigger detection is started disabled. M2CMD_CARD_STOP Stops the current run of the card. If the card is not running this command has no effect. All other commands and settings need to be send directly to the card that it refers to. (c) Spectrum GmbH...
  • Page 144: Error Handling

    Software Interface Option Star-Hub This example shows the complete setup and synchronization start for our four cards: spcm_dwSetParam_i32 (hSync, SPC_SYNC_ENABLEMASK, 0x000F); // all 4 cards are masked spcm_dwSetParam_i32 (hSync, SPC_SYNC_CLKMASK, 0x0004); // card 2 is selected as clock master // to keep it easy we set all card to the same clock and disable trigger for (i = 0;...
  • Page 145 (hSync, SPC_TIMEOUT, 1000); spcm_dwSetParam_i32 (hSync, SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER); // start first acquisition spcm_dwSetParam_i32 (hCard[1], SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER | M2CMD_CARD_WAITREADY); // process data // start next acquistion spcm_dwSetParam_i32 (hCard[1], SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER | M2CMD_CARD_WAITREADY); // process data (c) Spectrum GmbH...
  • Page 146: Option System Star-Hub

    Overview Option System Star-Hub Option System Star-Hub Overview For the synchronization of several systems which each other, special system Star-Hubs are available. Besides their capability to synchronize systems which each other, they can also work as complete standard Star-Hubs as explained above. Two different versions are available: a master system Star-Hub and a slave system-...
  • Page 147: Setting Up Slave Systems

    (and also for loopback to the master system itself) two MMCX to SMB connection cables of identical length are required. The standard cable length provided is 2 m. Please contact Spectrum if your application requires different cable lengths. The 34 MMCX connectors on the bracket are divided up into two groups with 17 connectors each, labeld „To“...
  • Page 148: Programming

    The best matching clock edge depends on the selected sample rate and the total delay. The below mentioned sample rate values assume external cables of 2 m length to be used to connect the systems to the distribution card. If your setup differs please contact Spectrum for further...
  • Page 149: Compensate Injected Trigger Delays

    To show the required steps when programming the system Star-Hub you’ll find a stripped down simplified example on the included driver CD. This C++ example is also available from the Spectrum homepage. For simplicity this „rec_std_system_sync“ example assumes that at least one "system Star-Hub master" and one "system Star-Hub slave" are both installed in the same PC system, to gain easy software access to both devices without the need for inter-system software communication.
  • Page 150: Option Digital Inputs

    Converting ADC samples to voltage values The Spectrum driver also contains a register that holds the value of the decimal value of the full scale representation of the installed ADC. This value should be used when converting ADC values (in LSB) into real-world voltage values, because this register also automatically takes any specialities into account, such as slightly reduced ADC resolution with reserved codes for gain/offset compensation.
  • Page 151 Electrical specifications The electrical specifications of the digital inputs option can be found either in the technical data section of this manual or in the datasheet. (c) Spectrum GmbH...
  • Page 152: Option Digital Differential Inputs

    Introduction Option Digital Differential Inputs Option Digital Differential Inputs Introduction The special option „Digital Differential Inputs“ allows the use of two adjacent single ended channels in a true differential mode. Both channels are sampled parallelly single-ended with their dedicated ADCs and afterwards the subtraction is made in the digital domain. The inputs are still related to GND and may not have a common voltage level exceeding the respective single-ended input range.
  • Page 153: Converting Adc Samples To Voltage Values

    Converting ADC samples to voltage values The Spectrum driver also contains a register that holds the value of the decimal value of the full scale representation of the installed ADC. This value should be used when converting ADC values (in LSB) into real-world voltage values, because this register also automatically takes any specialities into account, such as slightly reduced ADC resolution with reserved codes for gain/offset compensation.
  • Page 154 Card Setup Option Digital Differential Inputs The maxixmum sampling speed of the card still only depends on the activated channel enable mask. There- fore the maximum allowed sampling speed remains the same as with or without installed digital differential feature. For details clock generation and limits please see the relating passage in this manual. Example The following example show the necessary driver calls to enable the digital differential modes for card with two installed differential channels: spcm_dwSetParam_i32 (hDrv, SPC_CHENABLE, CHANNEL0 | CHANNEL2);...
  • Page 155: Option Remote Server

    The digitizerNETBOX/generatorNETBOX responds to the VISA described Discovery function. The next chapter will show how to install and use the Spectrum control center to execute the discovery function and to find the Spectrum hardware. As the discovery function is a standard...
  • Page 156: Finding The Digitizernetbox/Generatornetbox In The Network

    // second: check from which manufacturer the devices are spcm_dwSendIDNRequest ((char**)pszIdn, dwMaxNumRemoteCards, dwMaxIdnStringLen); // Use the VISA strings of these devices with Spectrum as manufacturer // for accessing remote devices without previous knowledge of their IP address Finding the digitizerNETBOX/generatorNETBOX in the network As the digitizerNETBOX/generatorNETBOX is a standard network device it has its own IP address and host name and can be found in the computer network.
  • Page 157: Accessing Remote Cards

    Accessing remote cards Accessing remote cards To detect remote card(s) from the client PC, start the Spectrum Control Center on the client and click "Netbox Discovery". All discovered cards will be listed under the "Remote" node. Using remote cards instead of using local ones is as easy as using a digitizerNETBOX and only requires a few lines of code to be changed compared to using local cards.
  • Page 158: Appendix

    Error Codes Appendix Appendix Error Codes The following error codes could occur when a driver function has been called. Please check carefully the allowed setup for the register and change the settings to run the program. error name value (hex) value (dec.) error description ERR_OK...
  • Page 159: Spectrum Knowledge Base

    207h The card that has been found in the system seems to be a valid Spectrum card of a type that is supported by the driver but the driver did not find this special type internally. Please get the latest driver from www.spectrum-instrumentation.com and install this one.
  • Page 160: Continuous Memory For Increased Data Transfer Rate

    Continuous memory for increased data transfer rate Continuous memory for increased data transfer rate The continuous memory buffer has been added to the driver version 1.36. The continuous buffer is not avail- able in older driver versions. Please update to the latest driver if you wish to use this function. Background All modern operating systems use a very complex memory management strategy that strictly separates between physical memory, kernel mem- ory and user memory.
  • Page 161: Setup On Linux Systems

    8 MByte. On most systems it will even be only 4 MBytes. Setup on Windows systems The continuous buffer settings is done with the Spectrum Control Center us- ing a setup located on the „Support“ page. Please fill in the desired con- tinuous buffer settings as MByte.
  • Page 162: Usage Of The Buffer

    Continuous memory for increased data transfer rate Usage of the buffer The usage of the continuous memory is very simple. It is just necessary to read the start address of the continuous memory from the driver and use this address instead of a self allocated user buffer for data transfer. Function spcm_dwGetContBuf This function reads out the internal continuous memory buffer (in bytes) if one has been allocated.
  • Page 163: Pin Assignment Of The Multipin Connector

    Pin assignment of the multipin connector The 40 lead multipin connector is the main connector for all of Spectrum’s digital boards and is additionally used for different options, like e.g. the additional digital inputs (on analog acquisition boards only) or additional digital outputs (on analog generation boards only).
  • Page 164: Pin Assignment Of The Multipin Cable

    Pin assignment of the multipin cable Pin assignment of the multipin cable The 40 lead multipin cable is used for the additional digital inputs (on analog acquisition boards only) or additional digital outputs (on analog generation boards only) as well as for the digital I/O or pat- tern generator boards.
  • Page 165: Details On M2I Cards Clock And Trigger I/O Section

    Details on M2i cards clock and trigger I/O section Details on M2i cards clock and trigger I/O section The SMB clock and trigger I/O connectors of the M2i cards from Spectrum are protected against over voltage conditions. For this purpose clamping diodes of the types 1N4148 are used.

Table of Contents