M2i.30xx series m2i.30xx-exp series fast 12 bit transient recorder, a/d converter board for pci-x, pci and pci express bus (165 pages)
Summary of Contents for Spectrum MI.20xx
Page 1
MI.20xx fast 8 bit transient recorder, A/D converter board for PCI bus Hardware Manual Software Driver Manual English version April 1, 2005 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.spec.de...
Page 2
(c) SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC GMBH AHRENSFELDER WEG 13-17, 22927 GROSSHANSDORF, GERMANY SBench is a registered trademark of Spectrum Systementwicklung Microelectronic GmbH. Microsoft, Visual C++, Visual Basic, Windows, Windows 98, Windows NT, Window 2000 and Windows XP are tradenarks/registered trademarks of Microsoft Corporation. LabVIEW, DASYLab, Diadem and LabWindows/CVI are tradenarks/registered trademarks of National Instruments Corporation.
Introduction... 6 Preface ... 6 General Information ... 6 Different models of the MI.20xx series ... 7 Additional options ... 8 Extra I/O (Option -XMF)... 8 Extra I/O (Option -XIO)... 8 Starhub ... 9 Timestamp ... 9 The Spectrum type plate ... 10 Hardware information...
Page 4
Programming the Board ... 36 Overview ... 36 Register tables ... 36 Programming examples... 36 Error handling... 36 Initialization... 37 Starting the automatic initialization routine ... 37 PCI Register ... 37 Hardware version... 38 Date of production... 38 Serial number ... 38 Maximum possible sample rate ...
General Information The 4 models of the MI.20xx series are designed for the fast and high quality data acquisition. Every of the up to four input channels has its own A/D converter and it's own programmable input amplifier.
Different models of the MI.20xx series The following overwiew shows the different available models of the MI.20xx series. They differ in the number mounted generation modules and the number of available channels. You can also see the model dependant allocation of the output connectors.
The shown option is mounted exemplarily on a board with two modules. Of course you can also combine this option as well with a board that is equipped with only one module. It is not possible to use this option together with the star hub or timestamp option, because there is just space for one piggyback module on the on-board expansion slot. MI.20xx Manual...
Introduction Additional options Starhub The star hub module allows the syn- chronisation of up to 16 MI boards. It is possible to synchronise boards of the same type with each other as well as different types. The module acts as a star hub for clock and trigger signals.
The date of production, consisting of the calendar week and the year. Please always supply us with the above information, especially the serial number in case of support request. That allows us to answer your questions as soon as possible. Thank you. MI.20xx Manual Introduction...
Option Multiple Recording: Memory segmentation Option Gated Sampling: Gate signal controls acquisition Synchronisation of 2 - 4 boards, one option per system DASYLab driver for MI.20xx series VEE driver for MI.20xx series LabVIEW driver for MI.20xx series MATLAB driver for all MI.xxxx, MC.xxxx and MX.xxxx series.
Hardware Installation System Requirements Hardware Installation System Requirements All Spectrum MI.xxxx instrumentation boards are compliant to the PCI standard and require in general one free full length slot. Depending on the installed options additional free slots can be necessary. Warnings ESD Precautions The boards of the MI.xxxx series contain electronic components that can be damaged by electrostatic discharge (ESD).
After the board’s insertion fasten the screws of both brackets carefully, without overdoing. The figure shows an example of a board with two installed modules. MI.20xx Manual Hardware Installation...
Hardware Installation Installing the board in the system Installing multiple boards synchronized by starhub Hooking up the boards Before mounting several synchronized boards for a multi channel system into the PC you can hook up the boards with their synchronization cables first.
After the boards insertion fasten the screws of all brackets carefully, without overdoing. The figure shows an example of three boards with two installed modules. MI.20xx Manual Hardware Installation...
Software Driver Installation Interrupt Sharing Software Driver Installation Before using the board a driver must be installed that matches the operating system. The installation is done in different ways depending on the used operating system. The driver that is on CD supports all boards of the MI, MC and MX series. That means that you can use the same driver for all boards of theses families.
Therefore please start the device manager from the control panel and show the properties of the installed driver. On the property page Windows 98 shows the date of the driver. MI.20xx Manual Software Driver Installation...
Software Driver Installation After clicking the driver info button the detailed version information of the driver is shown. In the case of a support question this information must be presented together with the board’s serial number to the support team to help finding a fast solution. Driver - Update If a new driver version is to be installed no Spectrum board should be in use.
In the case of a support questi- on this information must be presented to- gether with the board’s serial number to the support team to help finding a fast so- lution. MI.20xx Manual Software Driver Installation...
Software Driver Installation 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.
If you want to check which driver version is installed in the system this can be easily done in the device manager. Therefore please start the device manager from the control panel and show the properties of the installed driver. MI.20xx Manual...
Software Driver Installation Windows XP On the property page Windows XP shows the date and the version of the installed driver. After clicking the driver details button the detailed version information of the driver is shown. In the case of a support question this information must be presented together with the board’s serial number to the support team to help finding a fast solution.
Driver Configuration utility to support more than one board. The Driver Configu- ration utility is automatical- ly installed with the driver. The Utility can be found in the start menu as „DrvCon- fig“. MI.20xx Manual Software Driver Installation...
Software Driver Installation Linux Overview The Spectrum boards are delivered with drivers for linux. It is necessary to install them manually following the steps explained afterwards. The linux drivers can be found on CD in the directory /Driver/linux. As linux is an open source operating system there are several distributions in use world-wide that are compiled with different kernel settings.
Page 26
It is necessary to load the kernel driver module after each start of the system before using the boards. Therefore you may add the „insmod spc.o“ command in one of the start-up files. Or you may load the kernel driver module manually whenever you need access to the board. MI.20xx Manual Software Driver Installation...
Software Software This chapter gives you an overview about the structure of the drivers and the software, where to find and how to use the examples. It detailed shows how the drivers are included under different programming languages and where the differences are when calling the driver functions from different programming languages.
The examples are bus type independent. As a result that means that the MI30xx directory contains examples for the MI.30xx, the MC.30xx and the MX.30xx families. The examples are simple one file programs and can be compiled using the Gnu C compiler gcc. It’s not necessary to use a makefile for them. MI.20xx Manual Software...
Software Other Windows C/C++ compilers Include Driver To access the driver, the driver functions must be loaded from the driver dll. This can be easily done by standard windows functions. There is one example in the directory /Examples/other that shows the process. After loading the functions from the dll one can proceed with the examples that are given for Microsoft Visual C++.
Page 30
The function will return an error value in case of malfunction. This function is only available on acquisition or i/o boards. The function is not available on generator boards. Function SpcGetData int16 SpcGetData (int16 nr, int16 ch, int32 start, int32 len, dataptr data); MI.20xx Manual Software...
Page 31
Software C/C++ Driver Interface Under Linux the additional parameter nBytesPerSample must be used for this function. For all boards with 8 bit resolution the parameter is „1“, for all boards with 12, 14 or 16 bit resolution this parameter has to be „2“. Under Linux the value „hDrv“ must contain the handle that was given back by the open function of that specific board.
„ch“ parameter contains the memory channel. „start“ and „len“ define the position of data to be written. „data“ is a pointer to the array holding the data. The function will return an error value in case of malfunction. cdecl; external 'SPECTRUM.DLL'; cdecl; external 'SPECTRUM.DLL'; cdecl; external 'SPECTRUM.DLL'; MI.20xx Manual Software...
Page 33
Software Delphi (Pascal) Programming Interface This function is only available on generator or i/o boards. The function is not available on acquisition boards. Function SpcGetData Reads data from the board from a specific memory channel. The board must first be initialized. The value „nr“ contains the index of the board that you want to access, the „ch“...
„value“ is the new value that should be set to this software register. The function will return an error value in case of malfunction. Function SpcSetParam: Function SpcSetParam (ByVal BrdNr As Integer, ByVal RegNr As Long, ByVal Value As Long) As Integer MI.20xx Manual Software...
Page 35
Software Function SpcGetParam The function SpcGetParam reads out software registers or status information. The board must first be initialized. The available software re- gisters for the driver are listed in the board specific part of the documentation below. The value „nr“ contains the index of the board that you want to access, the value „reg“ is the register that has to be read out and the value „value“...
Short description of the use of this con- stant. &lErrorCode); // Any command just to show the hDrv usage MI.20xx Manual Programming the Board Short description of the functio- nality of the register. A more de- tailled description is found...
Programming the Board This means as a result that it is not necessary to check each driver call for an error but to check for an error before the board is started to see whether all settings have been valid. By reading all the error information one can easily examine where the error occured.
Production date: year in bit 31..16, month in bit 7..0, bit 15..8 are not used Direction Description Serial number of the board Direction Description Maximum samplerate in Hz as a 32 bit integer value Direction Description Instaleld memory in bytes as a 32 bit integer value &lInstMemsize); MI.20xx Manual Programming the Board...
Programming the Board Installed features and options The SPC_PCIFEATURES register informs you about the options, that are installed on the board. If you want to know about one option being installed or not, you need to read out the 32 bit value and mask the interesting bit. Register Value SPC_PCIFEATURES...
The board can be set to normal mode again by the reset command or by starting the boards. A software and hardware reset is done for the board. All settings are set to the default values. The data in the board’s on-board memory will be no longer valid. MI.20xx Manual Programming the Board...
Analog Inputs Analog Inputs Channel Selection One key setting that influences all other possible settings is the channel enable register. An unique feature of the Spectrum boards 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. This description shows you the channel enable register for the complete board family.
Gives back the minimum value of input range 2 in mV. Gives back the maximum value of input range 0 in mV. Gives back the maximum value of input range 1 in mV. Gives back the maximum value of input range 2 in mV. &lNumberOfRanges); MI.20xx Manual Analog Inputs...
Analog Inputs Input offset In most cases the external signals will not be symmetrically re- lated to ground. If you want to acquire such asymmetrical sig- nals, it is possible to use the smallest input range that matches the biggest absolute signal amplitude without exceeding the range.
User settings 0. This is a valid set for storing user offset settings to. ADJ_ALL ); // Activate offset adjustment on all channels ADJ_USER0); // and store values to USER0 set in the EEPROM ADJ_USER0); // and load values to USER0 set in the EEPROM MI.20xx Manual Analog Inputs...
Standard acquisition modes Standard acquisition modes General Information The standard mode is the easiest and mostly used mode to acquire analog data with a Spectrum A/D board. In standard recording mode the board is working totally independant from the host system (in most cases a standard PC), after the board setup is done. The advantage of the Spectrum boards is that regardless to the system usage the board will sample with equidistant time intervals.
Status register, of the board. Indicates that the board has been started and is waiting for a triggerevent. Indicates that the board is running and a triggerevent has been detected. Indicates, that the board has stopped. SPC_START); MI.20xx Manual Standard acquisition modes...
Standard acquisition modes Command register Register Value SPC_COMMAND SPC_STARTANDWAIT SPC_STOP If the board is started in the interrupt mode the task calling the start function will not return until the board has finished. If no trigger event is found or the external clock is not present, this function will wait until the program is terminated from the taskmanager (Windows) or from another console (Linux).
Page 48
// with the maximum size (lMemsize) per channel // allocate temporary buffer for copy // get both channels together // from memory channel 0 // split data in the two channels // free the temporary buffer MI.20xx Manual Standard acquisition modes...
FIFO Mode FIFO Mode Overview General Information FIFO mode uses interrupts and is supported by the drivers on 32 bit operating systems like Window 9x/ME, Windows NT/2000/XP or Linux. Start of FIFO mode waits for a trigger event. If you wish to start FIFO mode immediately, you may use the software trigger.FIFO mode can be used together with the options Multiple Recording/Replay and Gated Sampling/Replay.
Number of software buffers to be used for FIFO mode. Value has to be between 2 and 256 Direction Description Read out the number of available FIFO buffers Direction Description Length of each buffer in bytes. Must be a multiple of 1024 bytes. MI.20xx Manual FIFO Mode...
FIFO Mode Analog acquisition or generation boards 8 bit resolution 1 Channel 1 x [Samples in Buffer] 2 Channels 2 x [Samples in Buffer] 4 Channels 4 x [Samples in Buffer] 8 Channels 8 x [Samples in Buffer] Digital I/O (701x or 702x ) or pattern generator boards (72xx) 8 bit mode [Samples in Buffer] Digital I/O board 7005 only...
Starts the FIFO mode and waits for the first interrupt Waits for the next buffer interrupt Stops the FIFO mode Direction Description FIFO mode handshake. Application has finsihed with that buffer. Value is index of buffer lCommand); MI.20xx Manual FIFO Mode...
FIFO Mode The following example shows how to sort the channel data when using 4 channels in FIFO mode: for (i = 0; i < (lBufferSizeInSamples / 4); i++) Data[0][i] = FIFOBuffer[i * 4 + 0]; Data[1][i] = FIFOBuffer[i * 4 + 2]; Data[2][i] = FIFOBuffer[i * 4 + 1];...
// Set internal sample rate to 1 MHz // enable the clock output of that 1 MHz // Read back the sample rate that has been programmed // print it. Output should be „Samplerate = 1000000“ MI.20xx Manual Clock generation...
Clock generation Maximum internal sample rate in MS/s Remapped channels n.a. n.a. n.a. n.a. Using plain quartz with no 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.
Page 56
10 MHz up to max 5 MHz up to max 2.5 MHz up to 7.5 MHz 7.5 MHz up to 17.5 MHz 17.5 MHz up to 36 MHz CHANNEL0 | CHANNEL1 | CHANNEL2 | CHANNEL3); MI.20xx Manual Clock generation EXRANGE_BURST_L EXRANGE_BURST_XL > 36 MHz...
Clock generation External clock with divider The extra clock divider can be used to divide an external fed in clock by a fixed value. The external clock must be > 1 MS/s. This divided clock is used as a sample clock for the board. Register Value SPC_CLOCKDIV...
Sets the trigger mode for external TTL trigger to detect LOW pulses that are longer than a programmed pulsewidth. Sets the trigger mode for external TTL trigger to detect LOW pulses that are shorter than a programmed pulsewidth. MI.20xx Manual Trigger modes and appendant registers...
Trigger modes and appendant registers If you choose an external trigger mode the SPC_TRIGGEROUT register will be overwritten and the trigger connector will be used as an input anyways. Register Value SPC_TRIGGEROUT 40100 As the trigger connector is used as an input, you can decide whether the input is 50 Ohm terminated or not. If you enable the termination, please make sure, that your trigger source is capable to deliver the needed current.
Sets the pulsewidth in samples. Values from 2 to 255 are allowed. Sets the triggermode for the board. Sets the trigger mode for external TTL trigger to detect HIGH pulses that are shorter than a programmed pulsewidth. MI.20xx Manual Trigger modes and appendant registers...
Page 61
Trigger modes and appendant registers TTL pulsewidth trigger for long LOW pulses This mode is for detecting LOW pulses of an external TTL signal that are longer than a programmed pulsewidth. If the pulse is shorter than the programmed pulsewidth, no trigger will be detec- ted.
Trigger modes and appendant registers Triggerlevel All of the channel trigger modes listed above require at least one triggerlevel to be set (except TM_CHXOFF of course). Some like the window trigger require even two levels (upper and lower level) to be set. Before explaining the different channel trigger modes, it is necessary to explain the board’s series specific range of triggerlevels.
Page 64
±1.0 V input range is selected and the board uses 8 bits for trigger detection. The result would be 7.81 mV, which is the step width for your type of board withing the actually chosen input range. Trigger step width Trigger step width MI.20xx Manual Trigger modes and appendant registers Input Range –...
Trigger modes and appendant registers Detailed description of the channel trigger modes Channel trigger on positive edge The analog input is continuously sampled with the selected sample rate. If the programmed triggerlevel is crossed by the channel’s signal from lower values to higher values (ri- sing edge) then the triggerevent will be detected.
Page 66
Set to the desired pulsewidth in samples. Direction set to TM_CHANNEL TM_CHXNEG_LP Set it to the desired triggerlevel relatively to the channel’s input range. Set to the desired pulsewidth in samples. MI.20xx Manual Trigger modes and appendant registers Value 20040 10001 board dependant 2 to 255...
Page 67
Trigger modes and appendant registers Channel pulsewidth trigger for short positive pulses The analog input is continuously sampled with the selected sample rate. If the programmed triggerlevel is crossed by the channel’s signal from lower to higher values (rising edge) the pulsewidth counter is started. If the pulsewidth counter reaches the programmed amount of samples, no trigger will be detected.
Page 68
Set it to the desired upper level relatively to the channel’s input range. Set it to the desired lower level relatively to the channel’s input range. Set to the desired pulsewidth in samples. MI.20xx Manual Trigger modes and appendant registers Value...
Page 69
Trigger modes and appendant registers Channel steepness trigger for steep positive pulses The analog input is continuously sampled with the selected sample rate. If the programmed lower level is crossed by the channel’s signal from lower to higher values (rising edge) the pulsewidth counter is started.
Page 70
Direction set to TM_CHANNEL TM_CHXWINLEAVE Sets the window’s upper level relatively to the channel’s input range. Sets the window’s lower level relatively to the channel’s input range. MI.20xx Manual Trigger modes and appendant registers Value 20040 10040 board dependant board dependant...
Page 71
Trigger modes and appendant registers Channel window trigger for long inner signals The analog input is continuously sampled with the selected sample rate. The upper and the lower levels define a win- dow. Every time the signal enters the window from the out- side, the pulsewidth counter is startet.
Page 72
TM_CHXWINLEAVE_SP Sets the window’s upper level relatively to the channel’s input range. Sets the window’s lower level relatively to the channel’s input range. Set to the desired pulsewidth in samples. MI.20xx Manual Trigger modes and appendant registers Value 20040 10042...
Option Multiple Recording Option Multiple Recording The option Multiple Recording allows the acquisition of data blocks with multiple trigger events without restarting the hardware. The on-board memory will be divided into several segments of the same size. Each segment will be filled with data when a trigger event occures. As this mode is totally done in hardware there is a very small rearm time from end of the acquisition of one segment until the trigger detection is enabled again.
Page 74
// Set the total memsize for recording to 4096 samples // so that actually four segments will be recorded TM_TTLPOS);// Set the triggermode to external TTL mode (rising edge) MI.20xx Manual Option Multiple Recording ext. TTL trigger with internal trigger with...
Option Gated Sampling Option Gated Sampling The option Gated Sampling allows the data acquisition controlled by an external gate signal. Data will only be recorded, if the programmed gate condition is true. Recording modes Standard Mode Data will be recorded as long as the gate signal fulfills the gate condition that has had to be programmed before.
+16 samples +32 samples -5 samples +5 samples +8 samples +16 samples Gate start will be detected on Gate start will be detected on MI.20xx Manual Option Gated Sampling ext. TTL trigger with internal trigger with activated activated synchronization synchronization...
Option Gated Sampling Channel trigger Mode TM_CHXPOS signal crossing level from low to high TM_CHXNEG signal crossing level from high to low TM_CHXPOS_LP signal above level longer than the programmed pulsewidth TM_CHXNEG_LP signal below level longer than the programmed pulsewidth TM_CHXWINENTER signal entering window between levels TM_CHXWINENTER_LP...
Disables the timestamp module. No timestamps are recorded. Must be written to enable the StartReset timestamp mode. The counter is reset on each start of the board. The timestamps values are relative to the board start. MI.20xx Manual Option Timestamp Timestamp...
Option Timestamp The HIGH part counts the seconds that have elapsed since the last counter reset with the reset command TS_RESET. The LOW part is reset to zero on every seconds signal and is clocked with the actual sample rate. The edge of the external secondssignal must be set seperately as described below.
Reads the data directly from the pins of all digital I/O lines either if they are declared as inputs or outputs. Writes the data to all digital I/O lines that are declared as outputs. Bytes that are declared as inputs will ignore the written data. MI.20xx Manual Option Extra I/O...
Option Extra I/O Analog Outputs In addition to the digital I/Os there are four analog outputs available. These outputs are directly programmed with the voltage values in mV. As the analog outputs are driven by a 12 bit DAC, the output voltage can be set in a stepsize of 5 mV. The table below shows the registers, you must write the desired levels too.
OR, so that the first board that detects a trigger will start the boards. This OR connection is available starting with starhub hardware version V4. Direction Description Command register of the board Disables the synchronization globally. MI.20xx Manual Synchronization (Option)
Synchronization (Option) When the boards are synchronized by the option starhub there will be no delay between the connected boards. This is achie- ved as all boards, including the one the starhub module is mounted on, are connected to the starhub with cables of the same length.
Page 86
Defines the according board as the trigger slave. SPC_SYNCTRIGGERSLAVE); // Setting all the other boards to SPC_SYNCTRIGGERSLAVE); // trigger slave is a must ! Direction Description If activated the dedicated board will use its own trigger modes instead of the synchronization trigger. MI.20xx Manual Synchronization (Option)
Page 87
Synchronization (Option) Even if a board is not using the synchronization trigger, it must have been set as a triggerslave before even if you exclude the board with the SPC_NOTRIGSYNC register. After you have excluded one or more of the installed boards from the synchronization trigger it is possible to change the triggermodes of these boards.
Page 88
Starts the board with the current register settings. Starts the board with the current register settings in the interrupt driven mode. SPC_START); // For all synchronized boards // The status is read out // by polling for SPC_READY MI.20xx Manual Synchronization (Option)
Synchronization (Option) Setup synchronization for use with FIFO mode and equally clocked boards Most of the steps are similar to the setup routine for standard synchronization mentioned before. In this passage only the differences between the two modes are shown. Please have a look at the passage before to see the complete setup procedure. The following steps differ from standard mode to FIFO mode.
Page 90
Starts the board with the current register settings in FIFO mode and waits for the first interrupt. ----- total buffers: %d\n", nIdx, nBufIdx, lTotalBuf);// e.g. calculations MI.20xx Manual Synchronization (Option) // board 2 set as trigger master // as trigger slaves...
Synchronization (Option) Additions for synchronizing different boards General information Spectrum boards with different speed grades, different number of channels or even just different clock settings for the same types of boards can be synchronized as well. To get the boards working together synchronously some extra setups have to be done, which are described in the following passages.
Page 92
10 MS/s 20 MS/s 40 MS/s 20 MS/s 10 MS/s 3131 4 x 12 bit A/D 20 MS/s 40 MS/s Therefore this board is set up to be the clockmaster. 40 MS/s 40 MS/s 20 MS/s MI.20xx Manual Synchronization (Option)
Synchronization (Option) Additions for equal boards with different sample rates In addition to the possibility of synchronizing different types of boards to one synchronous sample rate it can be also useful in some cases to synchronize boards of the same type, with one working at a divided speed. In this case you simply set up the fastest board as the clock master and set it’s clock divider to one.
Synchronisation to external timestamp reference clock failed. At initialisation is checked wether there is a clock edge present at the input. The autorouting function of the star-hub initialisation has failed. Please check whether all cables are mounted correctly. MI.20xx Manual Appendix...
Pin assignment of the multipin connector The 40 lead multipin connector is the main connector for all of Spectrum’s digital boards and is addi- tionally used for different options, like “Extra I/O“ or the additional digital inputs (on analog acquisition boards only) or additional digital outputs (on analog generation boards only).
Pin8 Pin10 Pin1 Pin3 Pin5 Pin7 Pin9 A3…A0 are the pins for the analog outputs, while D15…D0 are the 16 digital I/Os. Pin12 Pin14 Pin16 Pin18 Pin20 Pin11 Pin13 Pin15 Pin17 Pin19 MI.20xx Manual Pin22 Pin24 Pin26 Pin21 Pin23 Pin25...
Need help?
Do you have a question about the MI.20xx and is the answer not in the manual?
Questions and answers