Spectrum M2i.60xx Hardware Manual

Fast 14 bit arbitrary waveform generator, d/a converter board for pci-x, pci and pci express bus
Table of Contents

Advertisement

Quick Links

M2i.60xx
M2i.60xx-exp
fast 14 bit arbitrary waveform generator,
D/A converter board
for PCI-X, PCI and PCI Express bus
Hardware Manual
Software Driver Manual
English version
June 2, 2015
SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC 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: http://www.spectrum-instrumentation.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the M2i.60xx and is the answer not in the manual?

Questions and answers

Summary of Contents for Spectrum M2i.60xx

  • Page 1 PCI-X, PCI and PCI Express bus Hardware Manual Software Driver Manual English version June 2, 2015 SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC 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: http://www.spectrum-instrumentation.com...
  • Page 2 (c) SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC GMBH AHRENSFELDER WEG 13-17, 22927 GROSSHANSDORF, GERMANY SBench and digitizerNETBOX are registered trademarks of Spectrum Systementwicklung Microelectronic GmbH. Microsoft, Visual C++, Visual Basic, Windows, Windows 98, Windows NT, Window 2000, Windows XP, Windows Vista, Windows 7, Windows 8 and Windows 10 are trademarks/registered trademarks of Microsoft Corporation.
  • Page 3: Table Of Contents

    Introduction........................8 Preface ....................................8 Overview .................................... 8 General Information ................................8 Different models of the M2i.60xx series ..........................9 Additional options ................................11 Star-Hub ..................................11 System Star-Hub ................................11 BaseXIO (versatile digital I/O) ............................12 Digital outputs ................................12 The Spectrum type plate ..............................
  • Page 4 Software ......................... 36 Software Overview................................36 Card Control Center ................................36 Discovery of Remote Cards and digitizerNETBOXes......................37 Hardware information..............................38 Firmware information ..............................38 Driver information................................. 38 Installing and removing Demo cards ..........................39 Debug logging for support cases ............................ 39 Feature upgrade................................
  • Page 5 Analog Outputs ....................... 65 Channel Selection ................................65 Important note on channels selection ..........................66 Setting up the outputs................................66 Output Amplifiers ................................. 66 Output offset ................................67 Maximum Output Range..............................67 Output Filters ................................68 Differential Output ................................ 68 Double Out Mode ................................
  • Page 6 Mode Gated Replay....................... 102 Generation Modes ................................102 Standard Mode................................102 Examples of Standard Gated Replay with the use of SPC_LOOPS parameter ..............102 FIFO Mode ................................102 Limits of segment size, memory size............................ 103 Allowed trigger modes..............................103 Edge and level triggers ............................... 103 Pulsewidth triggers..............................
  • Page 7 Appendix ........................130 Error Codes ..................................130 Continuous memory for increased data transfer rate ......................132 Background ................................132 Setup on Windows systems............................132 Setup on Linux systems ..............................132 Usage of the buffer ..............................133 Pin assignment of the multipin connector ..........................134 Option “Digital outputs“...
  • Page 8: Introduction

    General Information The M2i.60xx series offer a wide range of fast 14 bit D/A converter boards for PCI-X, PCI and PCI Express (PCIe) bus. Due to the well-planned design these boards are available in several versions and different speed grades. That makes it possible for the user to find an individual solution.
  • Page 9: Different Models Of The M2I.60Xx Series

    Different models of the M2i.60xx series The following overview shows the different available models of the M2i.60xx series. They differ in the number mounted generation modules and the number of available channels. You can also see the model dependent allocation of the output connectors.
  • Page 10 Different models of the M2i.60xx series Introduction • M2i.6012 • M2i.6022 • M2i.6034 • M2i.6012-exp • M2i.6022-exp • M2i.6034-exp M2i.60xx / M2i.60xx-exp Manual...
  • Page 11: Additional Options

    MMCX connectors on its bracket, to connect to up to 17 different systems (including the System-Master itself). The installation and cabling from and to this System-Master distribution card will be shown in the according synchronization chapter later in this manual. (c) Spectrum GmbH...
  • Page 12: 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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 13: 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 14: Hardware Information

    Hardware information Introduction Hardware information Block diagram M2i.60xx / M2i.60xx-exp Manual...
  • Page 15: Technical Data

    5 MHz (typ. 5.8 MHz) Filter 1: Characteristics 4th order Butterworth 4th order Butterworth Filter 1: -3 dB bandwidth 100 kHz (typ. 96 kHz) 200 kHz (typ. 200 kHz) 500 kHz (typ. 495 kHz) 500 kHz (typ. 495 kHz) (c) Spectrum GmbH...
  • Page 16 40 pole half pitch (Hirose FX2 series) Cable-Type: Cab-d40-xx-xx Option Digital Marker Outputs on Bracket 3 mm SMB male (two or four connectors) Cable-Type: Cab-3f-xx-xx Option BaseXIO 8 x 3 mm SMB male on extra bracket, internally 8 x MMCX female M2i.60xx / M2i.60xx-exp Manual...
  • Page 17: Dynamic Parameters

    > 67.0 dB Dynamic parameters are measured at the given output level and 50 Ohm termination with a high resolution data acquisition card and are calculated from the spectrum. The sample rate that is selected is the maximum possible one. All available channels are activated for the tests. SNR and SFDR figures may differ depending on the quality of the used PC. SNR = Signal to...
  • Page 18: Order Information

    Option multiple cards: Needs SBench6-Pro. Handles multiple synchronized cards in one system. Volume Licenses Please ask Spectrum for details. (1) : Just one of the options can be installed on a card at a time. (2) : Third party product with warranty differing from our export conditions. No volume rebate possible.
  • Page 19: 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 20: 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 21 Hardware Installation Installing the board in the system 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 (c) Spectrum GmbH...
  • Page 22: 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 23: 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 it’s retainer.
  • Page 24: 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 25: Software Driver Installation

    Most available drivers and also the Spectrum driver for your board can manage interrupt sharing. But there are also some drivers on the market that can only use one interrupt exclusively. If this equipment shares an interrupt with the Spectrum board, the system will hang up if the second driver is loaded (the time is depending on the operating system).
  • Page 26: Windows 2000

    Software Driver Installation Windows 2000 Installation When installing the board in a Windows 2000 system the Spectrum board will be rec- ognized automatically on the next start-up. The system offers the direct in- stallation of a driver for the board.
  • Page 27: Driver - Update

    Windows 2000 Driver - Update If a new driver version should be installed no Spectrum board is allowed to be in use by any software. So please stop and exit all software that could access the boards. A new driver version is direct- ly installed from the device manager.
  • Page 28: Windows Xp 32/64 Bit

    Software Driver Installation Windows XP 32/64 Bit Installation When installing the board in a Windows XP system the Spectrum board will be rec- ognized automatically on the next start-up. The system offers the direct installation of a driver for the board.
  • Page 29: Driver - Update

    This information is also available through the Spectrum Control Center. Driver - Update If a new driver version should be installed no Spectrum board is allowed to be in use by any software. So please stop and exit all software that could access the boards.
  • Page 30: Windows 7, 32/64 Bit

    Microsoft homepage. This mechanism will fail at first for the „DPIO Module“ device, as shown on the right, because the Spectrum drivers are not available via Microsoft, so simply close the dialog. Afterwards open the device manager from the Win- dows control panel, as shown on the right.
  • Page 31: Version Control

    The driver update under Windows 7 is exact the same procedure as the initial installation. Please follow the steps above, starting from the device manager, select the Spectrum card to be updated, right-click and select „Update Driver Software...“ and follow the steps above.
  • Page 32: 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 33: Standard Driver Update

    (spcm_linux_drv_v123b4567) and only use the libraries out of this or one downloads the library package which is much smaller and doesn’t contain the pre-compiled kernel driver module (spcm_linux_lib_v123b4567). The update is done with a dedicated script which only updates the library file. this script is present in both driver archieves: sh install_libonly.sh (c) Spectrum GmbH...
  • Page 34: Library Only

    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 separately. The features of the Control Center are de- scribed in a later chapter in deeper detail.
  • Page 35 You may then run ldconfig. If this still doesn’t help please add the library path to /etc/ld.so.conf and run ldconfig again. If the libspcm_linux.so is quoted as missing please make sure that you have installed the card driver properly before. If any other library is stated as missing please install the matching package of your distribution. (c) Spectrum GmbH...
  • 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 Digitizernetboxes

    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 in- formation 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: Hardware Information

    Windows or Linux driver and the 32 bit or 64 bit type. It also gives direct information about the version of the installed Spectrum kernel driver and the library (*.dll under Windows). The information given here can also be found under Windows using the control panel. For details in driver details within the control panel please stick to the section on driver installation in your hardware manual.
  • Page 39: Installing And Removing Demo Cards

    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 40: Performing Card Calibration

    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.60xx / M2i.60xx-exp Manual...
  • Page 41: 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 an dedicated sub- folder „FirmwareUpdate“ that will be created inside the Spectrum installa- tion folder. Under Windows this folder by default has been created in the standard program installation directory.
  • Page 42: 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 43: 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 shortly all. The error codes and their meaning are described in detail in the appendix of this manual.
  • Page 44: Borland 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"); M2i.60xx / M2i.60xx-exp Manual...
  • Page 45: National Instruments Labwindows/Cvi

    Driver functions 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 46 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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 47 Be sure to fill the upper part lValueHigh with the correct sign extension even if you only write a 32 bit value as the driver every time interprets both parts of the function call. 64 bit register write spcm_dwSetParam_i64m the value can be written directly independent of the size. (c) Spectrum GmbH...
  • Page 48 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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 49 // adress of the error value (can zero if not of interest) char pszErrorTextBuffer[ERRORTEXTLEN]); // text buffer for text error Example: char szErrorBuf[ERRORTEXTLEN]; if (spcm_dwSetData_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: Borland 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; M2i.60xx / M2i.60xx-exp Manual...
  • 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

    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. M2i.60xx / M2i.60xx-exp Manual...
  • 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 capsulates 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 and remotely installed cards: ' ----- open card ----- hDevice = Drv.spcm_hOpen("TCPIP::192.168.169.14::INST0::INSTR") (c) Spectrum GmbH...
  • Page 56: 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 # ... M2i.60xx / M2i.60xx-exp Manual...
  • 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: Programming The Board

    // 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; M2i.60xx / M2i.60xx-exp Manual...
  • Page 59: 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 60: Gathering Information From The Card

    One of the following values is returned, when reading this register. Each card has it’s 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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 61: 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 it’s 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 62: Maximum Possible Sampling Rate

    Only available for output cards or I/O cards: Replay sequence mode available. SPCM_FEAT_AMPMODULE_10V 2000h 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)
  • Page 63: Miscellaneous Card Information

    V %d.%d build %d\n”,lKernelVersion >> 24, (lKernelVersion >> 16) & 0xff, lKernelVersion & 0xffff); printf("Library V %d.%d build %d\n”,lLibVersion >> 24, (lLibVersion >> 16) & 0xff, lLibVersion & 0xffff); This small program will generate an output like this: Kernel V 1.11 build 817 Library V 1.1 build 854 (c) Spectrum GmbH...
  • Page 64: 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 65: Analog Outputs

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

    100 up to 3000 (in mV) The amplitude can be changed at any time even if the board is running and outputting a signal to the con- nectors. The board will not be stopped when changing these settings. M2i.60xx / M2i.60xx-exp Manual...
  • Page 67: Output Offset

    // Set up amplitude of channel1 to ± 1.0 V spcm_dwSetParam_i32 (hDrv, SPC_AMP2 , 1500); // Set up amplitude of channel2 to ± 1.5 V spcm_dwSetParam_i32 (hDrv, SPC_OFFS0, // Set the output offsets spcm_dwSetParam_i32 (hDrv, SPC_OFFS1, 500); spcm_dwSetParam_i32 (hDrv, SPC_OFFS2, -500); (c) Spectrum GmbH...
  • Page 68: Output Filters

    Analog Outputs Output Filters Every output of your Spectrum D/A board is equipped with a bypass path and three fixed filters that can be used for signal smoothing. The filters are located in the signal chain between the output amplifi- cation section and the DAC, as shown in the right figure.
  • Page 69: Double Out Mode

    All outputs that are not activated for replay, will keep the programmed stoplevel also while the replay is in progress. Because the STOPLEVEL registers impact the digital samples fed to the D/A converter, the output is still shifted by the programmed output offset, as described before. (c) Spectrum GmbH...
  • Page 70: Generation Modes

    ERR_SEQUENCE if one of the given commands is not allowed in the current state. Register Value Direction Description SPC_M2CMD write only Executes a command for the card or data transfer. M2i.60xx / M2i.60xx-exp Manual...
  • Page 71: Card Status

    Description SPC_M2STATUS read only Reads out the current status information M2STAT_CARD_PRETRIGGER Acquisition modes only: the pretrigger area has been filled. M2STAT_CARD_TRIGGER The first trigger has been detected. M2STAT_CARD_READY The card has finished it’s run and is ready. (c) Spectrum GmbH...
  • Page 72: Acquisition Cards Status Overview

    // number of bytes after which an event is sent (0=end of transfer) void* pvDataBuffer, // pointer to the data buffer uint64 qwBrdOffs, // offset for transfer in board memory uint64 qwTransferLen); // buffer length M2i.60xx / M2i.60xx-exp Manual...
  • Page 73 The ABA mode is only available on analog acquisition cards. SPCM_BUF_TIMESTAMP 3000 Buffer is used to read out timestamp information. Details on this mode are described in the chapter about the times- tamp option. The timestamp mode is only available on analog or digital acquisition cards. (c) Spectrum GmbH...
  • Page 74: Standard Single Replay Modes

    In standard single replay mode the card is working totally independent from the PC, after the card setup is done and the data has been transferred into the on-board memory. The advantage of the Spectrum boards is that regardless to the system usage the card will refresh the outputs with equidistant time intervals.
  • Page 75: Continuous Marker Output

    If using the continuous output with internal trigger one can activate a marker output on the trigger i/o connectors marking the beginning of each loop. The marker output will generate a TTL marker pulse with the length of ½ of programmed memory (c) Spectrum GmbH...
  • Page 76: Example

    200450 read/write Writing a 1 enables the marker output on every loop (M2i.60xx/M2i.61xx only) M4i.66xx series details on continuous marker ourput The marker output will generate a TTL pulse on one of the multi-purpose I/O lines. The pulse length is of ½ of programmed memory. The marker output is enabled using the dedicated multi-purpose I/O line setup that is described later in this manual.
  • Page 77: Fifo Single Replay Mode

    In standard mode the replay (memory size) length is defined before the start and is limited to the installed on-board memory whilst in FIFO mode the replay length can either be defined or it can run continuously until user stops it. (c) Spectrum GmbH...
  • Page 78: Example (Fifo Replay)

    ("Currently Available: %d, total: %d\n", lAvailBytes, dwTotalBytes); // now we mark the number of bytes that we just generated for replay and wait for the next free buffer spcm_dwSetParam_i32 (hDrv, SPC_DATA_AVAIL_CARD_LEN, lAvailBytes); dwError = spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_DATA_WAITDMA); M2i.60xx / M2i.60xx-exp Manual...
  • Page 79: Limits Of Segment Size, Memory Size

    To handle the huge amount of data that can possibly be acquired with the M2i/M3i series cards, there is a very reliable two step buffer strategy set up. The on-board memory of the card can be completely used as a real FIFO buffer. In addition a part of the PC memory can be (c) Spectrum GmbH...
  • Page 80 Waiting for an event does not consume any CPU time and is therefore highly desirable if other threads do a lot of calculation work. However it is not necessary to use the wait functions and M2i.60xx / M2i.60xx-exp Manual...
  • Page 81 If you decide to process complete buffer please keep in mind the roll over at the end of the buffer. This buffer handling can now continue endless as long as we manage to set the data available for the card fast enough. (c) Spectrum GmbH...
  • Page 82 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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 83: Output Latency

    Please keep in mind that lowering the output buffer size also means that the risk of a buffer underrun gets higher as less data is buffered on the hardware side. Therefore please be careful with selecting the correct hardware buffer size and do not make it smaller than absolutely necessary. (c) Spectrum GmbH...
  • Page 84: Data Organisation

    16bit input data is assumed and samples will be arithmetically shifted downwards to use available 14bit resolution. The data conversion modes require driver version V2.11 (or newer) and firmware version V18 (or newer). Please update your system to the newest versions to use this mode. M2i.60xx / M2i.60xx-exp Manual...
  • Page 85: 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 86: 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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 87: 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 88: External Clocking

    The minimum external sample rate can be as low as DC and the maximum sample rate depends on the specific type of board. The maximum sample rates for your type of board are shown in the tables below. M2i.60xx / M2i.60xx-exp Manual...
  • Page 89: External Clock With Divider

    In some cases it is necessary to generate a slower frequency for sampling rate generation, than the available external source delivers. For these applications one can use an external clock and divide it. Register Value Direction Description SPC_CLOCKMODE 20200 read/write Defines the used clock mode (c) Spectrum GmbH...
  • Page 90 Register Value Direction Description SPC_CLOCK50OHM 20120 read/write A „1“ enables the 50 Ohm termination at the external clock connector. Only possible, when using the external connector as an input. M2i.60xx / M2i.60xx-exp Manual...
  • Page 91: Trigger Modes And Appendant Registers

    General Description The trigger modes of the Spectrum M2i series 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 seven external TTL trigger modes and software trigger.
  • Page 92 The explanation and a detailed description of the different trigger modes for the external TTL trigger inputs will be shown in the ded- icated passage within this chapter. spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH_ORMASK0, SPC_TMASK_CH0); // Enable channel0 trigger within the OR mask spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_POS); // Setting up external trigger for rising edges M2i.60xx / M2i.60xx-exp Manual...
  • Page 93: 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 94: 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 95: 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 96: Edge And Level Triggers

    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. M2i.60xx / M2i.60xx-exp Manual...
  • Page 97: 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 98 To find out what maximum pulsewidth (in samples) is available, please read out the register shown in the table below: Register Value Direction Description SPC_TRIG_EXT_AVAILPULSEWIDTH 44200 read Contains the maximum possible value for the external trigger pulsewidth counter. M2i.60xx / M2i.60xx-exp Manual...
  • Page 99: Mode Multiple Replay

    When writing a 1 the complete memory is replayed once, when writing a zero the replay continues from the beginning forever. When writing a number >1 this number of segments is replayed until the card stops automatically. (c) Spectrum GmbH...
  • Page 100: Fifo Mode

    8G - 4 0 (∞) 4G - 1 FIFO Multi not used Mem/4 0 (∞) 4G - 1 FIFO Gate not used not used 0 (∞) 4G - 1 4 channels Standard Single Mem/4 not used not used M2i.60xx / M2i.60xx-exp Manual...
  • Page 101: Programming The Behaviour In Pauses And After Replay

    All outputs that are not activated for replay, will keep the programmed stoplevel also while the replay is in progress. Because the STOPLEVEL registers impact the digital samples fed to the D/A converter, the output is still shifted by the programmed output offset, as described before. (c) Spectrum GmbH...
  • Page 102: Mode Gated Replay

    FIFO mode. For detailed information how to setup and start the card in FIFO 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 SPC_REP_FIFO_GATE 2000h Enables Gated Replay with FIFO mode M2i.60xx / M2i.60xx-exp Manual...
  • Page 103: Limits Of Segment Size, Memory Size

    Enable extra TTL input 0 for the OR mask. On plain cards this input is only available if the option BaseXIO is installed. As part of the digitizerNETBOX this input is available as connector Trigger B. SPC_TMASK_XIO1 200h Enable extra TTL input 1 for the OR mask. These trigger inputs are only available, when option BaseXIO is installed. (c) Spectrum GmbH...
  • Page 104 The gate will stop on the second rising 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_POS | 08000001h Sets the gate mode for external TTL trigger to start and stop on positive edges. SPC_TM_DOUBLEEDGE M2i.60xx / M2i.60xx-exp Manual...
  • Page 105 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 106: Pulsewidth Triggers

    (hDrv,SPC_TRIG_EXT0_MODE, SPC_TM_NEG | SPC_TM_PW_GREATER); // Setting up external TTL // trigger to detect low pulses spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_PULSEWIDTH , 50); // that are longer than 50 samples. spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0); // and enable it within the OR mask M2i.60xx / M2i.60xx-exp Manual...
  • Page 107: Programming Examples

    All outputs that are not activated for replay, will keep the programmed stoplevel also while the replay is in progress. Because the STOPLEVEL registers impact the digital samples fed to the D/A converter, the output is still shifted by the programmed output offset, as described before. (c) Spectrum GmbH...
  • Page 108: Sequence Replay Mode

    The switch over from one segment to the other is seam- less, without any missing samples. The powerful sequence mode option adds a huge variety of different application areas to Spectrum’s gen- erator cards.
  • Page 109: Programming

    (Mem/4) / SPC_SEQMODE_MAXSEGMENTS) For Digital I/O cards For cards with 8 bit converter resolution Activated Pattern size for currently selected segment Channels SPC_SEQMODE_SEGMENTSIZE Step Not allwed (Mem/1) / SPC_SEQMODE_MAXSEGMENTS) (Mem/2) / SPC_SEQMODE_MAXSEGMENTS) (Mem/4) / SPC_SEQMODE_MAXSEGMENTS) (Mem/8) / SPC_SEQMODE_MAXSEGMENTS) (c) Spectrum GmbH...
  • Page 110 Register Value Direction Description SPC_SEQMODE_STARTSTEP 349930 read/write Defines which of all defined steps in the sequence memory will be used first directly after the card start. M2i.60xx / M2i.60xx-exp Manual...
  • Page 111: Changing Sequences Or Step Parameters During Runtime

    However it is neither pos- sible to synchronize any changes inside the step memory nor to synchronize software commands that change the step memory order. (c) Spectrum GmbH...
  • Page 112: Programming Example

    (llCondition << 32) | (llLoop << 32) | (llNext << 16) | (llSegment); spcm_dwSetParam_i64 (hDrv, SPC_SEQMODE_STEPMEM0 + lStep, llValue); // Start the card spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER); // ... wait here or do something else ... // Stop the card spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_CARD_STOP); M2i.60xx / M2i.60xx-exp Manual...
  • Page 113: 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 114: Special Input Functions

    This special sampling feature requires the Timestamp mode to be enabled. Electrical specifications The electrical specifications of the BaseXIO inputs and outputs can be found either in the technical data section of this manual or in the datasheet. M2i.60xx / M2i.60xx-exp Manual...
  • Page 115: 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 116: Star-Hub Clock Engine

    = spcm_hOpen ("sync0"); spcm_vClose (hSync); for (i = 0; i < 4; i++) spcm_vClose (hCard[i]); Example for a digitizerNETBOX with two internal digitizer modules, This example is also suitable for accessing a remote server with two cards M2i.60xx / M2i.60xx-exp Manual...
  • Page 117 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 118: Setup Of Synchronization And Clock

    // set the clock master to 1 MS/s internal clock spcm_dwSetParam_i32 (hCard[2], SPC_CLOCKMODE, SPC_CM_INTPLL); spcm_dwSetParam_i32 (hCard[2], SPC_SAMPLERATE, MEGA(1)); // set all the slaves to run with 100 kS/s only spcm_dwSetParam_i32 (hCard[0], SPC_SAMPLERATE, KILO(100)); spcm_dwSetParam_i32 (hCard[1], SPC_SAMPLERATE, KILO(100)); spcm_dwSetParam_i32 (hCard[3], SPC_SAMPLERATE, KILO(100)); M2i.60xx / M2i.60xx-exp Manual...
  • Page 119: 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 120: Error Handling

    For all M2i cards is is also possible to run the „slave“ cards with a divided clock. Therefore please program a desired divided sampling rate in the SPC_SAMPLERATE register (example: running the star-hub card with 10 MS/s and the independent cards with 1 MS/s). The sampling rate is automatically adjusted by the driver to the next matching value. M2i.60xx / M2i.60xx-exp Manual...
  • Page 121 // now start the generator card (sync!) first and then the acquisition card 2 times spcm_dwSetParam_i32 (hSync, SPC_TIMEOUT, 1000); spcm_dwSetParam_i32 (hSync, SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER); spcm_dwSetParam_i32 (hCard[1], SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER | M2CMD_CARD_WAITREADY); spcm_dwSetParam_i32 (hCard[1], SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER | M2CMD_CARD_WAITREADY); (c) Spectrum GmbH...
  • Page 122: Option System Star-Hub

    Any additional cards within the master system are then connected internally to the Star-Hub by using the provided flat-ribbon cables. This connection does not differ from setting up a Star-Hub system, without the system synchronization feature. M2i.60xx / M2i.60xx-exp Manual...
  • Page 123: 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 124: 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 125: 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 126: Option Digital Outputs

    Usually the corresponding digital outputs of the analog generation boards are set to LOW level after replay. This is in most cases adequate. In some cases it can be necessary to hold the last sample, or to output a HIGH level after replay. The stoplevel will stay on the defined level M2i.60xx / M2i.60xx-exp Manual...
  • Page 127 SPCM_STOPLVL_HIGH Defines the digital outputs to enter HIGH level (Defines the analog output to enter maximum positive level) SPCM_STOPLVL_HOLDLAST Holds the last replayed sample on the digital outputs. (Holds the last replayed sample on the analog output) (c) Spectrum GmbH...
  • Page 128: Option Output Amplifier

    Option Output Amplifier As an additional option for all arbitrary waveform generators from Spectrum, a special amplifier card with 1, 2 or 4 parallel amplifier chan- nels and a large signal bandwidth of 30 MHz is available. The ±3 V signal of the generator card is amplified by a fixed value of 3.33 to a maximum of ±10 V.
  • Page 129: Avoiding Ground Problems

    If for any reasons you appear to have problems like oscillation on of the outputs, please try to plug the "ground connect" jumper first (see placement drawing for the jumpers position). (c) Spectrum GmbH...
  • Page 130: Appendix

    The check sum of the card information has failed. This could be a critical hardware failure. Restart the system and check the connection of the card in the slot. ERR_MEMALLOC 205h Internal memory allocation failed. Please restart the system and be sure that there is enough free memory. M2i.60xx / M2i.60xx-exp Manual...
  • Page 131 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 http://www.spectrum-instrumen- tation.com and install this one.
  • Page 132: Continuous Memory For Increased Data Transfer Rate

    Speed advantage 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. After setting up the value the system needs to be restarted as the allocation of the buffer is done during system boot time.
  • Page 133: Usage Of The Buffer

    (qwContBufLen < (2 * lMemsize)) pvData = new int16[lMemsize]; // read out the data spcm_dwDefTransfer_i64 (hDrv, SPCM_BUF_DATA, SPCM_DIR_CARDTOPC , 0, pvData, 0, 2 * lMemsize); spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_DATA_STARTDMA | M2CMD_DATA_WAITDMA); if (qwContBufLen < (2 * lMemsize)) delete[] pvData; (c) Spectrum GmbH...
  • Page 134: 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 135: Idc Footprints

    A16, A36, A56, A76, B16, B36, B56 or B76 A17, A37, A57, A77, B17, B37, B57 or B77 A18, A38, A58, A78, B18, B38, B58 or B78 A19, A39, A59, A79, B19, B39, B59 or B79 A20, A40, A60, A80, B20, B40, B60 or B80 (c) Spectrum GmbH...
  • Page 136: 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.

This manual is also suitable for:

M2i.60xx-exp

Table of Contents