Spectrum digitizerNETBOX DN2.44 Series Hardware Manual

Spectrum digitizerNETBOX DN2.44 Series Hardware Manual

Ethernet/lxi remote high speed digitizer with 14/16 bit resolution
Table of Contents

Advertisement

Quick Links

digitizerNETBOX
DN2.44x-xx
DN6.44x-xx
Ethernet/LXI remote high speed digitizer
with 14/16 bit resolution
Hardware Manual
Software Driver Manual
English version
September 11, 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
Need help?

Need help?

Do you have a question about the digitizerNETBOX DN2.44 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Spectrum digitizerNETBOX DN2.44 Series

  • Page 1 Ethernet/LXI remote high speed digitizer with 14/16 bit resolution Hardware Manual Software Driver Manual English version September 11, 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 for DN6 products ............................ 13 19“ Rack Mount Kit ..............................13 AC Cable Options ................................14 The Spectrum type plate ..............................15 Hardware information................................. 16 Block diagram of digitizerNETBOX DN2.44x and DN6.44x: .................... 16 Block diagram of a single internal digitizer module:......................16 DN2 / DN6 Technical Data ............................
  • Page 4 Software ......................... 36 Software Overview................................36 Card Control Center ................................36 Discovery of Remote Cards and digitizerNETBOX/generatorNETBOX products..............37 Wake On LAN of digitizerNETBOX/generatorNETBOX ....................37 Netbox Monitor ................................38 Hardware information..............................38 Firmware information ..............................39 Software License information............................39 Driver information.................................
  • Page 5 IVI Driver......................... 64 About IVI................................... 64 General Concept of the Spectrum IVI driver ........................... 64 Supported Spectrum Hardware ............................65 Supported data acquisition card families: ........................65 Supported digitizerNETBOX families ..........................65 Supported generatorNETBOX families..........................65 IVI Compliance .................................. 65 Supported Operating Systems ............................
  • Page 6 Acquisition modes ......................85 Overview ..................................85 Setup of the mode ................................ 85 Commands ..................................86 Card Status.................................. 87 Acquisition cards status overview ........................... 87 Generation card status overview ............................ 87 Data Transfer ................................87 Standard Single acquisition mode ............................90 Card mode ..................................
  • Page 7 Mode Gated Sampling ....................129 Acquisition modes ................................129 Standard Mode................................129 FIFO Mode ................................129 Limits of pre trigger, post trigger, memory size ........................130 Gated Sampling and Timestamps ..........................130 Trigger.................................... 131 Detailed description of the external analog trigger modes ....................131 Channel triggers modes ..............................
  • Page 8 Examples................................... 181 Autostart..................................181 LEDs..................................182 Appendix ........................183 Error Codes ..................................183 Spectrum Knowledge Base ............................184 Temperature sensors ................................. 185 Temperature read-out registers ............................. 185 Temperature hints ............................... 185 44xx temperatures and limits ............................185 Details on M4i/M4x cards I/O lines ..........................186 Multi Purpose I/O Lines...............................
  • Page 9: Introduction

    For any new information on the board as well as new available options or memory upgrades please contact our website www.spectrum-instrumentation.com. You will also find the current driver package with the latest bug fixes and new features on our site.
  • Page 10: Internal Digitizer Modules

    Internal Digitizer Modules Introduction Internal Digitizer Modules The digitizerNETBOX products internally consist of either digitizer modules that are accessed and programmed in a similiar way as the Spec- trum digitizer cards themselves. Accessing the digitizerNETBOX by software therefore is nearly identical to accessing the same plug-in cards. Throughout the manual all programming and software usage will be described for the internal digitizer mod- ules.
  • Page 11: Overview Of Digitizer Modules Inside The Dn2-44X And Dn6-44X Digitizernetbox

    As an example: a DN2.441-08would be recognized and programmed inside the software as 2 cards of M4i.4411-x8 and 1 Star-Hub. The auxilary signals (such as clock, trigger, etc.) are connected to one card only, which is the one carrying the Internal Star-Hub. That device must be addressed for any external clock, trigger, etc. related setup. (c) Spectrum GmbH...
  • Page 12: Different Models Of The Dn2.44X Series

    Different models of the DN2.44x series Introduction Different models of the DN2.44x series The following overview shows the different available models of the DN2.44x series. They differ in the number of internally mounted digitizer modules and the number of available channels. •...
  • Page 13: Different Models Of The Dn6.44X Series

    The rack mount kit allows to mount the digitizerNETBOX/generatorNETBOX into a standard 19“ rack. The device then recquires three height units of the 19“ rack. Multiple digitizerNETBOX/generatorNETBOX products can be mount- ed one on top of the other. (c) Spectrum GmbH...
  • Page 14: Ac Cable Options

    AC Cable Options Introduction AC Cable Options As a standard a Central European power cable Cab-Pwr-001 is included in the delivery. Other power cables can be ordered separately to connect your products with your local power connection system. The following power cable options are available: 001: Central Europe The standard cable for central Europe is already included in all deliveries of system and box products like digitizerNET- BOX.
  • Page 15: The Spectrum Type Plate

    The Spectrum type plate The Spectrum type plate, which consists of the following components, can be found on the back of all netbox products. 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:...
  • Page 16: Hardware Information

    Hardware information Introduction Hardware information Block diagram of digitizerNETBOX DN2.44x and DN6.44x: • The number of maximum channels and internal digitizer modules and existance of a synchronization Star-Hub is model dependent. • The internal module to which the auxilary I/O lines are connected is model dependent. Consult „Internal Digitizer modules“ chapter. Block diagram of a single internal digitizer module: digitizerNETBOX DN2.44x Manual / DN6.44x Manual...
  • Page 17: Dn2 / Dn6 Technical Data

    ±10 V in steps of 1 mV ±10 V in steps of 1 mV External trigger maximum voltage ±30V ±30 V Ω External trigger bandwidth DC DC to 200 MHz n.a. Ω DC to 150 MHz DC to 200 MHz (c) Spectrum GmbH...
  • Page 18 Hardware information Introduction Trigger edge software programmable Rising edge, falling edge or both edges Ω External trigger bandwidth AC 20 kHz to 200 MHz n.a. ≥ 2 samples ≥ 2 samples Minimum external trigger pulse width Frequency Response M4i.445x, M4x.445x, DN2.445-xx and DN6.445-xx Sampling Rate 500 MS/s Ω...
  • Page 19 Maximum Waveform Length FIFO Acquisition 2 GSamples Data Output Format fixed 32 bytes statistics summary Statistics Information Set per Waveform Average, Minimum, Maximum, Position Minimum, Position Maximum, Trigger Timestamp Re-Arming Time between Segments 40 samples (+ programmed pretrigger) (c) Spectrum GmbH...
  • Page 20 Internal 128 GByte SSD Development access Remote Linux command shell (ssh), no graphical interface (GUI) available Accessible Hardware Full access to Spectrum instruments, LAN, front panel LEDs, RAM, SSD Integrated operating system OpenSuse 12.2 with kernel 3.4.6. Ethernet specific details...
  • Page 21: Rms Noise Level (Zero Noise), Typical Figures

    PC. SNR = Signal to Noise Ratio, THD = Total Harmonic Distortion, SFDR = Spurious Free Dynamic Range, SINAD = Signal Noise and Dis- tortion, ENOB = Effective Number of Bits. (c) Spectrum GmbH...
  • Page 22: Noise Floor Plots (Open Inputs)

    Hardware information Introduction Noise Floor Plots (open inputs) M4i.445x, M4x.445x, M4i.442x, M4x.442x, M4i.441x, M4x.441x, DN2.445-xx, DN6.445-xx DN2.442-xx and DN6.442-xx DN2.441-xx and DN6.441-xx Sampling Rate 500 MS/s Sampling Rate 250 MS/s Sampling Rate 130 MS/s Buffered Path Ω , AC ±1 V range HF Path Ω...
  • Page 23: Dn2 Specific Technical Data

    Warm up time 10 minutes Operating temperature 0°C to 40°C Storage temperature -10°C to 70°C Humidity 10% to 90% Power Consumption 230 VAC 12 channel versions 16 channel versions 20 channel versions 24 channel versions MTBF MTBF TBD hours (c) Spectrum GmbH...
  • Page 24: Dn2 Order Information

    DN2 Order Information Introduction DN2 Order Information The digitizerNETBOX is equipped with a large internal memory for data storage and supports standard acquisition (Scope), FIFO acquisition (streaming), Multiple Recording, Gated Sampling, ABA mode and Timestamps. Operating system drivers for Windows/Linux 32 bit and 64 bit, drivers and examples for C/C++, IVI (Scope and Digitizer class), LabVIEW (Windows), MATLAB (Windows and Linux), LabWin- dows/CVI, .NET, Delphi, Visual Basic, Java, Python and a Professional license of the oscilloscope software SBench 6 are included.
  • Page 25: Dn6 Order Information

    The low loss adapter cables are based on MF141 cables and have an attenuation of 0.3 dB/m at 500 MHz and 0.5 dB/m at 1.5 GHz. They are recommended for signal frequencies of 200 MHz and above. Order no. Option CHF-3mA-3mA-200 Low loss cables SMA male to SMA male 200 cm CHF-3mA-9m-200 Low loss cables SMA male to BNC male 200 cm (c) Spectrum GmbH...
  • Page 26: Hardware Installation

    There are no components inside the chassis that need any operating by the user. In contrary there are a lot of components that may be harmed when operated unproperly by a use. As Spectrum only gives a warranty on the complete instrument, opening the chassis will make you loose the warranty.
  • Page 27: Installing 19" Rack Mount Option For Dn2

    This support is required for DN6 devices due to their higher weight compared to DN2 devices. (c) Spectrum GmbH...
  • Page 28: Setup Of Digitizernetbox/Generatornetbox

    Setup of digitizerNETBOX/generatorNETBOX Hardware Installation Setup of digitizerNETBOX/generatorNETBOX Connections First of all the digitizerNETBOX/generatorNETBOX needs to be connected to both power line and LAN environment: Power Connect the power line cable to a matching power source. First connect the cable to the digitizerNETBOX/generatorNETBOX, second con- nect the cable to the power plug.
  • Page 29: Front Panel Dn6

    Multi Purpose X2 with programmable direction. The connection is referenced in the manual as X2 Ethernet Default Settings The digitizerNETBOX/generatorNETBOX is started with the following Ethernet configuration: Setting Default Setup DHCP enabled Auto IP enabled Host Name Default hostname as netbox type + serial number Example: DN2_465-08_sn8085 (c) Spectrum GmbH...
  • Page 30: Detecting The Digitizernetbox

    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 31: Troubleshooting

    • Check your local firewall whether it allows access to the device and whether it allows to access the ports listed in the technical data sec- tion. • Check with your network administrator whether the subnet, the device and the ports that are listed in the technical data section are acces- sible from your system due to company security settings. (c) Spectrum GmbH...
  • Page 32: Software Driver Installation

    PC there need to be some software packages to be installed there: Spectrum driver API The Spectrum API is installed automatically under Windows when installing the Card Control Center. Under Linux it is necessary to install the matching driver API for your Linux client system before installing the Card Control Center.
  • Page 33: 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 34: Standard Driver Update

    Linux Software Driver Installation Get first driver info After the driver has been loaded successfully some information about the installed boards can be found in the /proc/spcm_cards file. Some basic information from the on-board EEProm is listed for every card. cat /proc/spcm_cards Stop the driver You may want to unload the driver and clean up all device nodes.
  • Page 35: 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 36: 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 37: 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 38: 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 39: Firmware Information

    Card Control Center 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.
  • Page 40: 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 41: 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. (c) Spectrum GmbH...
  • Page 42: 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 43: C/C++ Driver Interface

    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 44: Microsoft Visual C++ 2005 And Newer 64 Bit

    C/C++ Driver Interface Software type to obtain maximum performance. Please be informed that the examples are made for easy understanding and simple showing of one aspect of programming. Most of the examples are not optimized for maximum throughput or repetition rates. Microsoft Visual C++ 2005 and newer 64 Bit Depending on your version of the Visual Studio suite it may be necessary to install some additional 64 bit components (SDK) on your system.
  • Page 45: Other Windows C/C++ Compilers 64 Bit

    = (SPCM_VCLOSE*) GetProcAddress (hDLL, "spcm_vClose"); 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.
  • Page 46 Driver functions Software Under Linux the device name in the function call needs to be a valid device name. Please change the string according to the location of the device if you don’t use the standard Linux device names. The driver is installed as default under /dev/spcm0, /dev/spcm1 and so on. The kernel driver numbers the devices starting with 0.
  • Page 47 This function reads out the internal continuous memory buffer in bytes, in case one has been allocated. If no buffer has been allocated the function returns a size of zero and a NULL pointer. You may use this buffer for data transfers. As the buffer is continuously allocated in memory (c) Spectrum GmbH...
  • Page 48 Driver functions Software the data transfer will speed up by up to 15% - 25%, depending on your specific kind of card. Please see further details in the appendix of this manual. uint32 _stdcall spcm_dwGetContBuf_i64 ( // Return value is an error code drv_handle hDevice, // handle to an already opened device...
  • Page 49 (can be zero if not of interest) char pszErrorTextBuffer[ERRORTEXTLEN]); // text buffer for text error Example: char szErrorBuf[ERRORTEXTLEN]; if (spcm_dwSetParam_i32 (hDrv, SPC_MEMSIZE, -1)) spcm_dwGetErrorInfo_i32 (hDrv, NULL, NULL, szErrorBuf); printf (“Set of memsize failed with error message: %s\n”, szErrorBuf); (c) Spectrum GmbH...
  • Page 50: Delphi (Pascal) Programming Interface

    Delphi (Pascal) Programming Interface Software Delphi (Pascal) Programming Interface Driver interface The driver interface is located in the sub-directory d_header and contains the following files. The files need to be included in the delphi project and have to be put into the „uses“ section of the source files that will access the driver. Please do not edit any of these files as they’re regularly updated if new functions or registers have been included.
  • Page 51: 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 52: Visual Basic Programming Interface And Examples

    Visual Basic Programming Interface and Examples Software Visual Basic Programming Interface and Examples Driver interface The driver interface is located in the sub-directory b_header and contains the following files. The files need to be included in the basic project. Please do not edit any of these files as they’re regularly updated if new functions or registers have been included. file spcm_win32_decl.bas The file contains the interface to the driver library and defines some needed constants.
  • Page 53: 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 54: 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 55: Using Managed C++/Cli

    System.out.println("Error: Could not open card\n"); else // ----- get card type ----- dwErrorCode = Drv.spcm_dwGetParam_i32(hDevice, Regs.SPC_PCITYP, lCardType); dwErrorCode = Drv.spcm_dwGetParam_i32(hDevice, Regs.SPC_PCISERIALNR, lSerialNumber); Example for digitizerNETBOX/generatorNETBOX and remotely installed cards: ' ----- open remote card ----- hDevice = Drv.spcm_hOpen("TCPIP::192.168.169.14::INST0::INSTR") (c) Spectrum GmbH...
  • Page 56: Python Programming Interface And Examples

    Python Programming Interface and Examples Software Python Programming Interface and Examples Driver interface The driver interface contains the following files. The files need to be included in the python project. Please do not edit any of these files as they are regularily updated if new functions or registers have been included. To use pyspcm you need either python 2 (2.4, 2.6 or 2.7) or python 3 (3.x) and ctype, which is included in python 2.6 and newer and needs to be installed separately for Python 2.4.
  • Page 57: Examples

    Please feel free to use these examples as a base for your programs and to modify them in any kind. When allocating the buffer for DMA transfers, use the following function to get a mutable character buffer: ctypes.create_string_buffer(init_or_size[, size]) (c) Spectrum GmbH...
  • Page 58: Java Programming Interface And Examples

    Java Programming Interface and Examples Software Java Programming Interface and Examples Driver interface The driver interface contains the following Java files (classes). The files need to be included in your Java project. Please do not edit any of these files as they are regularily updated if new functions or registers have been included. The driver interface uses the Java Native Access (JNA) library.
  • Page 59: 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 60: Integrated Webserver

    • Directly by typing the IP address into the URL field of a Web Browser. • By selecting it from the Spectrum Control Center via the context menu on the remote device node (as shown on the screen shot on the right).
  • Page 61: Status

    Documentation All related documents for the device that may be needed to operate the digitizerNETBOX/generatorNETBOX or to pro- gram it are available by download as pdf documents from here. (c) Spectrum GmbH...
  • Page 62: Firmware Update

    These debug log settings are similar to the ones described in the chapter about the Spectrum control center. Using this logging the internal communication between the remote server and the locally installed Spectrum driver is logged.
  • Page 63: Access

    As soon as a password has been entered in the security set- tings a login/logout command is available from the webpage menu. After entering the password once the login stays valid until a logout or until closing the web browser. (c) Spectrum GmbH...
  • Page 64: Ivi Driver

    General Concept of the Spectrum IVI driver The Spectrum IVI driver is based on the standard Spectrum API and can be used with any Spectrum products specified below in the supported hardware chapter. The Spectrum products to be accessed with the IVI driver can be locally installed data acquisition cards, remotely installed data acquisition cards or remote LXI instruments like a digitizerNETBOX or generatorNETBOX.
  • Page 65: Supported Spectrum Hardware

    IVI Driver Supported Spectrum Hardware Supported Spectrum Hardware All Spectrum analog data acquisition hardware based on the SPCM driver structure is supported by the IVI driver. There is only one IVI driver for all hardware. Supported data acquisition card families: •...
  • Page 66: Supported Standard Driver Features

    IVI Compliance IVI Driver Supported Standard Driver Features Feature Supported Description of the Feature State caching To minimize the number of I/O calls needed to configure an instrument to a new state, IVI specific drivers standard feature of the API may implement state caching.
  • Page 67: Ivifgen Supported Class Capabilities

    Installer The Spectrum IVI Driver Installer is shipped as an executable containing all IVI related software parts. There is only one installer for both 32 bit and 64 bit environments. The insaller automatically detects the components that are necessary to install.
  • Page 68: Installation Of The Ivi Driver Package

    • Start the remote system and let Windows install the hardware driver from CD or from your download folder • Install the Spectrum Remote Package onto the remote PC as described in the manual • Install the Spectrum Control Center on the host system •...
  • Page 69: Configuration Store

    The IVI Configuration Server also provides a way for the client to supply aliases for the physical identifiers recognized by the drivers. The Spectrum IVI driver for example uses the channel index as repeated capability allowing to give channel names as an identifier. (c) Spectrum GmbH...
  • Page 70: Programming The Board

    Overview Programming the Board Programming the Board Overview The following chapters show you in detail how to program the different aspects of the board. For every topic there’s a small example. For the examples we focused on Visual C++. However as shown in the last chapter the differences in programming the board under different programming languages are marginal.
  • Page 71: Initialization

    As a benefit from this error locking it is not necessary to check the error return of each function call but just checking the error function once at the end of all calls to see where an error occurred. The enhanced error function returns a complete error description that will lead to the call that produces the error. (c) Spectrum GmbH...
  • Page 72: Gathering Information From The Card

    Gathering information from the card Programming the Board Example for error checking at end using the error text from the driver: char szErrorText[ERRORTEXTLEN]; spcm_dwSetParam_i64 (hDrv, SPC_SAMPLERATE, 1000000); // correct command spcm_dwSetParam_i32 (hDrv, SPC_MEMSIZE, -345); // faulty command spcm_dwSetParam_i32 (hDrv, SPC_POSTTRIGGER, 1024); // correct command if (spcm_dwGetErrorInfo_i32 (hDrv, NULL, NULL, szErrorText) != ERR_OK) // check for an error...
  • Page 73: Hardware And Pcb Version

    Hardware and PCB version Since all of the boards from Spectrum are modular boards, they consist of one base board and one piggy-back front-end module and even- tually 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 74: Serial Number

    Gathering information from the card Programming the Board Serial number This register holds the information about the serial number of the board. This number is unique and should always be sent together with a support question. Normally you use this information together with the register SPC_PCITYP to verify that multiple measurements are done with the exact same board.
  • Page 75: Miscellaneous Card Information

    The card is physically mounted within a digitizerNETBOX or generatorNETBOX. 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 76: 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 77: Gathering Information From The Digitizernetbox/Generatornetbox

    By writing 1 to this register, one can start the autoamtic flashing of the LAN Id to detect a particulat digitizerNETBOX/generatorNETBOX that is installed in a Rack of multiple digitizerNETBOX or generatorNETBOX devices. Writing a 0 to this register will stop the flashing again. (c) Spectrum GmbH...
  • Page 78: 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 79: Important Note On Channels Selection

    As there are also modified versions available with different input ranges it is recommended to read out the currently available input ranges as shown later in this chapter. (c) Spectrum GmbH...
  • Page 80 Setting up the inputs Analog Inputs Please note that the available ranges need to be read out separately for each input path. Please set the register SPC_READAIPATH as shown above to select the input path for which the settings should be read. The available Input rages are read out using the following registers. Register Value Direction...
  • Page 81: 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 82: Read Out Of Input Features

    Please note that the input features are read out for the currently selected read AI path done by register SPC_READAIPATH. Please also 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 83: Input Coupling

    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...
  • Page 84 Setting up the inputs Analog Inputs that can be saved within the on-board EEPROM. The default settings of the offset and gain values are then read-only and cannot be written to the EEPROM by the user. If the card has no user settings the default settings may be overwritten. You can easily either save adjustment settings to the EEPROM with SPC_ADJ_SAVE or recall them with SPC_ADJ_LOAD.
  • Page 85: Acquisition Modes

    Enables Boxcar Averaging for FIFO acquisition. Requires digitizer module firmware version V29 or newer. DN2/DN6.44x digitizer only SPC_REC_FIFO_SINGLE_MONITOR 2000000h digitizer only Combination of SPC_REC_FIFO_SINGLE mode with additional slower sampling clock data stream for moni- toring purposes (same as A-data of SPC_REC_FIFO_ABA mode). (c) Spectrum GmbH...
  • Page 86: 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 87: Card Status

    • Each defined buffer is only used once. After transfer has ended the buffer is automatically invalidated. • If a buffer has to be deleted although the data transfer is in progress or the buffer has at least been defined it is necessary to call the spcm_dwInvalidateBuf function. (c) Spectrum GmbH...
  • Page 88 Commands Acquisition modes Definition of the transfer buffer Before any data transfer can start it is necessary to define the transfer buffer with all its details. The definition of the buffer is done with the spcm_dwDefTransfer function as explained in an earlier chapter. uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transfer buffer by using 64 bit unsigned integer values drv_handle hDevice,...
  • Page 89 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 90: 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 91: 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 92: 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 93: Buffer Handling

    • As you see in the above picture data is directly transferred between application data buffer and on-board memory. Therefore it is abso- lutely critical to delete the application data buffer without stopping any DMA transfers that are running actually. It is also absolutely criti- (c) Spectrum GmbH...
  • Page 94 Buffer handling Acquisition modes cal to define the application data buffer with an unmatching length as DMA can than try to access memory outside the application data 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.
  • Page 95 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 96: Data Organization

    Data organization Acquisition modes Data organization Data is organized in a multiplexed way in the transfer buffer. If using 2 channels data of first activated channel comes first, then data of second channel. Activated Channels Samples ordering in buffer memory starting with data offset zero 1 channel 1 channel 1 channel...
  • Page 97: 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 98: Clock Generation

    This optional second Quartz 2 is for special customer needs, either for a special direct sampling clock or as a very precise reference for the PLL. Please feel free to contact Spectrum for your special needs. The Quarz 2 clock footprint can be equipped with a wide variety of clock sources that are available on the market.
  • Page 99: Details On The Different Clock Modes

    „new“ input range is smaller than the specified one. That is why this continuous clock mode is not the default, because the full scale range of the ADC itself unfortunately varies over clock fre- quency quite widely ...something in the range of 20..30 %. (c) Spectrum GmbH...
  • Page 100 Details on the different clock modes Clock generation This behavior does not differ between internal sampling clock and external reference clock. In every case the sample clock that is applied to the ADC chip is generated by a PLL from a known reference, either internally or externally fed into the card. To offer best performance to each individual user there are two different modes of clock setup, each with its own advantages: •...
  • Page 101: Using Quartz2 With Pll (Optional, M4I Cards Only)

    In some cases it is necessary to use a special high precision frequency for sampling rate generation. For these applications all cards of the M3i/M4i series can be equipped with a special customer quartz. Please contact Spectrum for details on available oscillators. If your card is...
  • Page 102: Pxi Reference Clock (M4X Cards Only)

    The 100 MHz PXIe system reference clock can be used as a reference clock for internal sample rate generation on all M4x PXIe cards from Spectrum. With the above mentioned software command the PXIe reference clock is routed to the internal PLL. Afterwards you only have to program the sample rate register to the desired sampling rate.
  • Page 103: Trigger Modes And Appendant Registers

    Trigger modes and appendant registers General Description The trigger modes of the Spectrum M4i/M4x series A/D and D/A cards are very extensive and give you the possibility to detect nearly any trigger event you can think of. You can choose between more than 10 external trigger modes and up to 20 internal trigger modes (on analog acquisition cards) including software and channel trigger, depending on your type of board.
  • Page 104: Trigger Masks

    Trigger masks Trigger modes and appendant registers Trigger masks Trigger OR mask The purpose of this passage is to explain the trigger OR mask (see left figure) and all the appendant software registers in detail. The OR mask shown in the overview before as one object, is separat- ed into two parts: a general OR mask for main external trigger (ex- ternal analog window trigger), the secondary external trigger (external analog comparator trigger, the various PXI triggers (avail-...
  • Page 105: Trigger And Mask

    SPC_TRIG_CH_ANDMASK0 register in combination with constants for every possible channel trigger source. In either case the sources are coded as a bitfield, so that they can be combined by one access to the driver with the help of a bitwise OR. (c) Spectrum GmbH...
  • Page 106: Software Trigger

    // Setting up ch0 trigger for HIGH levels 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 107: Force- And Enable Trigger

    (hDrv, SPC_M2CMD, M2CMD_CARD_DISABLETRIGGER); // Trigger engine is disarmed. Trigger delay All of the Spectrum M4i/M4x 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 108: Main External Window Trigger (Ext0)

    Main external window trigger (Ext0) Trigger modes and appendant registers The example shows, how to use the trigger delay command: spcm_dwSetParam_i32 (hDrv, SPC_TRIG_DELAY, 2000); // A detected trigger event will be // delayed for 2000 sample clocks. Using the delay trigger does not affect the ratio between pre trigger and post trigger recorded number of samples, but only shifts the trigger event itself.
  • Page 109: Trigger Input Coupling

    Trigger level 0 for external trigger Ext0 -10000 mV to +10000 mV SPC_TRIG_EXT0_LEVEL1 42330 read/write Trigger level 1 for external trigger Ext0 -10000 mV to +10000 mV SPC_TRIG_EXT1_LEVEL0 42321 read/write Trigger level 0 for external trigger Ext1 -10000 mV to +10000 mV (c) Spectrum GmbH...
  • Page 110: Detailed Description Of The External Analog Trigger Modes

    Secondary external level trigger (Ext1) Trigger modes and appendant registers Detailed description of the external analog trigger modes For all external analog trigger modes shown below, either the OR mask or the AND must contain the external trigger to activate the external input as trigger source:.
  • Page 111 Register Value Direction set to Value SPC_TRIG_EXT0_MODE 40510 read/write SPC_TM_NEG | SPC_TM_REARM 01000002h SPC_TRIG_EXT0_LEVEL0 42320 read/write Defines the re-arm level in mV SPC_TRIG_EXT0_LEVEL1 42330 read/write Set it to the desired trigger level in mV (c) Spectrum GmbH...
  • Page 112 Secondary external level trigger (Ext1) Trigger modes and appendant registers Window trigger for entering signals The trigger input is continuously sampled with the selected sample rate. The upper and the lower level define a win- dow. Every time the signal enters the window from the out- side, a trigger event will be detected.
  • Page 113 Register Value Direction set to Value SPC_TRIG_EXT0_MODE 40510 read/write SPC_TM_OUTSIDEWIN 00000100h SPC_TRIG_EXT0_LEVEL0 42320 read/write Set it to the upper trigger level in mV SPC_TRIG_EXT0_LEVEL1 42330 read/write Set it to the lower trigger level in mV (c) Spectrum GmbH...
  • Page 114: Channel Trigger

    Channel Trigger Trigger modes and appendant registers Channel Trigger Overview of the channel trigger registers The channel trigger modes are the most common modes, compared to external equipment like oscilloscopes. The huge variety of different channel trigger modes enables you to observe nearly any part of the analog signal.
  • Page 115: Channel Trigger Level

    (hDrv, SPC_TRIG_CH0_MODE, SPC_TM_POS); // Setting up channel trig (rising edge) spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH0_LEVEL0, 205); // Sets 14bit triggerlevel to 5.004 mV spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH_ORMASK0, SPC_TMASK0_CH0); // and enable it within the OR mask (c) Spectrum GmbH...
  • Page 116 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 117: Detailed Description Of The Channel Trigger Modes

    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_BOTH SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the desired trigger level relatively to the channel’s input range. board dependent (c) Spectrum GmbH...
  • Page 118 Channel Trigger Trigger modes and appendant registers Channel re-arm trigger on positive edge The analog input is continuously sampled with the selected sample rate. If the programmed re-arm level is crossed from lower to higher values, the trigger engine is armed and waiting for trigger.
  • Page 119 The trigger event will be detected if the analog signal is below the programmed trigger level. Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read/write SPC_TM_LOW 00000010h SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the upper trigger level relatively to the channel’s input range. board dependent (c) Spectrum GmbH...
  • Page 120 Channel Trigger Trigger modes and appendant registers In window trigger This trigger mode will generate an internal gate signal that can be very good used together with a second trigger mode to gate the trigger. If using this mode as a single trigger source the card will detect a trigger event at the time when entering the window defined by the two trigger levels (acting like window enter trigger) or if the signal is already inside the...
  • Page 121 SPC_TM_NEG | SPC_TM_REARM | SPC_TM_HYSTERESIS 21000002h SPC_TRIG_CH0_LEVEL0 42200 read/write Defines the trigger level relatively to the channel’s input range board dependant SPC_TRIG_CH0_LEVEL1 42300 read/write Defines the re-arm and hysteresis level relatively to the channel’s input board dependant range (c) Spectrum GmbH...
  • Page 122 Channel Trigger Trigger modes and appendant registers High level hysteresis trigger This trigger mode will generate an internal gate signal that can be very good used together with a second trigger mode to gate the trigger. The analog input is continuously sampled with the selected sample rate.
  • Page 123: Multi Purpose I/O Lines

    Generator Cards only: outputs a HIGH pulse as continuous marker signal for continuous replay mode. The marker sig- nal length is ½ of the programmed memory size. SPCM_XMODE_SYSCLKOUT 00004000h Connector reflects the internally generated system clock in the range of 2.5 up to 156.25 MHz. (c) Spectrum GmbH...
  • Page 124: Using Asynchronous I/O

    Multi Purpose I/O Lines Trigger modes and appendant registers Please note that a change to the SPCM_X0_MODE, SPCM_X1_MODE or SPCM_X2_MODE will only be updated with the next call to either the M2CMD_CARD_START or M2CMD_CARD_WRITESETUP register. For further de- tails please see the relating chapter on the M2CMD_CARD registers. Using asynchronous I/O To use asynchronous I/O on the multi purpose I/O lines it is first necessary to switch these lines to the desired asynchronous mode by pro- gramming the above explained mode registers.
  • Page 125: Mode Multiple Recording

    The number of segments to be recorded must be set separately with the register shown in the following table: Register Value Direction Description SPC_LOOPS 10020 read/write Defines the number of segments to be recorded Recording will be infinite until the user stops it. 1 … [4G - 1] Defines the total segments to be recorded. (c) Spectrum GmbH...
  • Page 126: Limits Of Pre Trigger, Post Trigger, Memory Size

    Limits of pre trigger, post trigger, memory size Mode Multiple Recording 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 127: Multiple Recording And Timestamps

    • Issue a number of Force Trigger commands to fill the complete memory (standard mode) or to transfer the last FIFO block that contains valid data segments • Use the trigger counter value to split the acquired data into valid data with a real trigger event and invalid data with a force trigger event. (c) Spectrum GmbH...
  • Page 128: Programming Examples

    Programming examples Mode Multiple Recording Programming examples The following example shows how to set up the card for Multiple Recording in standard mode. spcm_dwSetParam_i32 (hDrv, SPC_CARDMODE, SPC_REC_STD_MULTI); // Enables Standard Multiple Recording spcm_dwSetParam_i32 (hDrv, SPC_SEGMENTSIZE, 1024); // Set the segment size to 1024 samples spcm_dwSetParam_i32 (hDrv, SPC_POSTTRIGGER, 768);...
  • Page 129: 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 130: 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 131: Trigger

    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_EXT0_MODE 40510 read/write SPC_TM_NEG SPC_TRIG_EXT1_MODE 40511 read/write SPC_TM_NEG SPC_TRIG_EXT0_LEVEL0 42320 read/write Set it to the desired trigger level in mV (c) Spectrum GmbH...
  • Page 132 Trigger Mode Gated Sampling Re-arm trigger on positive edge The trigger input is continuously sampled with the selected sample rate. If the programmed re-arm level is crossed from lower to higher values, the trigger engine is armed and waiting for trigger. If the programmed trigger level is crossed by the trigger signal from lower values to higher values (rising edge) then the gate starts will be detected and the trigger engine will be disarmed.
  • Page 133 As this mode is level-triggered, the high level at the cards start time does trigger the board. Register Value Direction set to Value SPC_TRIG_EXT0_MODE 40510 read/write SPC_TM_LOW 00000010h SPC_TRIG_EXT1_MODE 40511 read/write SPC_TM_LOW 00000010h SPC_TRIG_EXT0_LEVEL0 42320 read/write Set it to the upper trigger level in mV (c) Spectrum GmbH...
  • Page 134 Trigger Mode Gated Sampling In window trigger The external input is continuously sampled with the selected sample rate. The upper and the lower level define a window. When the signal enters the window from the outside to the in- side, the gate will start. When the signal leaves the window from the inside to the out- side, the gate will stop.
  • Page 135: 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 dependent (c) Spectrum GmbH...
  • Page 136 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 137 00000080h SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the upper trigger level relatively to the channel’s input range. board dependent SPC_TRIG_CH0_LEVEL1 42300 read/write Set it to the lower trigger level relatively to the channel’s input range. board dependent (c) Spectrum GmbH...
  • Page 138 Trigger Mode Gated Sampling Channel window trigger for outer 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 139 SPC_TM_POS | SPC_TM_REARM | SPC_TM_HYSTERESIS 21000001h SPC_TRIG_CH0_LEVEL0 42200 read/write Set it to the desired trigger level relatively to the channel’s input range. board dependent SPC_TRIG_CH0_LEVEL1 42300 read/write Defines the re-arm and hysteresis level relatively to the channel’s input board dependent range (c) Spectrum GmbH...
  • Page 140: Programming Examples

    Programming examples Mode Gated Sampling Channel re-arm hysteresis trigger on negative edge The analog input is continuously sampled with the selected sample rate. If the programmed re-arm/hysteresis level is crossed from higher to lower values, the trigger engine is armed and waiting for trigger. If the programmed trigger level is crossed by the channel’s signal from higher values to lower values (falling edge) then the gate starts and the trigger engine will be disarmed.
  • Page 141: Mode Boxcar Average (High-Resolution)

    In contrast to the Block Average mode which requires a repetitive signal with a stable trigger condition, the Boxcar Average does not require a stable trigger signal and a repetitive signal, but also works on one-time only events. (c) Spectrum GmbH...
  • Page 142: Simplified Block Diagram

    Overview Mode Boxcar Average (High-Resolution) Simplified Block Diagram The following block diagram shows the general structure and data flows of the M4i/M4x based digitizer hardware. When running in the standard digitizer configuration the signal processing block simply consists of a bypass handing the input data to the memory controller with- out further calculations.
  • Page 143: Recording Modes

    2 Ch Standard Boxcar 512M 8k / N 512M - 16 512M - 16 FIFO Boxcar not used 4 Ch Standard Boxcar 256M 8k / N 256M - 16 256M - 16 FIFO Boxcar not used (c) Spectrum GmbH...
  • Page 144: Trigger Modes

    Trigger Modes Mode Boxcar Average (High-Resolution) Activated Used Loops Number ofAverages Channels Mode SPC_LOOPS SPC_AVERAGES Step Step 1 Ch Standard Boxcar not used FIFO Boxcar 0 (∞) 4G - 1 1 2 Ch Standard Boxcar not used FIFO Boxcar 0 (∞) 4G - 1 1 4 Ch Standard Boxcar...
  • Page 145: Programming Examples

    (hDrv, SPC_CARDMODE, SPC_REC_FIFO_BOXCAR); // Enables FIFO Boxcar Averaging spcm_dwSetParam_i32 (hDrv, SPC_BOX_AVERAGES,dwAverages); spcm_dwSetParam_i64 (hDrv, SPC_SEGMENTSIZE, qwSegmentSize); spcm_dwSetParam_i64 (hDrv, SPC_POSTTRIGGER, qwPosttrigger); spcm_dwSetParam_i64 (hDrv, SPC_MEMSIZE, qwSetMemsize); spcm_dwSetParam_i64 (hDrv, SPC_LOOPS qwNumberOfSegments); spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_SOFTWARE); // simply use software/auto trigger (c) Spectrum GmbH...
  • Page 146: Mode 8Bit Storage (Low-Resolution)

    Overview Mode 8bit Storage (Low-Resolution) Mode 8bit Storage (Low-Resolution) Overview Starting with firmware version V33, the cards and digitizerNETBOXes of the 44xx series allow to optionally reduce the resolution of the A/D samples from their native 14 bit or 16 bit down to 8bit resolution, such that each sample will only occupy one byte in memory instead of the standard two bytes required.
  • Page 147: Limits Of Pre Trigger, Post Trigger, Memory Size

    When converting samples that contain any additional data such as for example additional digital channels or overrange bits, this extra information must be first masked out and a proper sign-extension must be per- formed, before these values can be used as a signed two’s complement value for above formulas. (c) Spectrum GmbH...
  • Page 148: 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 149: Timestamp Modes

    In addition to the counter counting the samples a second separate counter is utilized. An additional external signal is used, which affects both counters and needs to be fed in externally. This external reference clock signal will reset the sample counter and also increase the second (c) Spectrum GmbH...
  • Page 150: Reading Out The Timestamps

    Reading out the timestamps Timestamps counter. The second counter holds the number of the clock edges that have occurred on the external reference clock signal and the sample counter holds the position within the current reference clock period with the resolution of the sampling rate. This mode can be used to obtain an absolute time reference when using an external radio clock or a GPS receiver.
  • Page 151: Data Transfer Using Dma

    Please note that extra data transfer is only possible from card to PC and there’s no programmable offset available for this transfer. (c) Spectrum GmbH...
  • Page 152 Reading out the timestamps Timestamps Buffer handling A data buffer handshake is implemented in the driver which allows to run the card in different data transfer modes. The software transfer buffer is handled as one large buffer for each kind of data (timestamp and ABA) which is on the one side controlled by the driver and filled automatically by busmaster DMA from the hardware extra FIFO buffer and on the other hand it is handled by the user who set’s parts of this software buffer available for the driver for further transfer.
  • Page 153: Data Transfer Using Polling

    The values the counter is counting and that are stored in the timestamp FIFO represent the moments the trigger event occurs internally. Com- pared to the real external trigger event, these values are delayed. This delay is fix and therefore can be ignored, as it will be identical for all recordings with the same setup. (c) Spectrum GmbH...
  • Page 154 Reading out the timestamps Timestamps Standard data format When internally mapping the timestamp from 128 bit to two 64 bit values, the unused upper 64 bits are filled up with zeros. Timestamp Mode byte byte byte byte byte byte byte byte byte byte...
  • Page 155: Combination Of Memory Segmentation Options With Timestamps

    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 156 Combination of Memory Segmentation Options with Timestamps Timestamps 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 157: Aba Mode (Dual Timebase)

    Memsize must be set to a a multiple of the segment size. The table below shows the register for enabling standard ABA mode. For detailed information on how to setup and start the standard acquisition mode please refer to the according chapter earlier in this manual. Register Value Direction Description SPC_CARDMODE 9500 read/write Defines the used operating mode (c) Spectrum GmbH...
  • Page 158: Fifo Mode

    Limits of pre trigger, post trigger, memory size ABA mode (dual timebase) SPC_REC_STD_ABA Data acquisition to on-board memory for multiple trigger events. While the multiple trigger events are stored with pro- grammed sampling rate the inputs are sampled continuously with a slower sampling speed. The total number of samples to be recorded to the on-board memory in standard mode is defined by the SPC_MEMSIZE register.
  • Page 159: Example For Setting Aba Mode

    DMA transfer similar to the DMA transfer of the main sample data DMA transfer. The card has three completely independent busmaster DMA engines in hardware allowing the simultaneous transfer of both „A“ and sample data, as well as optionally timestamp data. The sample data itself is read out as explained before using the standard DMA routine. (c) Spectrum GmbH...
  • Page 160: Data Transfer Using Dma

    Reading out ABA data ABA mode (dual timebase) As seen in the picture there are separate FIFOs holding ABA and timestamp data. Although an M4i is shown here, this applies to M4x and M2p cards as well. Each FIFO has its own DMA channel, the way data is handled by the DMA engine is similar for both kinds of extra FIFOs and is also very similar to the main sample data transfer engine.
  • Page 161 The extra FIFO has a quite small size compared to the main data buffer. As the transfer is done initiated by the hardware using busmaster DMA this is not critical as long as the application data buffers are large enough and as long as the extra transfer is started BEFORE starting the card. (c) Spectrum GmbH...
  • Page 162: Data Transfer Using Polling

    Reading out ABA data ABA mode (dual timebase) Data Transfer using Polling If the extra data is quite slow and the delay caused by the notify size on DMA transfers is unacceptable for your application it is possible to use the polling mode. Please be aware that the polling mode uses CPU processing power to get the data and that there might be an overrun if your CPU is otherwise busy.
  • Page 163: Aba Mode And Timestamps

    // additionally enable index of the first A area sample dwTimestampMode |= SPC_TSFEAT_STORE1STABA; spcm_dwSetParam_i32 (hDrv, SPC_TIMESTAMP_CMD, dwTimestampMode); The programming details of the ABA mode and timestamp modes are each explained in an dedicated chapter in this manual. (c) Spectrum GmbH...
  • Page 164: Option Star-Hub (M3I And M4I Only)

    Star-Hub introduction Option Star-Hub (M3i and M4i only) Option Star-Hub (M3i and M4i only) Star-Hub introduction The purpose of the Star-Hub is to extend the number of channels available for acquisition or generation by interconnecting multiple cards and running them simultaneously. The Star-Hub option allows to synchronize several cards of the same M3i/M4i series that are mounted within one host system (PC): •...
  • Page 165 (hSync, SPC_SYNC_READ_SYNCCOUNT, &lSyncCount); for (i = 0; i < lSyncCount; i++) spcm_dwGetParam_i32 (hSync, SPC_SYNC_READ_CARDIDX0 + i, &lCardIdx); printf ("star-hub logical index %d is connected with card %d\n“, i, lCardIdx); (c) Spectrum GmbH...
  • Page 166: Setup Of Synchronization

    Software Interface Option Star-Hub (M3i and M4i only) In case of 4 cards in one system and all are connected with the star-hub this program excerpt will return: star-hub logical index 0 is connected with card 0 star-hub logical index 1 is connected with card 1 star-hub logical index 2 is connected with card 2 star-hub logical index 3 is connected with card 3 Let’s see a more complex example with two Star-Hubs and one independent card in one system.
  • Page 167: Run The Synchronized Cards

    Using one of the wait commands for the Star-Hub will return as soon as the card holding the Star-Hub has reached this state. However when synchronizing cards with different memory sizes there may be other cards that still haven’t reached this level. (c) Spectrum GmbH...
  • Page 168: Sh-Direct: Using The Star-Hub Clock Directly Without Synchronization

    Software Interface Option Star-Hub (M3i and M4i only) SH-Direct: using the Star-Hub clock directly without synchronization Starting with driver version 1.26 build 1754 it is possible to use the clock from the Star-Hub just like an external clock and running one or more cards totally independent of the synchronized card.
  • Page 169: Mode Block Average (Firmware Option)

    In order to get any meaningful results out of the Block Average operation, a repetitive signal is required along with a stable trigger condition. (c) Spectrum GmbH...
  • Page 170: Simplified Block Diagram

    Recording modes Mode Block Average (Firmware Option) Simplified Block Diagram The following block diagram shows the general structure and data flows of the M4i/M4x based digitizer hardware. When running in the standard digitizer configuration the signal processing block simply consists of a bypass handing the input data to the memory controller with- out further calculations.
  • Page 171: Fifo Mode

    Defines the used operating mode SPC_REC_FIFO_AVERAGE 200000h Enables Block Averaging for FIFO acquisition with 32 bit wide result data. SPC_REC_FIFO_AVERAGE_16BIT 400000h Enables Block Averaging for FIFO acquisition with 16 bit wide result data. (8 bit ADC cards only) (c) Spectrum GmbH...
  • Page 172: Limits Of Pre Trigger, Post Trigger, Memory Size

    Limits of pre trigger, post trigger, memory size Mode Block Average (Firmware Option) The number of segments to be recorded must be set separately with the register shown in the following table: Register Value Direction Description SPC_LOOPS 10020 read/write Defines the number of segments to be recorded Recording will be infinite until the user stops it.
  • Page 173: Data Organization

    (hDrv, SPC_SEGMENTSIZE, qwSegmentSize); spcm_dwSetParam_i64 (hDrv, SPC_POSTTRIGGER, qwPosttrigger); spcm_dwSetParam_i64 (hDrv, SPC_MEMSIZE, qwSetMemsize); spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_POS); // Set triggermode to ext. TTL mode (rising edge) spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0); // and enable it within the trigger OR-mask (c) Spectrum GmbH...
  • Page 174 Programming examples Mode Block Average (Firmware Option) The following example shows how to set up the card for Block Average in FIFO mode. // define some parameters via variables uint64 qwNumberOfSegments = 256; // 256 averaged segments will be acquired uint64 qwSegmentSize = 2048;...
  • Page 175: Mode Block Statistics (Firmware Option)

    = [Timestamp(X)] - [Pretrigger] + [Position Minimum(X)] [MinPos(X+1) in Segment(X+1)] = [Timestamp(X+1)] - [Pretrigger] + [Position Minimum(X+1)] This enables to properly correlate the positions in time and therefore also calculate the time difference between positions: [Delta Minimum Position] = MinPos(x+1) - MinPos(X) (c) Spectrum GmbH...
  • Page 176: Simplified Block Diagram

    Recording modes Mode Block Statistics (Firmware Option) Simplified Block Diagram The following block diagram shows the general structure and data flows of the M4i/M4x based digitizer hardware. When running in the standard digitizer configuration the signal processing block simply consists of a bypass handing the input data to the memory controller with- out further calculations.
  • Page 177: Fifo Mode

    When using Segment Statistic all of the card’s trigger modes can be used including software trigger, for „automatic continuous“ acquisition. For detailed information on the available trigger modes, please take a look at the relating chapter earlier in this manual. (c) Spectrum GmbH...
  • Page 178: Information Set Format

    Information Set Format Mode Block Statistics (Firmware Option) Information Set Format To simplify the access to the processed data in the information set the following structured type has been defined: // --- define data structure for segment statistic mode typedef struct int64 llAvrg: 64;...
  • Page 179: Programming Examples

    // read out data of every segment (Min, Max, and Average only to keep things simple) for (uint64 qwSegment = 0; qwSegment < qwNumberOfSegments; qwSegment++) for (uint32 dwChannel = 0, (uint64) dwChannel < dwNoOfChannels; dwChannel++) printf("\nSegment %.2d: Min: %7.4d Max:%7.4d, Avrg; %f", qwSegment, ppstData[qwSegment].pst_Channel[dwChannel].nMin, ppstData[qwSegment].pst_Channel[dwChannel].nMax, ((double) (ppstData[dwSegment].pst_Channel[dwChannel].llAvrg) / (double) qwSegmentSize)); (c) Spectrum GmbH...
  • Page 180: Option Embedded Server

    Acessing the Embedded Server Option Embedded Server Option Embedded Server The option turns the digitizerNETBOX/generatorNETBOX in a powerful PC that allows to run own pro- grams on a small and remote data acquisition system. The digitizerNETBOX/generatorNETBOX is en- hanced by more memory, a powerful CPU, a freely accessable internal SSD and a remote software development access method.
  • Page 181: Editors

    -ihv mypackage.rpm Programming For general information on programming of the internal Spectrum cards please have a look through the complete manual. Programming the cards inside the Embedded Server is 100% similar to programming of the cards of any other host system.
  • Page 182: Leds

    Programming Option Embedded Server LEDs The digitizerNETBOX/generatorNETBOX LEDs can be accessed using the special system command „netbox_led_client“. Calling this system command from inside a C++ program is shown in the client-server example. The following commands will manipulate the Arm/Trig and Connected LEDs on the frontplate: system ("netbox_led_client armgreen=1");...
  • Page 183: Appendix

    The AND mask can only work with level trigger modes. ERR_ORMASKLEVEL 148h One channel is activated for trigger detection in the OR mask but has been programmed to a trigger mode using a level trigger. The OR mask can only work together with edge trigger modes. (c) Spectrum GmbH...
  • Page 184: 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 185: Temperature Sensors

    MODULE_1 not used n.a. n.a. As the ADC and the front-end do not have a high heat dissipation there is no cooling plate on the card and there are also no temperature sensors placed in the front-end. (c) Spectrum GmbH...
  • Page 186: Details On M4I/M4X Cards I/O Lines

    Multi Purpose I/O Lines The MMCX Multi Purpose I/O connec- tors (X0, X1 and X2) of the M4i/M4x cards from Spectrum are protected against over voltage conditions. For this purpose clamping diodes of the types CD1005 are used in conjunction with a series resistor.

This manual is also suitable for:

Digitizernetbox dn6.44 series

Table of Contents