Home

Spectrum Brands MI.20xx User's Manual

image

Contents

1. a a 84 ke to Lo SE AE a 84 Swrichrenizaen Oli OM INU e en 84 The setup order the different synchronization options 85 Setup Order for use with standard FIFO mode and equally clocked 5 85 Setup synchronization for use with FIFO mode and equally clocked 5 89 Additions for synchronizing different boards 3 35 30 0 2 teh Gal ete Se ioe ute oa ate te 91 Additions for equal boards with different sample rates sss eee 93 Resulting delays using different boards OF speeds ied pie Piae topic n qat betta tuse Davos 93 Appendix 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 94 Emor MA EE m TET 94 Pin assignment of the connector esisiini aaa des oti tai Mes fa tae uasa tesa 95 Extra Connector pliom XMF 95 IhesmulilBIBse deas seo os Man uo Amie ptite d
2. SPO MULTI 135 Enable Multiple Recording SpcSetParam hDrv SPC MEMSIZE 8192 8k Memsize opcsSetParam hDrv SPC POSTTRIGGER 1024 Bach segment 1k 8 segments SPC MULTI Enable Multiple Recording 45 Setup and Start timestamp module SpcsetParam hDrv SPC TIMESTAMP CMD TS MODE STANDARD Standard Timestamp mode set SpcSetParam hDrv SPC TIMESTAMP CMD TS RESET J Counter 12 seb to Zeros Start the board SpcSetParam hDrv SPC COMMAND SIART S Start recording do SpcGetParam hDrv SPC STATUS amp lStatus Wait for Status Ready woile t SFC BEADY I Gl ee Read out the timestamps epcGetData hDrv CH TIMESTAMP 1nt32 8 dataptr plTimestamps ff eS display the timestamps There should be 8 stamps 1 for each segment tor 190r 3 lCounEk printf Segment Counter 081xVi 1 plTisesramps 2 ui 1 plTimestaupslz2 1i s c Spectrum GmbH 81 Digital I Os Option Extra I O Option Extra I O Digital I Os With this simple to use enhancement it is possible to control a wide range of external instruments or other equipment Therefore you have several digital Os and 4 analog outputs available All extra I O lines are completely independent from the board s function data di rection or sample rate and directly controlled by software asynchronous I
3. Lec diese ede er 49 Background FIFO Redd UM TR 49 Spee dman KC ME CI LEE 49 Programming eoe PE du re RTT rd SS 50 SSW Clie fT MR ane As os 50 RO Ge ale cedi xad dM d uie dud Mun quM MM bee Dp AM E E 51 ad ceased sh ea ie eel eg i aetna eles mE 52 Example Soe are ttd Dall cae testa aids 52 M 52 Mc 53 Clock generation 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 54 Gad a e HH 54 Interpallv generdied scene I luchas etam ed ee 54 internal sample Fol NET TE 54 EZ Wii ee sess 55 Breq stel E T TD E 55 CLOCK Witt CIVICS 57 Trigger modes and appendant registers ccccccccsccccccccccccccsccccccccccsccccccccccccccscscssccccccesess DO cr 58 Sotware HI Io RTT 58 Exea MINI DNE EE ETT ET ETUR OR TEUER CORSO EP DUNT 58 Edge T ETE 59
4. Sentus isto Cni uod AI e 78 Mode ade 78 UII GSU OCS 78 evel imode toplional eot pene E ive SEAR NL EE 78 E 79 Reading tiie SIUM 79 Functions tor aecessing dala sce oet e ce E __ _ _ _ es 79 Dara forma DE 80 ET 81 Standard CCG WIS MON su 81 81 Option Extra 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 82 Digitall AO Mr 82 CHONG Dre o TTE 82 27900 secet MEL AE MEI LL MEE MER MM UE db dE E 82 Analog OUIBUISu heise cited ta C etes tu D ee 83 Programming example EE 83 Synchronizdlion esses 5
5. Used interrupt line This register holds the information of the actual used interrupt line for the board This information is sometimes more easy in geting the interrupt line of one specific board then using the hardware setups of your operating system Register Value Direction Description ____ __ ____ _________ SPC_PCIINTERRUPT 2300 The used interrupt line of the board Used type of driver This register holds the information about the driver that is actually used to access the board Although most users will use the boards within a Windows system and most Windows users will use the WDM driver it can be sometimes necessary of knowing the type of driver Register Direction Description ____ _ _ SPC_GETDRVTYPE Gives information about what type of driver is actually used EX Ones ua EDRVTYP_WDM 41 Windows WDM driver is used only Windows 98 ME 2000 XP This is the most common Windows driver Driver version This register informs Windows users about the actual used driver DLL This information can also be obtained device manager Please refer to the Driver Installation chapter Linux users will get the revision of their kernel driver instead because linux does not use any DLL Register Direction Description __6_ _ 60 _ _ _ _ __ _ _ ___ SPC_GETDRVVERSION 1200 Gives information about the driver DLL version
6. 24 Cm 25 OWS IMIOW ty mee dense ade ite 25 TTE 25 Software 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 27 Sotware Overview rcm 27 Ost Wy liso BOO ante 27 DY E A RUE d 28 28 Microso CEE costretti MEM Et cen dM eM EE 28 ONC a Sah 28 Other Windows C C 29 Neabonadl Insirements LabVVindows CMT d oca teta tear i AR nae re 29 BTW UPS WN NS NTC ETE 29 Delphi tPascal PregramtilngInterldee ac siete co uc olet ne 32 Type Ceri MINION eiu MU E hel tk eases Den 32 JI Ma E NET 32 reis atic 32 OEC Ms lota Etude ceto ep m 32 Visual Basic Programming tae De IO RO REIR ae o
7. Kernel Driver version This register informs OS independent about the actual used kernel driver Windows users can also get this information from the device ma nager Plese refer to the Driver Installation chapter Linux users can get the driver version by simply accessing the following register for the kernel driver Register Value Direction Description _ _ _6 _ __ _6_ _ _6_ _ __ __ SPC_GETKERNELVERSION 1210 Gives information about the kernel driver version c Spectrum GmbH 39 Powerdown and reset Programming the Board Example program for the board initialization The following example is only an exerpt to give you an idea on how easy it is to initialize a Spectrum board lization ot POI Bus Boards SpelnrytP IBoarosS amp BPCIDusVersion i ERR OK return nCount 0 printi No Spectrum board return request and print Board type and some information epeGeiParam nDrv amp lBrdType spcGetParam hDrv SPC PCIMEMSIZE amp llInstMemsize SpcosLParam nDrv SPC POTS ERTA ENO amp lSerialNumber print the board type depending on bus Board number is always the lower 16 bit of type switch 1 amp SERIESMASK case TYP MISERIES print Board found ex sn 05din lBrdTvpe D XxfIrrr serialnumber break case MOSERIES princi Board found sn 05din IlBrdTvpe Oxifit loerialNumb
8. 80 MI 20xx Manual Option Timestamp Example programs Example programs Standard acquisition mode Allocate memory for the timestamp data buffer pllImesStamps mallos MAX TIMBSTSOMPS S5 3 Reset the board and flush the FIFO spcsetParam hDrv SPC COMMAND Setup and start timestamp module SpcSetParam hDrv SPC TIMESTAMP CMD TS MODE STANDARD Standard mode set BposetPasram hDrv SPO TIMESTAMP CMD RESET ly Counter is sel to Zero Start the board 4 times to generate 4 timestamps tor 1202 154 a SpcSetParam hDrv SPC COMMAND START 7 Start recording do opeocetParaum SPC STATUS Wait for Status Ready whole lStetus f SPC READY Read out and display the timestamps epeGetDara hDrv CH TIMESTAMP amp lCount MAX TIMESTAMPS dataprr plTimestamps tor i20 i lCount ITT perinti Timestamp CHICHI S08lXxXELOW S i plTimesStsmpal2 iv1 plTimestampasz2 i Free the allocated memory for the timestamp data buffer plTimeStamps Acquisition with Multiple Recording Reset the board and flush the FIFO pocet Param hDrv SPC COMMAND seo RESET oe camp le Setup 0r recording hDrv SPC CHENABLE 1575 jy dl chasnael tor recording SpcSetParam hDrv SPC SAMPLERATE 1000000 Samplerate 1 MHz opeserParam hDrv SPC IRIGGEBMODE TILPOR External positive Edge
9. icons fen eM ON Nt ND NET CEN LU SM IL Noa 34 fae MP qo NNMERO RR NOTET 34 Base EXD m 34 Excel e tent har td mut coat aa lias wees la aa ba i cues 34 Driver NN O Tn tras 34 Programming the Board 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 36 eii LE w 36 area ueste n uA COMM LG Iu E eL AIME M E I DDR MC M MEM EE RUE 36 Programming example honte cto weet 36 PR RE 36 WN ZAN rrr Em 37 Starting the automatic inihalization FOUTLRI os _ __ 37 atk 37 HardWare I gt 38 Ko produc aie chee 38 STIG HUMBE 38 Maximum 38 NODE NOCERE 38 Installed Tedtures cmd OOS aE Gils ls ca cea adel Shae el eed a ae e Ete 39 Used 39 Used WY eI eR ______ _ 39 POWerdoWi dd NESE oido LS __ _ _ _ 40 Analog Inputs 00000
10. iiei i EE a 14 Installing multiple boards synchronized by ele e of pe qd diam 15 Installing multiple synchronized DOES e Mu Ld di 16 Sofrware Driver Installation 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1 7 17 oN oe RR ON AD RCNA Re SA 18 lei Coll LUKE 18 TET 18 Divers Ae a a E busto 19 e ap E E lentes S 20 20 COMO c IM OM M M LM DICE ut I SS EAD AU 20 Divers EN P 21 VV OWS 22 COSI LAE LN M M 22 22 Drivers MMC M 23 Windowsi Se TERCER 24 Pi E daca ae E NX cc 24 Adding boards 16 Ine Vv seeded an seeds tebe ue o tU Ege eet Le Ss Ses 24 Driver baie MSE dais Ove Ure PRION TOT err Wey
11. Ll SPECTRUM SYSTEMENTWICKLUNG MICROELECTRONIC GMBH MI 20xx fast 8 bit transient recorder A D converter board for PCI bus Hardware Manual Sofrware 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 infoGspec de INTERNET http www spec de 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 MATLAB is a tradenark registered trademark of The Mathworks Inc Agilent VEE VEE Pro and VEE Onelab are tradenarks registered trademarks of Agilent Technologies Inc FlexPro is a registered trademark of Weisang GmbH amp Co KG Introduction 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 6 Mae Kaal e En 6 Diferent er E pi hacen etna DI MALI LN LIES Qu Ae A cgo M SL IL eee A
12. Direction Description ____ _ _ SPC_XIO_DIRECTION Defines bytewise the direction of the digital I O lines The values can be combined by a bitwise OR DOGO 0 Ses he drecion of damel TiDi Dom OO Transfer Data The outputs can be written or read by a single 32 bit register If the register is read the actual pin data will be taken Therefore reading the data of outputs gives back the generated pattern The single bits of the digital O lines correspond with the bitnumber of the 32 bit register Values written to the most significant byte will be ignored Register Value Direction Description Oi _____ _ __ __ __ __ SPC_XIO_DIGITALIO 47110 Reads the data directly from the pins of all digital O lines either if they are declared as inputs or outputs SPC_XIO_DIGITALIO 47110 w Writes the data to all digital O lines that are declared as outputs Bytes that are declared as inputs will ignore the written data 82 MI 20xx Manual Option Extra I O Analog Outputs Analog Outputs In addition to the digital 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 If you read these outputs the actual output level is given back from an internal software register Descriptio
13. Multiplexed data Depending on the activated channels and the board type several channels could be stored in one memory channel As a result that means that start and parameter have to be multiplied by the number of channels per memory channel module If for example two channels have been acquired into one memory channel a call like reads out data of both channels from memory channel O starting at sample position 4k and a length of 2k The Data array must be of course large enough to hold data of both channels in that case 2 2k Ak of data Standard mode Reading out the data is really easy if a recording modes is used that stores non multiplexed data in the dedicated memory channels The next example shows how to read out the data after having recorded two channels that have been written without multiplexing to both memory channels Example for SocGetData no memory allocation error checking performed If you use two channels for recording using only one memory channel or four channels the data in the memory channel s is multiplexed and needs to be unsorted by the user The following example shows how to unsort the data for the recording of two channels using memory chan nel 0 A8 MI 20xx Manual FIFO Mode Overview FIFO Mode Overview General Information The FIFO mode allows to record data continuously and trans E fer it online to the PC acquisition boards or allows to write data continuously from
14. 0 ok ce Utility can be found in Options None gt the start menu as fig To add a new card please follow these steps Increase the board number on top of the screen by pressing the right button Change the board type from Not Installed to PCI Board Press the Apply changes button Press the button Restart the system 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 When updating a system please simply execute the setup file of the new driver version Afterwards the system has to be rebooted The driver configuration is not changed 24 MI 20xx Manual Software Driver Installation Linux 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 As we are not able to install and maintain hundreds of different distributions and versions we had to focus on some common used linux distributions However if your distribution does not work with one of these pre compiled kernel modules or you have a special
15. Every time the signal leaves the window from the insi de the pulsewidth counter is startet If the pulsewidth counter stops and the signal is still outside the window no trigger will be detected If the signal enters the window before the pulsewidth coun ter has stopped the triggerevent will be detected Triggerevent Register i Direction setto sss le ____ SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXWINLEAVE_ SP 10052 SPC_HIGHLEVELO 42000 Sets the window s upper level relatively to the channel s input range board dependant SPC_LOWLEVELO 42100 Sets the window s lower level relatively to the channel s input range board dependant SPC_PULSEWIDTH 44000 Set to the desired pulsewidth in samples 2 to 255 72 MI 20xx Manual Option Multiple Recording Recording modes 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 You ll find that rearm time in the technical data section of this manual Recording modes Standard Mode With every detected trigger event one data block is filled with data T
16. Pulewidihi DR 60 eremi dm TP e 62 Overview of the channel trigger 62 E E tale 63 Detailed description of the channel trigger modes ee eee etre as eid a e ease 65 Option Multiple Recording 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 73 inito m 73 Siandgre Ode Mt C MD A EE 73 FROM MC 73 1 en mPa 73 Option Gated Sampling 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 75 RECORCING DL LE M E c E cR t A b ieu E 75 Standard VOCE NM DERE DTE 75 xg ER E cC 75 TOJEPE MOG S DE M EMI imi pe i M uu M LU qq E 75 General information and trigger delay sce adea ases athe a a Gin itis re i Ses 75 Allowed Irigge modes a b ub cups Sve RMP Ss SIAR EME eee ie 76 CM 77 Option Timestamp 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 78 EET Emm 78
17. S Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed C Search removable media floppy CD ROM Include this location in the search D DriversWin98_2k_XP Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not quarantee that the driver you choose will be the best match for your hardware Hardware Update Wizard Completing the Hardware Update ays Wizard NS The wizard has finished installing the software for MI 3020 Click Finish to close the wizard Finish 23 Windows NT Software Driver Installation Windows NT Installation Setup Complete Xl Under Windows NT the Spectrum driver must be in stalled manually The driver is Welcome to the WinNT Driver Setup program This program will install WinNT Driver on your computer Setup has finished copying files to your computer Before you can use the program you must restart Windows or your computer It is strongly recommended that you exit all Windows programs before running this Setup program Click Cancel to quit Setup and then close any programs you have running Click Next to continue with the Setup program found on CD in the directory AInstallNWinNTDrv Please start the Setup exe pro gram The installation is per formed totally automatical
18. SPC SYNCSLAVEFIFO cposetParam nDrv 2 SPC COMMAND SPC SYNCSLAVEFIPRO yt start the synchronization eposetParam hDrv 0 SPC COMMAND SPC SYNCSTART es Start the FIFO tasks Trigger slaves are started first CreateThread NULL 0 amp dwFIFOTask void hDrv 0 0 amp dwThreadIid b CreateThread NULL 0 amp dwFIFOTask void hDRV 1 0 amp dwThreadId b zy Start the trigger master task CreateThread NULL 0 amp dwFIFOTask void hDrv 2 amp dwThreadId hDrv 2 It is assumed that the created threads start in the same order as they are called from within the program As described before starting of the FIFO mode in synchronization has to be done in different threads to avoid a deadlock A simple example for a FIFO thread can be found below Example of FIFO task It simply starts the boards and counts the buffers that have been transfered uneigned long stdoall dwFIFOTIAaSk PADE intleo hDry e Inele phDrv gt SPO PIFOSIART intio newt lds nBbBrr itt 2 TEES 0 heer SposerParsm hry SPC COMMAND wait for buffer lCmd SPC FIFOWAIT vou can do printr Board sd Bulier dA total butters odi nldx nBurldx JTotalbBui s Sg calculations If ust a printt here SpobetParam hDrv SPC COMMAND SPC FIFO BUFREADYO release butter ECOSSE SET igi if nBufIdx
19. TIL pulsewidth trigger for short HIGH pulses This mode is for detecting HIGH pulses of an external TTL signal that are shorter than a programmed pulsewidth If the pulse is lon ger than the programmed pulsewidth no trigger will be detected The board will trigger on the first pulse matching the trigger con dition after starting the board The next triggerevent will then be detected if the actual recording replay has finished and the VES board is armed and waiting for a trigger again Pilas wich Triggerevent Register Value Direction Description SPC PULSEWIDTH 44000 Sets the pulsewidth in samples Values from 2 to 255 are allowed SPC TRIGGERMODE 40000 Sets the triggermode for the board TM TTLHIGH SP 20002 Sets the trigger mode for external TTL trigger to detect HIGH pulses that are shorter than a programmed pulsewidth 60 MI 20xx Manual Trigger modes and appendant registers External TTL trigger TIL 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 The board will trigger on the first pulse matching the trigger condition after starting the board The next triggerevent will then be detected if the actual recording replay has finished and the board is armed and waiting for a trigger again i i Pulse width Pulse width i
20. 295110 Start delay in samples for FIFO synchronization only The resulting delay between the clock master board and the single clock ResultingDelay ClockMasterDelay ClockSlaveDelay y slave boards can be easily calculated with the formular mentioned on the right c Spectrum GmbH 93 Error Codes Appendix Appendix Error Codes The following error codes could occur when a driver function has been called Please check carefully the allowed setup for the register and change the settings to run the program error name value hex value dec error description ERR_OK Oh 0 Execution no error ERR_INIT Th 1 The board number is not in the range of to 15 When initialisation is executed board number is yet initialised the old definition will be used ERR_NR 2h 2 The board is not initialised yet Use the function SpclnitPClBoards first If using ISA boards the function Spcl nitBoard must be called first ERR_TYP 3h 3 Initialisation only The type of board is unknown This is a critical error Please check whether the board is correctly plug in the slot and whether you have the latest driver version ERR FNCNOTSUPPORTED 4h 4 This function is not supported by the hardware version ERR BRDREMAP 5h 5 The board index remap table the registry is wrong Either delete this table or check it craefully for double values ERR_KERNELVERSION 6h 6 The version of the kernel driver is not matching the version of the DLL Ple
21. Inputs Setting up the inputs Input offset In most cases the external signals will not be symmetrically re input used input used lated to ground If you want to acquire such asymmetrical sig signal IR 2 V signal IR amp 1 V nals it is possible to use the smallest input range that matches zev the biggest absolute signal amplitude without exceeding the range Lov The figure at the right shows this possibility But in this exam ple you would leave half of the possible resolution unused osv Input range Input It is much more efficient if you shift the signal on board to be range as symmetrical as possible and to acquire it within the best possible range 10v This results in a much better use of the converters resolution 1 On all acquisition boards from Spectrum you have the possi _ _ _ bility 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 So relat ed to the desired input range these signals have offsets of 100 For compensating such offsets you can use the offset reg ister for each channel separately If you want to compen sate the 100 offset of the outer left signal you would have to set the offset to 100 to compensate it Input range As the offset levels are
22. Os The extra I O option is useful if an external amplifier should be controlled any kind of signal source must be programmed an antenna must be adjusted a status information from external machine has to be obtained or different test signals have to be routed to the board 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 Channel direction Option XMF external connector The additional inputs and outputs are mounted on an extra bracket The direction of the 24 available digital lines can be programmed for every group of eight lines The table below shows the direction register and the possible values To combine the values so simply have to OR them bitwise Register Value Direction Description ee SPC_XIO_DIRECTION Defines bytewise the direction of the digital I O lines The values can be combined by a bitwise OR DOGO ses te deci dema 1 bt cano o Option XIO internal connector The additional inputs and outputs are available through an internal connector directely on the extra I O piggiback module The direction of the 16 available digital lines can be programmed for every group of eight lines The table below shows the direction register and the possible values To combine the values so simply have to OR them bitwise Register
23. Search Results The wizard has finished searching for driver files for your hardware device The wizard found a driver for the following device Hg MI 3020 Windows found a driver that is a closer match for this device than your current driver To install the driver Windows found click Next d driver win98_2k_xp spewdm inf lt Back A new driver version is direct ly installed from the device manager Therefore please open the properties page of the driver as shown in the sec tion before As next step click on the update driver button and follow the steps of the driver installation in a similar way to the previous board and driver installation Please select the path where the new driver version was unzipped to If you ve got the new driver version on CD please select the Driver Win98_2k_XP path on the CD containing the new driver version The new driver version can be used directly after installa tion without restarting the sy stem Please keep in mind to update the driver of all instal led Spectrum boards c Spectrum GmbH Upgrade Device Driver Wizard Install Hardware Device Drivers ae device driver is a software program that enables hardware device to work with Sy an operating system This wizard upgrades drivers for the following hardware device Hg MI 3020 Upgrading to newer version of a device driver may add functionality to or improve the perfor
24. Stops the board manually In this mode the board is started by writing the SPC START value to the command register All settings like for example the size of memory and postcounter the number of activated channels and the trigger settings must have been programmed before If the start command has been given the setup data is transferred to the board and the board will start If your board has relays to switch between different settings a programmed time will be waited to prevent having the influences of the relays settling time in the signal For additional information please first see the chapter about the relay settling time You can stop the board at any time with the command SPC STOP This command will stop immediately Once the board has been started it is running totally independent from the host system Your program has full CPU time to do any calculations or display The status register shown in the table below shows the current status of the board The most simple programming loop is simply waiting for the status SPC READY This status shows that the board has stopped automatically The read only status register can be read out at any time but it is mostly used for polling on the board s status after the board has been started However polling the status will need CPU time Status register Register Value Direcion Description O O SPER o Ines hat board has been sorted ond ia The following shortened excerpt of
25. a sample program gives you an example of how to start the board in classic mode and how to poll for the SPC_READY flag It is assumed that all board setup has been done before Starting with interrupt driven mode In contrast to the classic mode the interrupt mode has no need for polling for the board s status Starting your board in the interrupt driven mode does in the main not differ from the classic mode But there has to be done some additional programming to prevent the program from hanging The SPC STARTANDWAIT command doesn t return until the board has stopped Big advantage of this mode is that it doesn t waste any CPU time for polling The driver is just waiting for an interrupt and the System has full CPU time for other jobs To benefit from this mode it is necessary to set up a program with at least two different tasks One for starting the board and to be blocked waiting for an interrupt The other one to make any kind of calculations or display activities 46 MI 20xx Manual Standard acquisition modes Programming Command register Register Value Direction Description SPC_COMMAND 0 O Command register of the board SPC_STARTANDWAIT Starts the board with the current register settings in the interrupt driven mode SPC_STOP Stops the board manually 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
26. basic task before using the driver is to include the header files that are delivered on CD together with the board The header files are found in the directory Driver header_c Please don t change them in any way because they are updated with each new driver version to include the new registers and new functionality dlltyp h Includes the platform specific definitions for data types and function declarations All data types are based on this definitions The use of this typ definition file allows the use of examples and programs on different platforms without changes to the program source regs h Defines all registers and commands which are used in the Spectrum driver for the different boards The registers a board uses are described in the board spe cific part of the documentation spectrum h Defines the functions of the driver All definitions are taken from the file dlltyp h The functions itself are described below spcerr h Lists all and describes all error codes that can be given back by any of the driver functions The error codes and their meaning are described in detail in the appendix of this manul errors h Only there for backward compatibility with older program versions Please use spcerr h instead Example for including the header files Microsoft Visual C Include Driver The driver files can be easily included in Microsoft C by simply using the library file that is delivered together with the drivers The library file ca
27. be controlled any kind of signal source must be pro grammed an antenna must be adju sted a status information from external machine has to be obtained or different test signals have to be routed to the board Digital 1 0 Bit 15 0 Analog Outputs The additional inputs and outputs are not mounted on an extra brak ket but are available on an internal connector The figure shows the position of this connector on the bottom side of the extra O piggy back module 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 8 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 Each board is connected with a small ca ble of the same length even the ma ster board That minimises the clock skew between the different boards The figure shows the piggyback mo dule mounted on the base board schematically without any cables to achieve a better visibility Any board could be the clock ma ster and the s
28. board by it s retainer Now insert the board slowly into your computer This is done best with one hand each at both fronts of the board While inserting the board take care not to tilt the retainer in the track Please be very carefully when inserting the board in the slot as most of the mainboards are mounted with spacers and therefore might be damaged if they are exposed to high preasure After the board s insertion fasten the screw of the bracket carefully without overdoing Retainer n PCI Slot 1 A c Spectrum GmbH 13 Installing the board in the system Hardware Installation 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 Now insert the board and the extra bracket slowly into your computer This is done best with one hand each at both fronts of the board While inserting the board take care not to tilt the retainer in the track Please be very carefully when inserting the board in the slot as most of the mainboards are mounted with spacers and therefore might be damaged they are exposed to hi
29. card a error message will be returned Register Value Direction Description ___________________ SPC_TRIGGERMODE3 Sets the trigger mode for channel3 Channeltrigger must be activated with SPC_TRIGGERMODE So if you want to set up a four channel board to detect only a positive edge on channelO you would have to setup the board like the following example Both of the examples either for the CHANNEL and the triggermode do not include the necessary settigs for the triggerlevels These settings are detailed described in the following paragraphs IF you want to set up a four channel board to detect a triggerevent on either a positive edge on channell or a negative edge on channel3 you would have to set up your board as the following example shows 62 MI 20xx Manual Trigger modes and appendant registers Channel Trigger 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 After the data has been sampled the upper N data bits are compared with the N bits of the trigger levels The amount of bits the trigger levels are represented with depends on the board s series The following table shows the level registers and the
30. ce Seqmentize Pastriqged 1k c Spectrum GmbH 73 Trigger modes Option Multiple Recording Resulting start delays Activated channels Sample rate external TTL trigger internal trigger ext TTL trigger with internal trigger with 0 1 12 3 activated activated synchronization synchronization 20 samples 21 samples amples 18 samples o ____ e S samples Bopp p gt doe Pe res O hoe 20 samples A eieo bose 32 samples _______ The following example shows how to set up the board for Multiple Recording in standard mode The setup would be similar in FIFO mode but the memsize register would not be used 74 MI 20xx Manual Option Gated Sampling Recording modes 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 At the end of t the gate interval the recording will be stopped and the board will pause until another gates signal appears If the total amount of data to acquire ha
31. connected acquisition board is triggering for test results or error conditions of the device under test For the fact that the termination is set in factory the order of the syncronized boards cannot be changed by A the user Please refer to the boards type plate for details on the board s termination End boards are marked with the option cs end while middle boards are marked with the option cs mid When the boards are synchronized by the option cascading there will be a delay of about 500 ps between two adjacent Clock Master Channel 0 pee D Channel 1 z tt 1 L 1 1 The figure on the right shows the clocks of three cascaded 1 Chomel 0 boards with two channels each where one end board is de Channel 1 fined as a clock master Slave 1 is therefore a middle board and Slave 2 is the other end board The resulting delay bet Channel ween data of the two end boards is therefore about 1 ns Channel d V Fl FI Please keep in mind that the delay between the channels of two boards is depending on which board is actually set up as 500 ps 500 ps the clock master and what boards are directly adjacent to the master Synchronization with option starhub With the option starhub up to 16 Spectrum boards can be synchronized All boards are connected with a seperate synchronization cable from their sync connectors to the starhub module which is a piggy back mo
32. family there The examples are bus type independent As a result that means that the 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 28 MI 20xx Manual Software C C Driver Interface 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 Example of function loading definition of external function that has to be loaded from DLL typecer inclo SPCINITPCIBOARDS inclo pa ounti 2106152 par I erosion typedef 11 16 SPCSETPARAM 106 nNr int22 into2 lValue typedef intl16 SPCGETPARAM 11 16 nNr Reg 1032 plValie SPCINITPCIBOARDS pinspoclnztPClBosres SPCSETPARAM pinSpcSetParam SPCGETPARAM pfinSpcGetParam Search for dll LoadLibrary spectrum dil s Load functions from DLE prnspoclnitPClBoards SPCINITPCIBOARDS GetProcAddress hDLL SpelnuitPCIlBoards pfnSpcSetParam SPCSETPARAM GetProcAddress hDLL SpcSetParam pfnSpcGetParam SPCGETPARAM GetProcAddress hDLL SpcGetPara
33. mode to software so that the recording replay starts immediately In addition to the softwaretrigger free run it is also possible to force a triggerevent by software while the board is waiting for an internal or external trigger event Therefore you can use the board command shown in the following table Register Direction Description ____ ____6_____ _ __ ____ _ SPC_COMMAND oo o Command register of the board SPC_FORCETRIGGER Forces a trigger event if the hardware is still waiting for a trigger event Needs a base board hardware version gt 7 x Due to the fact that the software trigger is an internal trigger mode you can optionally enable the external trigger output to generate a high active trigger signal which indicates when the data acquisition or replay begins This can be useful to synchronize external equipment with your Spectrum board Value Direction Description _ _______ 9 9 ____ SPC_TRIGGEROUT 40100 Defines the data direction of the external trigger connector 0 The trigger connector is not used and the line driver is disabled The trigger connector is used as an output that indicates a detected internal trigger event Example for setting up the software trigger External TTL trigger Enabling the external trigger input is done if you choose one of the following external trigger modes The dedicated register for that operation is shown below Register Value D
34. on the timestamp data format below A c Spectrum GmbH 79 Reading out timestamp data Option Timestamp Reading out all the timestamps with SpcGetData When using the function SpcGetData the data stored in the timestamp FIFO will be read out in one block by the driver The usage of the function SpcGetData is described in the relating section earlier in this manual The following list does only show the different parameters in a very short way SpcGetData nr ch start len data nr Number of the board Windows Linux users please refer to the Driver section for differences using linux ch Channel to be read out Must be set to CH_TIMESTAMP 9999 to access timestamp FIFO start Differing from the standard use this parameter gives back the number of actually read timestamps and therefore needs to be a poin ter Please refer to the example at the end of this chapter len Number of timestamps that fit in the data buffer and so defines the number of timestamps to be read out data Huge buffer for the read out timestamps that must have at least enough space for 8 len bytes It might be that you try to read out more timestamps than there actually are in the timestamp FIFO bacause you don t know how many trigger events have been detected Please make use of the value given back by the parameter start to get to know what parts of your buffer contain valid timestamps Data format Each timestamp is 56 bit long and internally mapp
35. possible values they can be set to for your specific board 6 bit resolution for the trigger levels Register Value ___ Direction Description Range __ In the above table the values for the triggerlevels represent the digital values for the corresponding data width N of the triggerlevels If for example the triggerlevels are represented by 8 bit the bipolar range would be 128 127 To archieve symmetric triggerlevels the most negative value is not used and the so resulting range would be 127 127 As the triggerlevels are compared to the digitized data the triggerlevels depend on the channels input range For every input range available to your board there is a corresponding range of triggerlevels On the different input ranges the possible stepsize for the triggerlevels differs as well as the maximum and minimum values The following table gives you the absolute triggerlevels for your specific board s series Resulting ranges of the 6 bit trigger level resolution Input ranges Triggerlevel 50 mV 100 mV 200 mV 500 mV 1V 2 V 5 V 48 4 mV 96 9 mV 193 8 mV 484 4 mV 968 8 mV 41937 5 mV 4843 8 mV 446 9 mV 393 8 mV 4187 5 468 8 mV 4937 5 mV 1875 0 mV 4687 5 mV 25 0 mV 50 0 mV 100 0 mV 250 0 mV 500 0 mV 1000 0 mV 2500 0 mV 412 5 mV 331 8 mV 462 5 mV 4125 0 mV 4312 5 mV lo foom oom oom oom oom oom 25 0 mV 50 0 mV 100 0 mV 250 0 mV 500 0 mV 1000 0 mV 2500 0 m
36. rate the board can achieve As with PLL mode it s also possible to set a desired sample rate and read it back The result will then again be the best matching sample rate Available divider values 2 4 8 10 16 20 40 50 80 100 200 400 500 800 1000 2000 External reference clock Register Value Direction Description _ _ _6__ _____ _6____ SPC_REFERENCECLOCK 20140 Programs the external reference clock in the range from 1 MHz to 125 MHz feo Internal reference is used for internal sample rate generation External sample rate in Hz as an integer value External reference is used You need to set up this register exactly to the frequency of the external fed in clock If you have an external clock generator with a extremly stable frequency you can use it as a reference clock You can connect it to the external clock connector and the PLL will be fed with this clock instead of the internal reference Due to the fact that the driver needs to know the external fed in frequency for an exact calculation of the sample rate you must set the the SPC_REFERENCECLOCK register accordingly The driver automatically sets the PLL to achieve the desired sample rate Therefore it examines the reference clock and the sample rate registers Example of reference clock Termination of the clock input If the external connector is used as an input either for feeding in an external reference clock or for external clocking you can enable a 50 Ohm term
37. relatively to the related input range you have to calculate and set your offset again when changing the input s range The table below shows the offset registers and the possi m a 5 ae i Signal ble offset ranges for your specific type of board 100 76 50 76 0 50 100 Driver 100 50 0 50 100 Register Direction Description SPC_OFFSO 30000 Defines the input s offset and therfore shifts the input of channelO 400 in steps of 1 SPC OFFSI 30100 Defines the input s offset and therfore shifts the input of channell 400 in steps of 1 SPC OFFS2 30200 Defines the input s offset and therfore shifts the input of channel2 400 in steps of 1 SPC OFFS3 30300 Defines the input s offset and therfore shifts the input of channel3 400 in steps of 1 When writing a program that should run with different board families it is useful to just read out the possible offset than can be programmed You can use the following read only register It will give you the maximum relative offset in percentage as an interger value Register Value Direction Description ___________________________ SPC READMAXOFFSET 3100 Reads out the maximum offset that can be used to compensate an signal offset To give you an example how the registers of the input range and the input offset are to be used the following example shows a setup to match all of the four signals in the second input offset figure to mat
38. rising and falling edges of an ex ternal TTL signal The board will trigger on the first rising or falling edge that is detected after starting the board The next triggere vent will then be detected if the actual recording replay has fi nished and the board is armed and waiting for a trigger again Triggerevent Triggerevent Value Direction Description _____ __ _ __ __________ SPC_TRIGGERMODE 40000 Sets the triggermode for the board TM_TTLBOTH 20030 Sets the trigger mode for external TTL trigger to detect positive and negative edges Pulsewidth triggers TIL pulsewidth trigger for long HIGH pulses This mode is for detecting HIGH 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 The board will trigger on the first pulse matching the trigger condition after starting the board The next triggerevent will then be detected if the actual recording replay has finished and the board is armed and waiting for a trigger again Pulsewidth Pulsewidth Triggerevent Register Value Direction Description SPC_PULSEWIDTH 44000 Sets the pulsewidth in samples Values from 2 to 255 are allowed SPC_TRIGGERMODE 40000 Sets the triggermode for the board TM_TTLHIGH_LP 20001 Sets the trigger mode for external TTL trigger to detect HIGH pulses that are longer than a programmed pulsewidth
39. the FIFO mode is allways interrupt driven As result the FIFOSTART function will not return until the first software buffer is transferred For that reason it is absolutely necessary to start different threads for each board that runs synchronuously in FIFO mode If this is not done a deadlock will occur and the pro gram will not start properly 10 Start all of the trigger master boards After having armed the synchronized boards you must start all of the boards that are defined as trigger masters Register Value Direction Description eee SPC_COMMAND ____ Command register of the board SPC_FIFOSTART Starts the board with the current register settings in FIFO mode and waits for the first interrupt This example shows how to set up three boards for synchronization in FIFO mode Board 0 is clock master and board 2 is trigger master d i trigger synchronization of trigger master board s SpcSetParam hDrv 2 SPC COMMAND SPC SYNCTRIGGERMASTER board 2 set trigger master if trigger Synchronization of trigger slave boards Parani SPC COMMAND SPC SYNCTRIGGERSLAVE as trigger slaves oposetParam hDrwv l1 SPC COMMAND SPC SYNCTRIGGERSLAVE as trigger slaves P6 synchronization information for clock master board opooetParam 01 SPC COMMAND SPC SYNCMASTERF IPO Py synchronization information tor clock slave boards opooetParam hDrw l SPC COMMAND
40. the PC to the board generation r1 boards Therefore the on board memory of the board is used HROBbd as a continuous buffer On the PC the data can be used for any calculation or can be written to hard disk while recording START Mgs SPC STOP is running acquisition boards or the data can be read from hard disk and calculated online before writing it to the board 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 Details on this can be found in the appropriate chapters about the options Background FIFO Read lt Trigger Hardware Y Software Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt SW Buf 0 SW Buf 1 SW Buf 2 SW Buf 3 SW Buf 0 Application Software Processing the 4 Software Buffers and releasing them with SPC_FIFOBUFREADY On the hardware side the board memory is spilt in two buffers of the same length These buffers can be up to half of the on board memory in size In addition to the hardware buffers the driver holds up to 256 software buffers of the same length as the hardware buffers are Whe never a hardware buffer is full with data
41. the PC you can hook up the boards with their synchronization cables first If there is enough space in your computer s case e g a big tower case you can also mount the boards first and hook them up afterwards Spectrum ships the boards together with the needed amount of synchronization cables All of them are matched to the same length to achieve a zero clock delay between the boards Only use the included flat ribbon cables All of the boards including the board that carrys the starhub piggy back module must be wired to the starhub as the figure is showing ex emplarily for three synchronized boards It does not matter which of the 16 connectors on the starhub module you use for which board The software driver will detect the types and order of the synchronized boards automatically The figure shows the three cables mounted next to each other only to achieve a better visi bility As some of the synchronization cables are not secured against wrong plugging you should take Sync cable care to have the pin 1 markers on the multiple connectors and the cable on the same side as the figure on the right is showing Pin 1 markers Syne connector onboard Mounting the wired boards Before installing the boards 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 boards afterwards All Spectrum boards require a full
42. the board with the current register settings SPC_STARTANDWAIT Starts the board with the current register settings in the interrupt driven mode For details on how to start the board in the different modes in standard mode non FIFO please refer to the according chapter earlier in this manual If using the interrupt driven mode SPC_STARTANDWAIT it is necessary to start each board in it s own software thread This is necessary because the function does not return until the board has stopped again If not using A different threads this will result in a program deadlock Example of starting trigger slave boards Board number 2 is trigger master c Spectrum GmbH 87 The setup order for the different synchronization options Synchronization Option 10 Start all of the trigger master boards After having armed the synchronized boards you must start all of the boards that are defined as trigger masters Register Value Direction Description SPC COMMAND Ow Command register of the board SPC_START 10 ___ Starts the board with the current register settings SPC_STARTANDWAIT Starts the board with the current register settings in the interrupt driven mode For details on how to start the board in the different modes in standard mode non FIFO please refer to the according chapter earlier in this manual If you use the synchronization OR with the starhub option it is important to start the board carrying
43. the hardware generates an interrupt and the driver transfers this hardware buffer to the next software buffer that is available While transfering one buffer to the PC the other one is filled up with data The driver is doing this job automatically in the background After the driver has finsihed transferring the data the application software gets a signal and can process data e g stores data to hard disk or makes some calculations After processing the data the application software tells the driver that he can again use the software buffer for acquisition data This two stages buffering has big advantages when running FIFO mode at the speed limit The software buffers extremly expand the acquisi tion time that can be buffered and protects the whole system against buffer overruns SPC_FIFOSTART Speed Limitations The FIFO mode is running continuously all the time Therefore the data must be read out from the board data acquisition or written to the board data generation at least with the same speed that it is recorded replayed If data is read out from the board or written to the board slower the hardware buffers will overrun at a certain point and FIFO mode is stopped One bottleneck with the FIFO mode is the PCI bus The standard PCI bus is theoretically capable of transferring data with 33 MHz and 32 Bit As a result a maximum burst transfer rate of 132 MByte per second can be achieved As several devices can share the PCI bus this maximum
44. transfer rate is only available to a short transfer burst until a new bus arbitration is necessray In real life the continuous transfer rate is limited to approximately 100 110 MBytes per second The maximum FIFO speed one can achieve heavily depends on the PC system and the operating system and varies from system to system The maximum sample rate one can run in continuous FIFO mode depends on the number of activated channels c Spectrum GmbH 49 Programming FIFO Mode Theoretical maximum sample rate PCI Bus Throughput 1 Channel 100 MS s 1 Channel x 1 Byte per sample 100 MS s 100 MB s 2 Channels 50 MS s 2 Channels x 1 Byte per sample 50 MS s 100 MB s 4 Channels 25 MS s 4 Channels x 1 Byte per sample 25 MS s 100 MB s 8 Channels 12 5 MS s 8 Channels x 1 Byte per sample 12 5 MS s 100 MB s When using FIFO mode together with one of the options that allow to have gaps in the acquisiton like Multiple Recording or Gated Sampling one can even run the board with higher sample rates It just has to be sure that the average sample rate calculated with acquisition time and gap does not exceed the above mentioned sample rate limitations The sample rate that can be run in one of these mode is depending on the number of channels that have been activated Due to the internal structure of the board this is limited to a internal throughput of 250 MB s 250 MS s Maximum sample rate that can be programmed Internal throughput 1
45. value accordingly Normally you do not need this information but if you have a support question please provide the revision within Register Value Direction Description Oi __6__ 9_ ____ _6_ _ _ ______ SPC_PCIDATE 2020 Production date year in bit 31 16 month in bit 7 0 bit 15 8 are not used Serial number This register holds the information about the serial number of the board This numer 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 Register Value Direction Description ooo SPC_PCISERIALNO 2030 Serial number of the board Maximum possible sample rate This register gives you the maximum possible samplerate the board can run however The information provided here does not consider any restrictions in the maximum speed caused by special channel settings For detailed information about the correlation between the maximum samplerate and the number of activated chanels please refer th the according chapter Value ___ Direction Description ____________ SPC_PCISAMPLERATE 2100 Maximum samplerate in Hz as a 32 bit integer value Installed memory This register returns the size of the installed on board memory in bytes as a 32 bit integer value If you want to know the ammount of samples you can store you must regard the size of one sample of your Spect
46. 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 41 So tute dM e oe et 4 Important note On channels SE Re 4 SEMI Werte MOU E NON RENE Tm c 42 ORG rc LE 42 JST ET ENTE DLL 43 E 44 Automatica Gadiustment Ot offset setings soises edu Meam 44 Standard acquisition modes 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 45 Mr fe dile 191 45 FOG Tec 45 Memory Presahs Post IQge 45 witbiogt Tnlerrepl classic mode 46 Starting withdnfemmepbariven mode 46 Dal organi rE Cu IM P AN 47 ROM m 47 Reading Our Medaki With SOC _ _ _ 47 FIFO _ ___ ieee 49 UU ee ENEMIES 49 General bailes i malas ti
47. 7030 r Reads out the start time of the RefClock mode Return value is the number of seconds since midnight 00 00 00 January 1 1970 which is the standard time t in C C Timestamp Status The timestamp module has its own status register for the timestamp FIFO You can easily read out the FIFO status with the help of the timestamp status register shown in the table below Register Value Direcion Description _______________________ o WemeempffOWsMemy S sprosas i There oe volves in frestmp FIFO han haoro Ea EE TS OVERFLOW 3 Th timestamp FIFO is full and possibly data has been lost Reading out timestamp data Functions for accessing the data There are two possibilities to access the timestamps that have been stored in the timestamp FIFO Reading out a single timestamp You can read out one 32 bit value from the timestamp FIFO by using the register shown in the table below Register Value Direction Description SPC_TIMESTAMP_FIFO 47040 Get one 32 bit value from the timestamp FIFO If the FIFO is empty a zero will be returned Because accessing the timestamp with this function will be done with single accesses getting the value s this way is much slower than using the SpcGetData function as described below Using this function will not give you back a whole timestamp as the timestamp values are wider than 32 bit Please also refer to the section
48. BUPPERS nBufIdx 0 while BRR OOK 90 MI 20xx Manual Synchronization Option Additions for synchronizing different boards 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 All clock rates of all synchronized boards are derived from the clock signal that is distributed via the sync bus This clock is the sum samplerate of one module of the clock master board Based on this speed the clock rates of the slave boards can be set As these clock rates are divided from the sync clock the board with the maximum sum sample rate should be set up as clock master Calculating the clock dividers The sum sample rate can easily be calculated by the formula on the right SumSampleRate SampleRate ActChPerModule The value for the sample rate of board N must contain the actual desired i conversion rate for one channel of board N Please refer to the dedicated chapter in the board s manual to get informed about the relation beween the board model and the number of actually activated channels per mo dule for the different channel setups As mentioned above the board with the highest sum sample ra
49. Cab 3 9m 200 Adapter cable SMB female to BNC male 200 cm Adapter cable SMB female to BNC female 80 cm Cab 3 9F200 Adapter cable SMB female to BNC female 200 cm Order No MI2xxx 32M MI2xxx 64M MI2xxx 128M MI2xxx 256M MI2xxx 5 12M MI2xxx up MI2xxx mr MI2xxx gs MI2xxx cs MI20xx dl MI20xx hp 20 MATLAB MI 20xx Manual Description Option 32 MSample memory instead of 16 MSample standard mem Option 64 MSample memory instead of 16 MSample standard mem Option 128 MSample memory instead of 16 MSample standard mem Option 256 MSample memory instead of 16 MSample standard mem Option 512 MSample memory instead of 16 MSample standard mem Additional handling costs for later memory upgrade Option Multiple Recording Memory segmentation Option Gated Sampling Gate signal controls acquisition Synchronisation of 2 4 boards one option per system DASYLab driver for 20 series VEE driver for MI 20xx series LabVIEW driver for MI 20xx series MATLAB driver for all 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 co
50. Channel 250 MS s 1 Channel x 1 Byte per sample x 250 MS s 250 MB s 2 Channels 125 MS s 2 Channels x 1 Byte per sample x 125 MS s 250 MB s 4 Channels 62 5 MS s 4 Channels x 1 Byte per sample x 62 5 MS s 250 MB s 8 Channels 31 25 MS s 8 Channels x 1 Byte per sample x 31 25 MS s 250 MB s Programming The setup of FIFO mode is done with a few additional software registers described in this chapter All the other settings can be used as des cribed before In FIFO mode the register SPC_MEMSIZE and SPC_POSTTRIGGER are not used Software Buffers This register defines the number of software buffers that should be used for FIFO mode The number of hardware buffers is always two and can not be changed by software Register Value Direction Description SPC_FIFO_BUFFERS 60000 Number of software buffers to be used for FIFO mode Value has to be between 2 and 256 When this manual was printed there are a total of 256 buffers possible However if there are changes and enhancements to the driver in the future it will be informative to read out the number of buffers the new driver version can hold Register Value Direction Description SPC_FIFO_BUFADRCNT 60040 Read out the number of available FIFO buffers The length of each buffer is defined in bytes This length is used for hardware and software buffers as well Both have the same length The maximum length that can be used is depending on the installed on board memory Regi
51. FIFO mode please refer to the according chapter earlier in this manual Register Value Direction Description SPC_GATE 220400 Enables Gated Sampling mode Trigger modes General information and trigger delay Not all of the board s trigger modes can be used in combi nation with Gated Sampling All possible trigger modes are pd pep pau p listed below Depending on the different trigger modes the chosen sample rate the used channels and activated board synchronisation see according chapter for details about synchronizing multiple boards there are different delay times between the trigger event and the first sampled data see figure This start delay is necessary as the board is equipped with dynamic RAM which needs refresh cycles to keep the data in memory when the board is not recording It is fix for a certain board setup All possible delays in sam ples between the trigger event and the first recorded sample Data in memory are listed in the table below A negative amount of samples indicates that the trigger will be visible isis hlemsize Sk c Spectrum GmbH 75 Trigger modes Option Gated Sampling Due to the structure of the on board memory there is another delay at the end of the gate interval Internally a gate end signal can only be recognized at e an eight samples alignment So depending on what time your external gate signal will leave the progra
52. GERMODE 40000 CHANNEL 20040 SPC TRIGGERMODEO 40200 TM CHXNEG SP 10012 SPC HIGHLEVELO 42000 Set it to the desired triggerlevel relatively to the channel s input range board dependant SPC PULSEWIDTH 44000 Set to the desired pulsewidth in samples 2 to 255 c Spectrum GmbH 67 Channel Trigger Trigger modes and appendant registers Channel steepness trigger for flat 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 If the signal does cross the upper level within the the programmed pulsewidth time no trigger will be detected If the pulsewidth counter reaches the programmed amount of samples a triggerevent will be detected Triggerevent Register Value Direction 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 Channel steepness trigger for flat negative pulses The analog input is continuously sampled with the selected sample rate If the programmed upper level is crossed by the channel s signal from higher to lower values falling edge the pulsewidth counter is started If the signal does cross the lower level within the the programmed pulsewidth time no trigger will be detected If the puls
53. LS ty 7 on semen een ee ee tee E C 8 sod eximere RN nem 8 gt 8 uc AC ENR ARAN IE NT ELA MA 9 ace ea teeta cen ee cata in cael Re ec 9 ype enn ee OE 10 eR D D I D E DM ML Im tr ICE CE KDE 11 Block diagrames DD moe 11 aita s ir eRe er ere mee ttre IL ALLEM DA S 11 Dvnainic Paramelels ceste ta fe ote ode Hu E aN 12 12 Eae dI _ ___ __ ____ _ ads 13 lat wath tse ta alte he Oh aN eaten cae da ol eet 13 EOD Precdullofisc setis denote tate aa toad 13 Cooling PRECAUTIONS EM earns oasis LEM ERE A 13 ra SIO etek aot 13 installing the BIET 13 Installing 91 Board without 13 GD OGG OUT ttes a ors imt dg a 14 Installing a board with extra 1 0 Option XMF
54. S s 10 MS s Enabled channels per module 4 2 Sum sample rate 40 MS s 20 MS s Therefore this board is set up to be the clockmaster Sync speed 40 MS s 40 MS s Clock divider 2 Divided sum clock 40 MS s 20 MS s Enabled channels per module 4 2 Conversion speed 10 MS s 10 MS s Example calculation with synchronous speed where master clock is divided Board type 3025 3131 Channels available 2 x 12 bit A D 4 x 12 bit A D Desired sample rate 20 MS s 20 MS s Enabled channels per module 1 2 Sum sample 20 MS s 40 MS s Therefore this board is set up to be the clockmaster Sync speed 40 MS s 40 MS s Clock divider 2 1 Divided sum clock 20 MS s 40 MS s Enabled channels per module 1 2 Conversion speed 20 MS s 20 MS s 92 MI 20xx Manual Synchronization Option Additions for synchronizing different boards 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 Now you can easily generate divided clock rates on the slave boards by setting their dividers to according values of the divider list Please keep in mind that only the dedicated divider values mentioned in the list above can be used to derive the sample
55. SSYSTEM YMM32 XD ntkem v d ENWINDOWSSSYSTEMNSPCSTDNT DLL CAWINDOWS SYSTEM SPECTRUM DLL Driver Update the support team to help finding a fast solution If a new driver version is to be installed no Spectrum board should be in use So please stop and exit all software that could access the boards New drivers are available at http www spectrum instrumentation com After down loading the driver unzip it to a temporary folder Update Device Driver Wizard Update Device Driver Wizard E Driver win98_2k_ P lt Back Update Device Driver Wizard A new driver version is directly in stalled from the device manager Therefore please open the properties page of the driver as shown in the section before As next step click on the update driver button and follow the steps of the driver installation in a similar way to the previous board and driver installation Please select the path where the new driver version was unzipped to If you ve got the new driver version CD please select the NDriverNWin98 2k XP path on the CD containing the new driver ver sion Update Device Driver Wizard Update Device Driver Wizard The new driver version can be used directly after installation without restarting the system Please keep in mind to update the driver of all installed Spectrum boards c Spectrum GmbH 19 Windows 2000 Windows 2000 Installation Found New Hardware Wiz
56. V 30 ______ 46 9 mV 93 8 mV 187 5 mV 468 8 mV 937 5 mV 1875 0 mV 4687 5 mV 48 4 mV 96 9 mV 193 8 mV 484 4 mV 968 8 mV 1937 5 mV 4843 8 mV Fees sv KIT INN 15 6 mV 31 3 mV 62 5 mV 156 3 mV The following example shows how to set up a one channel board to trigger on channelO s rising edge It is asumed that the input range of channelO is set to the the 200 mV range The dezimal value for SPC HIGHLEVELO corresponds then with 75 6 mV wich is the resulting triggerlevel 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 runtime The register is shown in the following table Register Value Direction Description a SPC_READTRGLVLCOUNT 2500 Contains the number of different possible trigger levels In case of a board that uses 8 bits for trigger detection the returned value would be 255 as either the zero and 127 positive and negative values are possible c Spectrum GmbH 63 Channel Trigger Trigger modes and appendant registers The resulting trigger step width in mV can easily be calculated from the returned Input Range lt max Input Range nin value It is assumed that you kno
57. ______________ Value Direction Description SPC FIFO BUFCOUNT 60020 Number of transferred buffers until now If one knows before starting FIFO mode how long this should run it is possible to program the numer of buffers that the driver should process After transferring this number of buffer the driver will automatically stop If FIFO mode should run endless a zero must be programmed to this register Then the FIFO mode must be stoped by the user Register Value Direction Description a SPC FIFO BUFMAXCNT 60030 Number of buffers to be transferred until automatic stop Zero runs endless c Spectrum GmbH 5 Programming FIFO Mode FIFO mode In normal applications the FIFO mode will run in a loop and process one buffer after the other There are a few special commands and regi sters for the FIFO mode SPC_COMMAND Eme Allowed values for FIFO mode are listed below SPC FIFOSTART Starts the FIFO mode and waits for the first interrupt SPC FIFOWAIT Waits for the next buffer interrupt SPC STOP 20 Stops the FIFO mode The start command and the wait command both wait for the signal from the driver that the next buffer has to be processed This signal is generated by the driver on receiving an interrupt from the hardware While waiting none of these commands waiste cpu power no polling mode If for any reason the signal is not coming from the hardware e g trigger is not found the FIFO mode must be stopped fr
58. al The figure shows the piggyback module installed on the on board expansion slot The shown option is mounted exemplarily on a board with two modules It is not possible to use this option together with the star hub or extra I O option because the is just space for one piggyback module on the on board expansion slot c Spectrum GmbH 9 The Spectrum type plate Introduction The Spectrum e plate mem 8 MS opt mr xmf V09 06 22 04 The Spectrum type plate which consists of the following components can be found on all of our boards 1 The board type consisting of the two letters describing the bus in this case MI for the PCI bus and the model number 2 The size of the on board installed memory in MSamples In this example there 8 MS 16 MByte installed 3 The serial number of your Spectrum board Every board has a unique serial number 4 The board revision consisting of the base version and the module version 5 list of the installed options A complete list of all available options is shown in the order information In this example the options Multiple recording and Extra O with external outputs are installed 6 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 10 MI 20xx Man
59. ame or any other board could be the trigger master All trigger modes that are available on the master board are also available if the synchronisation star hub is used The cable connection of the boards is automatically recognised and checked by the driver at load time So no care must be taken on how to cable the boards The programming of the star hub is included in the standard board interface and consists of only 3 additional commands It is not possible to use this option together with the timestamp or extra I O option because the is just space for one piggyback module on the on board expansion slot Timestamp The timestamp module was desi gned to record the exact time infor mation between trigger events The timestamp reset command sets an internal counter to zero The counter is running with the same re solution as the sample rate On each trigger event a timestamp is recor ded in an extra FIFO The recorded timestamps are read out asynchro nously to the board sampling If the absolute time information is of interest it is possible to synchronise the timestamp counter with a 1 Hz seconds signal of a radio clock or a GPS receiver In that case the 64 bit timestamp information is split up in two parts The one part counts the number of seconds starting with the reset command the other part is set to zero on every rising edge of the seconds signal and specifies the exact time position in relation to the seconds sign
60. and that it still fulfills the clock input specification as given in teh technical data section Register Value Direction Description _ _6__ __ _ 6__ __ SPC_CLOCK50OHM 20120 r w A 1 enables the 50 Ohm termination at the external clock connector Only possible when using the external connector as an input Minimum external sample rate The minimum external sample rate is limited on all boards to 1 MHz 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 Maximum external samplerate in MS s An external sample rate above the mentioned maximum can cause damage to board Ranges for external sample rate Due to the internal structure of the board it is essential to know for the driver in which clock range the external clock is operating The external range register must be set according to the clock that is fed in externally Register Value Direction Description _______ _ ___ _6_ ____ ____ SPC_EXTERNRANGE ERANGEBURSTM ____ 8 External Range Burst External Range Burst X EXRANGE_BURST_XL External Range Burst XL The range must not be left by more than 5 when the board is running Remember that the ranges depend on the activated channels as well so a different board setup for external clocking must always include the related clock ranges This table below shows the ranges that are
61. arameter name hDrv Windows users simply have to set the parameter to the according board number as the example below is showing while Linux uses can easily use the handle that is given back for the according board by the initialization function Error handling If one action caused an error in the driver this error and the register and value where it occurs will be saved The driver is then locked until the error is read out using the SPC_LASTERRORCODE function All other functions will lead to the same errorcode unless the error is cleared by reading SPC_LASTERRORCODE 36 MI 20xx Manual Programming the Board Initialization 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 The following table shows all the error related registers that can be read out Description SPC_LASTERRORCODE 999999 r Error code of the last error that occured The errorcodes are found in spcerr h If this register is read the driver will be unlocked SPC_LASTERRORREG 999998 Software register that causes the error SPC_LASTERRORVALUE 999997 The value that has been written to the faulty software register The error codes are described in detail in the appendix Please refer to this error description and the descrip tion of the s
62. ard Welcome to the Found New gt Hardware Wizard This wizard helps you install a device driver for a hardware device To continue click Next lt Back Found New Hardware Wizard Locate Driver Files tae Where you want Windows to search for driver files Sy Search for driver files for the following hardware device Hj MI 3020 The wizard searches for suitable drivers in its driver database on your computer and in any of the following optional search locations that you specify To start the search click Next If vou are searching on a floppy disk or CD ROM drive insert the floppy disk or CD before clicking Next ptional search locations Fio 5 VES Specify a location Microsoft Windows Update NM Found New Hardware Wizard Driver Files Search Results Fata The wizard has finished searching for driver files for your hardware device Sy The wizard found a driver for the following device Be MI 3020 Windows found a driver for this device To install the driver Windows found click Next ciwinntinfoem3 inf 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 Let Windows search automa tically for the b
63. ase do a complete reinstallation of the hardware driver This error normally only occurs if someone copies the dll manually to the system direc tory ERR_HWDRVVERSION 7h 7 The hardware needs a newer driver version to run properly Please install the driver that was delivered toge ther with the board ERR_LASTERR 10h 16 Old Error waiting to be read Please read the full error information before proceeding The driver is locked until the error information has been read ERR_ABORT 20h 32 Abort of wait function This return value just tells that the function has been aborted from another thread ERR_BOARDLOCKED 30h 48 Access to driver already locked by another program Stop the other program before starting this one Only one program can access the driver at the time ERR_REG 100h 256 The register is not valid for this type of board ERR_VALUE 101h 257 The value for this register is not in a valid range The allowed values and ranges are listed in the board spe cific documentation ERR_FEATURE 102h 258 Feature option is not installed on this board It s not possible to access this feature if it s not installed ERR_SEQUENCE 103h 259 Channel sequence is not allowed ERR_READABORT 104h 260 Data read is not allowed after aborting the data acquisition ERR NOACCESS 105h 261 Access to this register denied No access for user allowed ERR POWERDOWN 106h 262 Not allowed if powerdown mode is activated ERR TIMEOUT 107h 263 A timeout occured whi
64. ative to a fixed time zero point or synchronized to an external radio clock This is done by a wide resetable counter that is incremented with every sample rate With every detected trigger event the actual counter value is stored in a seperate timestamp memory This function is designed as an enhancement to the Multiple Recording and the Gated Sampling mode but can also be used without these options If Gated Sampling mode is used then both the start and end of a recorded segment are timestamped The timestamp memory is designed as a FIFO buffer so that it can be read out even while the Spectrum board is recording data continuously to the PC in the FIFO mode This extra memory is 64 K Timestamps in size Each recorded timestamp consists of the number of samples that has been counted since the last _ Timestamp counter reset has been done The actual time from the point since the last reset has been done so Sample rate can easily be calculated by the formular besides If you want to know the time between two timestamps you can simply calculate this by the for Timestamp Timestamp At mular besides Sample rate Timestamp modes Standard mode In standard mode the timestamp counter is set to zero once by writing TS RESET commando to com Command rsseser _ sec starr mand register After that command the counter counts Board recording continuously The timestamps of all recorded t
65. ble types to cover different operating systems and to use the same driver interface for all programming languages Under Delphi it is necessary to define these types once This is also shown in the examples delivered on CD Delphi type definition In the example shown above the size of data is defined to smallint This definition is only valid for boards that have a sample resolution of 12 14 16 bit On 8 bit boards this has to be shortint type Include Driver To include the driver functions into delphi it is necessary to first add them to the implementation section of the program file There the name of the function and the location in the dll is defined Driver implementation Examples Examples for Delphi can be found on CD in the directory Examples delphi There is one subdirectory for each board family You ll find board specific examples for that family there The examples are bus type independent As a result that means that the MI3Oxx directory con tains examples for the MI 30xx the MC 30xx and the MX 30xx families The example directories contain a running project file for Borland Delphi that can be directly loaded and compiled Driver functions The driver contains five functions to access the hardware Function SpclnitPClBoard This function initializes all installed PCI PXI and CompactPCI boards The boards are recognized automatically All installation parameters are read out from the hardware an
66. ch the desired input range Therefore every one of the four channels is set to the input range of 1 0 V After that the four offset settings are set exactely as the offsets to be compensated but with the the opposite sign The result is that all four channels match perfectely to the choosen input range c Spectrum GmbH 43 Setting up the inputs Analog Inputs Input termination All inputs of Spectrum s analog boards can be terminated separately with 50 Ohm by software programming If you do so please make sure that your signal source is able to deliver the higher output currents If no termination is used the inputs have an impedance of 1 Megaohm The following table shows the corresponding register to set the input termination Register Value Direcion Description ______________________________ SPC 500HMO 30030 A 1 sets the 50 ohm termination for channelO sets the termination to MOhm SPC 50OHMI 30130 uw A 1 sets the 50 ohm termination for channell A sets the termination to MOhm SPC 50 2 30230 1 sets the 50 ohm termination channel2 A sets the termination to MOhm 5 50OHM3 Iw ____ 1 sets the 50 ohm termination for channel3 A 0 sets the termination tol MOhm Automatical adiustment of the offset settin All of the channels are calibrated in factory before the board is shipped These settings are stored in the on board EEProm under the d
67. chro nized boards The outer boards have a soldered termination for the sync bus These boards are marked with an additional sticker Only mount the cluster of synchronized boards in a row with the dedicated boards on the outer sides Mounting the wired boards Before installing the boards 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 boards afterwards All Spectrum boards require a full length PCI slot with a track at the backside to guide the board by it s retainer Now insert the boards slowly into your computer This is done best with one hand each at both fronts of the board While inserting the boards take care not to tilt the retainers in the tracks Please be very carefully when inserting the boards in the PCI slots as most of the mainboards are mounted with spacers and therefore might be damaged if they are exposed to high preasure 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 8 _ Sync Cable i H Th ke d C CT amp Retainer LILILILI A amp Slots 16 MI 20xx Manual Software Driver Installation Interrupt Sharing Software Driver Installation Before using the board a driver must be in
68. connections to your type of equipment or DUT device un der test The pin assignment is given in the table in the according chapter of the appendix cable B c Spectrum GmbH 95 Pin assignment of the internal multipin connector Pin assianment of the internal multipin connector The 26 lead internal connector is used for the option Extra I O XIO without the Extra I O external connector described before piggy back module Y PCI carrier board The connector mentioned here is mounted on the bottom side of the Extra I O modu le Extra I O with internal connector Option XIO Pin2 Pind Pin Pin PinlO 12 14 16 18 20 Pin22 Pin24 Pin26 A2 GND 014 012 08 GND 06 04 02 Pinl Pin3 Pin5 Pin7 9 Pinll 13 15 17 Pinl9 21 23 Pin25_ AB GND 015 013 09 GND 07 05 03 GND are the pins for analog outputs while D15 DO are 16 digital Os 96 MI 20xx Manual
69. d Register Value Direction Description SPC_EXTERNOUT 20110 Enables clock output on external clock connector Only possible with internal clocking old name SPC_CLOCKOUT 20110 Enables clock output on external clock connector Only possible with internal clocking new name Example on writing and reading internal sample rate Minimum internal sample rate The minimum internal sample rate is limited on all boards to 1 kHz 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 54 MI 20xx Manual Clock generation Internally generated sample rate Maximum internal sample rate in MS s 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 For these cases the Spectrum boards have the opportunity to switch off the PLL by software and use a simple clock divider Register Value Direction Description __ _6 __ __ _ _6_ _ ____ __ SPC_PLL_ENABLE 20030 1 enables the PLL mode default or disables it by writing a to this register The sample rates that could be set are then limited to the quartz speed divided by one of the below mentioned dividers The quartz used on the board is similar to the maximum sample
70. d stored in the driver The number of PCI boards will be given back in the value Count and the version of the PCI bus itself will be given back in the value PClVersion Function SpcSetParam All hardware settings are based on software registers that can be set by the function SpcSetParam This function sets a register to a defined value or executes a command The board must first be initialized The available software registers for the driver are listed in the board specific part of the documentation below The value contains the index of the board that you want to access the value is the register that has to be changed and the 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 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 is a pointer to a value that should contain the read parameter after function call The function will return an error value in case of malfunction Function SpcSetData Writes data to the board for a specific memory channel The board must first be initialized Th
71. defined by the different range registers mentioned above The range depends on the activated channels and the mode the board is used in Please be sure to select the correct range Otherwise it is possible that the board will not run properly EXRANGE_SINGLE EXRANGE_BURST_S EXRANGE_BURST_M EXRANGE_BURST_L EXRANGE_BURST_XL Standard FIFO 10 MHz up to max Standard FIFO 5 MHz up to max Standard FIFO 10 MHz up to max Standard only 5 MHz up to max FIFO 2 5 MHz up to 7 5 MHz 7 5 MHz up to 17 5 MHz 17 5 MHz up to 36 MHz How to read this table If you have activated all four channels and are using the board in FIFO mode and your external clock is known to be around 5 MHz you have to set the EXRANGE BURST 5 for the external range Example 56 MI 20xx Manual Clock generation Internally generated sample rate 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 gt 1 MS s This divided clock is used as a sample clock for the board Register Value Direction Description __6_ ___ _6_ _ _______ SPC_CLOCKDIV 20040 Extra clock divider for external samplerate Allowed values are listed below Available divider values 1 2 4 8 10 16 20 40 50 80 100 200 400 500 800 1000 2000 Spectrum GmbH 57 General Description Trigger modes and appendant registers Trigger modes and appendant registers General Description The trigger mode
72. detailed version information of the driver Universal Serial Bus controllers MI 20xx Manual is shown 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 4 Uninstall Update Driver DK Cancel Software Driver Installation Driver Update Windows 2000 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 Upgrade Device Driver Wizard Welcome to the Upgrade Device Driver Wizard This wizard helps you upgrade a device driver for a hardware device To continue click Next Upgrade Device Driver Wizard Locate Driver Files Where do you want Windows to search for driver files 5 Search for driver files for the following hardware device MI 3020 The wizard searches for suitable drivers in its driver database on your computer and in any of the following optional search locations that you specify To start the search click Next If vou are searching on a floppy disk or CD ROM drive insert the floppy disk or CD before clicking Next Optional search locations Floppy disk diyes Specify a locatio Microsoft Windows Update lt Back Cancel Upgrade Device Driver Wizard Driver Files
73. different modes for external TTL trigger are to be detailed described in the next few passages Edge triggers Positive TTL trigger This mode is for detecting the rising edges of an external TTL si gnal The board will trigger on the first rising edge that is detec ted after starting the board The next triggerevent will then be detected if the actual recording replay has finished and the board is armed and waiting for a trigger again Triggerevent Register Value Direction Description ee SPC_TRIGGERMODE 40000 Sets the triggermode for the board TM_TTLPOS 20000 Example on how to set up the board for positive TTL trigger Sets the trigger mode for external TTL trigger to detect positive edges Negative TTL trigger This mode is for detecting the falling edges of an external TTL si gnal The board will trigger on the first falling edge that is detec ted after starting the board The next triggerevent will then be detected if the actual recording replay has finished and the board is armed and waiting for a trigger again Triggerevent Register Direction Description _ ________ 9 9 ___ SPC_TRIGGERMODE 40000 Sets the triggermode for the board TM_TTLNEG 20010 Sets the trigger mode for external TTL trigger to detect negative edges c Spectrum GmbH 59 External TTL trigger Trigger modes and appendant registers Positive and negative TTL trigger This mode is for detecting the
74. ds with 8 bit resolution and use the SpcGetDatal6 function for boards with 12 14 and 16 bit resolution This function is only available on acquisition or i o boards The function is not available on generator boards c Spectrum GmbH 35 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 focussed on Visual C However as shown in the last chapter the differences in programming the board under different programming languages are marginal This manual describes the programming of the whole hardware family Some of the topics are similar for all board versions But some differ a little bit from type to type Please check the given tables for these topics and examine carefully which settings are valid for your special kind of board Register tables The programming of the boards is totally software register based All software registers are described in the following form The name of the software regi The decimal value of the software register Describes whether Short description of the functio ster as found in the regs h file Also found in regs h file This value must the register can be nality of the register A more de Could directly be used by C and be used with all programs or compilers that read and or writ tailled description is f
75. dule on one Spectrum board for details please refer to the chapter about installing the hardware When synchronizing multiple boards one is set to be the clock master for all the connected boards All the other boards are working as clock slaves It s also possible to temporarily disable the synchronization of one board This board then runs individually while the other boards still are synchronized The same board or another one of the connected boards can be defined as a trigger master for all boards All trigger modes of the board defined as the trigger master can be used It is also possible to synchronize the connected boards only for the samplerate and not for trigger This can be useful if one generator board is continuously generating a testpattern while the connected acquisition board is triggering for test results or error conditions of the device under test Additionally you can even define more than one board as a trigger master The trigger events of all boards are combined by a S logical OR so that the first board that detects a trigger will start the boards This OR connection is available starting with starhub hardware version VA 84 MI 20xx Manual Synchronization Option The setup order for the different synchronization options y p p y p When the boards are synchronized by the option starhub there will be no delay between the connected boards This is achie Clock Master Channel 0 EM LJ LI LCI LI ved as all b
76. e Value hexade Value dezimal zimal zimal TYP_MI2020 2020h 8224 TYP_MI2021 2021h 8225 TYP_MI2030 2030h 8240 TYP_MI203 1 2031h 8241 c Spectrum GmbH 37 Initialization Programming the Board Hardware version Since all of the MI MC and MX boards from Spectrum are modular boards they consist of one base board and one or two only PCI and CompactPCl piggy back modules This register SPC_PCIVERSION gives information about the revision of either the base board and the mo dules Normally you do not need this information but if you have a support question please provide the revision together with it Register Value Direction Description __ _6__ __ ______ __ __ SPC_PCIVERSION 2010 Board revision bit 15 8 show revision of the base card bit 7 0 the revision of the modules If your board has a piggy back expansion module mounted MC und MI series boards only you can get the hardwareversion with the follo wing register Register Value Direction Description ___ __ _ __ __ _ ___ ____ SPC_PCIEXTVERSION 2011 Board s expansion module hardware revision as integer value Date of production This register informs you about the production date which is returned as one 32 bit longword The upper word is holding the information about the year while the lower byte informs about the month The second byte counting from below is not used If you only need to know the production year of your board you have to mask the
77. e system where the boards are installed in The device will remain in the file structure even if the board is de installed from the system The following command makes a device for the first Spectrum board the driver has found Make sure that the users who work with the driver have full rights access for the device Therefore you should give all persons all rights to the device Now it is possible to access the board using this device Driver info Information about the installed boards could be found in proc spectrum file All PCI PXI and CompactPCI boards show the basic infor mation found in the EEProm there This is an example output generated by a MI 3020 Automatic load of the driver 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 26 MI 20xx Manual Software Software Overview 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 This manual only shows the use of the standard driver API For further information on programming dri
78. e value nr contains the index of the board that you want to access the parameter contains the memory channel start and define the position of data to be written is a pointer to the array holding the data The function will return an error value in case of malfunction 32 MI 20xx Manual Software Delphi Pascal Programming Interface This function is only available on generator or i o boards The function is not available on acquisition boards A 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 parameter contains the memory channel start and define the position of data to be read is a pointer to the array that should hold the data 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 Spectrum GmbH 33 Visual Basic Programming Interface Software Visual Basic Programming Interface The Spectrum boards can be used together with Microsoft Visual Basic as well as with Microsoft Visual Basic for Applications This allows per example the direct access of the hardware from within Microsoft Excel The interface between the programming language and the driver is the same for both Include D
79. ed to 64 bit 8 bytes The counter value contains the number of clocks that have been recorded with the currently used sample rate since the last counter reset has been done The matching time can easily be calculated as des cribed in the general information section at the beginning of this chapter The values the counter is counting and that are stored in the timestamp FIFO represent the moments the trigger event occures internally Com pared to the real external trigger event these values are delayed The delay is depending on the actual sample rate the number of activated channels and the used trigger mode This delay can be ignored as it will be identically for all recordings with the same setup Timestamp Mode Recording Mode 15 4 bytes 219 bytes 3 d 4 bytes bytes 5th 4 bytes 6 4 bytes Standard StartReset Normal Multiple Recording Trigger O Trigger O Trigger 1 Trigger 1 Trigger 2 Trigger 2 LOW part HICH part LOW part HIGH part LOW part HIGH part Standard StartReset Gated Sampling Gate Start O Gate Start O Gate End O Gate End O Gate Start 1 Gate Start 1 LOW part HICH part LOW part HICH part LOW part HICH part RefClock Normal Multiple Recording Trigger O Trigger O Trigger 1 Trigger 1 Trigger 2 Trigger 2 Counter value Seconds Counter value Seconds Counter value Seconds RefClock Gated Sampling Gate Start O Gate Start O Gate End 0 Gate End O Gate Start 1 Gate Start 1 Counter value Seconds Counter value Seconds Counter value Seconds
80. efault settings If you have asymmetrical signals you can adjust the offset easily with the corresponding registers of the inputs as shown before To start the automatic offset adjustment simply write the register mentioned in the following table Because the adjustment of all the channels in all different input ranges can take up some time it can be useful to adjust only the current input range to safe time Before you start an automatic offset adjustment make sure that no signal is connected to any input Leave all the input connectors open and then start the adjustment If you adjust all ranges this can take up some time All the internal settings of the driver are changed while the automatic offset compensation is in progress Register Value Direction Description __ _6___ _ _6____ _ 6__ ___ SPC ADJ AUTOADJ 50020 Performs the automatic offset compensation in the driver either for all input ranges or only the actual ADJ ALL Automatic offset adjustment for all input ranges CURRENT Automatic offset adjustment only for the current chosen input range As all settings are temporarily stored in the driver the automatically adjustment will only affect these values After exiting your program all adjustments will be lost In some applications it can be nevertheless necessary to adjust the boards offset settings permanently To give you a possibility to save your own settings every Spectrum board has at minimum one se
81. efault values The data in the board s on board memory will be no longer valid 40 MI 20xx Manual Analog Inputs Channel Selection 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 However your specific board may have less channels depending on the board type you purchased and did not allow you to set the maximum number of channels shown here Register ___ Direction Description Activates channel 2 _______ Activates channel 3 The channel enable register is set as a bitmap That means one bit of the value corresponds to one channel to be activated To activate more than one channel the values have to be combined by a bitwise OR Example showing how to activate 4 channels Value as hex Value as decimal CHANNELO CHANNELO CHANNEL CHANNELO CHANNEL2 CHANNEL CHANNEL2 CHANNELS the driver automatically remaps this to the best matching activation mask You can read out the channel en Any channel activation mask that is not shown here is not valid If programming another channel activation able register to see
82. egister shown in the following table This must be done seperately for every board that should not work synchronized Register Direction Description ____ _ _609_______ ____ SPC_COMMAND Ow Command register of the board SPC_NOSYNC Disables the synchronization globally The different synchronization options Synchronization with option cascading With the option cascading up to four Spectrum boards can be synchronized All boards are connected with one synchronization cable on their sync connectors for details please refer to the chapter about installing the hardware As the synchronization lines are organized as a bus topology there is a need for termination at both ends of the bus This is done in factory for the both end boards The maximum possible two middle boards have no termination End Board on board Middle Board HH When synchronizing multiple boards one is set to be the clock master for all the connected boards All the other boards are working as clock slaves It s also possible to temporarily disable boards from the synchronization Middle Board il The same board or another one of the connected boards can be defined as a trigger master for all boards All trigger modes of the trigger master board can be used It is also possible to synchronize the connected boards only for the samplerate and not for trigger This can be useful if one generator board is continuously generating a test pattern while the
83. ency 1 MHz 1 MHz SNR typ gt 47 5 dB 45 9 dB THD typ lt 52 5 dB lt 49 1 dB SFDR typ incl harm gt 57 0 dB gt 55 5 dB SINAD typ gt 46 0 dB gt 44 2 based on SINAD gt 7 3 gt 7 1 Introduction Dynamic parameters are measured at 1 V input range if no other range is stated and 50 Ohm termination with the samplerate specified in the table Measured parameters ged 20 times to get typical values Test signal is a pure sine wave of the specified frequency with gt 99 amplitude SNR and RMS noise parameters may differ depending on the quality of the used PC SNR Signal to Noise Ratio THD Total Harmonic Distortion SFDR Spurious Free Dynamic Range SINAD Signal Noise and Distortion ENOB Effective Number of Bits For a detailed description please see application note 002 Order information Order No Description MI2020 MI 2020 with 16 MSample memory and drivers SBench 5 x MI2021 MI 2021 with 16 MSample memory and drivers SBench 5 x MI2030 MI 2030 with 16 MSample memory and drivers SBench 5 x MI203 1 MI 2031 with 16 MSample memory and drivers SBench 5 x MI2xxx smod Star Hub Synchronisation of 2 16 boards one option per system MIxxxx xio Extra I O internal connector 16 DI O 4 Analog out Mbooocxmf Extra O external connector 24 DI O 4 Analog out incl cable MI2xxx time Timestamp option Extra memory for trigger time Cab 3 9m 80 Adapter cable SMB female to BNC male 80 cm
84. er break page TYP MASERIES printi Board found sn 05din lBrdTvpe amp Oxfrrtt loerialNumber break printf Memory on board 1d MBytes 1d MSamples n lInstMemsize 1024 1024 lInstMemsize 1024 1024 2 printr Serial Number 05ldXn lS5erialNumber Powerdown and reset Every Spectrum board can be set to powerdown mode by software In this mode the board is therefore consuming less power than in normal operation mode The amount of saved power is board dependant Please refer to the technical data section for details The board can be set to normal mode again either by performing a reset as mentioned below or by starting the board as described in the according chapters later in this manual If the board is set to powerdown mode or a reset is performed the data in the on board will be no longer valid and cannot be read out replayed again Performing a board reset or powering down the board can be easily done by the related board commands mentioned in the following table Register Value Direction Description a SPC_COMMAND oo o ____ Command register of the board SPC_POWERDOWN 30 Sets the board to powerdown mode The data in the on board memory is no longer valid and cannot be read out or replayed again The board can be set to normal mode again by the reset command or by starting the boards SPC_RESET A software and hardware reset is done for the board All settings are set to the d
85. er level define a win dow Every time the signal leaves the the window from the inside a triggerevent will be detected upper level Triggerevent Triggerevent Triggerevent Register Direction _ SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXWINLEAVE 10050 SPC_HIGHLEVELO 42000 Sets the window s upper level relatively to the channel s input range board dependant SPC_LOWLEVELO 42100 Sets the window s lower level relatively to the channel s input range board dependant 70 MI 20xx Manual Trigger modes and appendant registers Channel Trigger 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 If the signal leaves the window before the pulsewidth counter has stopped no trigger will be detected If the pulsewidth counter stops and the signal is still inside ower leve the window the triggerevent will be detected Triggerevent Register Value __ Direction Channel window trigger for long outer 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 leaves the window from the insi de the pulsewidth counter is startet If the signal ente
86. est driver for your system Select the CD that was deliv ered with the board as instal lation source The driver files are located on CD in the di rectory NDriverNWin98 2k XP The hardware assistant shows you the exact board type that has been found like the MI 3020 in the example Older boards before june 2004 show Spectrum Board instead The drivers can be used di rectly after installation It is not necessary to restart the system The installed drivers are linked in the device man ager Below you ll see how to ex amine the driver version and how to update the driver with a newer version Software Driver Installation Found New Hardware Wizard Install Hardware Device Drivers ae device driver is a software program that enables hardware device to work with cy an operating system This wizard will complete the installation for this device Hg MI 3020 device driver is a software program that makes a hardware device work Windows needs driver files for your new device To locate driver files and complete the installation click Next What do you want the wizard to do Search for a suitable driver for my device recommended C Display a list of the known drivers for this device so that choose a specific driver Back Cancel Found New Hardware Wizard X Insert the manufacturer s installation disk into the drive selected and then click OK Cancel C
87. ewidth counter reaches the programmed amount of samples a triggerevent will be detected Triggerevent Register Value Direction _ SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXNEG_GS 10013 SPC_HIGHLEVELO 42000 Set it to the desired upper level relatively to the channel s input range board dependant SPC_LOWLEVELO 42100 Set it to the desired lower level relatively to the channel s input range board dependant SPC_PULSEWIDTH 44000 Set to the desired pulsewidth in samples 2 to 255 68 MI 20xx Manual Trigger modes and appendant registers Channel Trigger 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 If the pulsewidth counter reaches the programmed amount of samples wit hout the signal crossing the higher level no trigger will be detected If the signal does cross the upper level within the the pro grammed pulsewidth time a triggerevent will be detected Triggerevent Register Value __ Direction SPC_LOWLEVELO 42100 Set it to the desired lower level relatively to the channel s input range board dependant SPC_PULSEWIDTH 44000 Set to the desired pulsewidth in samples 2 to 255 Channel steepness trigger for steep negative pulses The analog input is continuously sampled wit
88. external clock is not present this function will wait until the program is terminated from the taskmanager Windows or from another console Linux To prevent the program from this deadlock a second task must be used which can send the SPC_STOP signal to stop the board Another possibility that does not require the need of a second task is to define a timeout value Register Value Direction Description SPC_TIMEOUT 295130 Defines a time in ms after which the function SPC_STARTANDWAIT terminates itself This is the easiest and safest way to use the interrupt driven mode If the board started in the interrupts mode it definitely will not return until either the recording has finished or the timeout time has expired In that case the function will return with an error code See the appendix for details The following excerpt of a sample program gives you an example of how to start the board in the interrupt driven mode It is assumed that all board setup has been done before An example on how to get a second task that can do some monitoring on the running task and eventually send the SPC_STOP command can be found on the Spectrum driver CD that has been shipped with your board The latest examples can also be down loaded via our website at htto www spectrum instrumentation com Data organization Normal mode non interlace This chapter shows the data organization for sample rates lt 100 MS s The data organization for sample ra
89. f the board SPC_SYNCMASTER Defines the according board as the clock master for operating in standard non FIFO mode only Example board number 0 is clock master 7 Define the remaining boards as clock slaves It is necessary to set all the remaining boards to clock slaves to obtain correct internal driver settings Register Direction Description ee SPC_COMMAND ___ Command register of the board SPC_SYNCSLAVE Defines the according board as a clock slave for operating in standard non FIFO mode only Settings the remining boards to clock slaves Board number O is clock master in the example 8 Arm the boards for synchronization Before you can start every single one of the synchronized boards on their own you have to arm all the synchronized boards before for the use with synchronization The synchronization has to be started on the clock master board Register Direction Description ________ _ _ _______ SPC_COMMAND o oo Command register of the board SPC_SYNCSTART Arms all boards for the use with synchronization Example of starting the synchronization Board number is clock master 9 Start all of the trigger slave boards After having armed the synchronized boards you must start all of the boards that are defined as trigger slaves first Register Value Direction Description SPC COMMAND Oi rw Command register of the board SPC_START Starts
90. gh preasure 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 pee amp Retainer Installing a board with extra I O Option XMF 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 Now insert the board and the extra bracket slowly into your computer This is done best with one hand each at both fronts of the board While inserting the board take care not to tilt the retainer in the track Please be very carefully when inserting the board in the slot as most of the mainboards are mounted with spacers and therefore might be damaged they are exposed to high preasure 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 2a Retainer 14 MI 20xx Manual 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
91. h the selected sample rate If the programmed upper level is crossed by the channel s signal from higher to lower values falling edge the pulsewidth counter is started If the pulsewidth counter reaches the programmed amount of samples wit hout the signal crossing the lower level no trigger will be detected If the signal does cross the lower level within the the pro grammed pulsewidth time a triggerevent will be detected Triggerevent Register _____________ Value Direction SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXNEG_SS 10014 SPC_HIGHLEVELO 42000 Set it to the desired upper level relatively to the channel s input range board dependant SPC_LOWLEVELO 42100 Set it to the desired lower level relatively to the channel s input range board dependant SPC_PULSEWIDTH 44000 Set to the desired pulsewidth in samples 2 to 255 c Spectrum GmbH 69 Channel Trigger Trigger modes and appendant registers Channel window trigger for entering signals The analog 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 the window from the outside a triggerevent will be detected Triggerevent Triggerevent Triggerevent Register Value __ Direction Channel window trigger for leaving signals The analog input is continuously sampled with the selected sample rate The upper and the low
92. he CD that was delivered with the board as installation source The driver files are located on CD in the directory NDriverNWin98 2k XP The hardware assistant shows you the exact board type that has been found like the MI 3020 in the exam ple Older boards before june 2004 show Spectrum Board in stead 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 On the property page Windows 98 shows the date of the driver MI 20xx Manual Software Driver Installation Add New Hardware Wizard New Hardware Wizard The drivers can be used directly after installation It is not necessary to restart the system The installed drivers are linked in the device manager Below you ll see how to examine the driver version and how to update the driver with a newer version Driver File Details C NWIND WwSSSYSTEM32NDRIVERS SSpewdm sys WINDOW SNSYSTEMNVMM32 VXD ntkem CNWINDOWSSSYSTEMSSPCSTDNT DLL CNWINDOWSSSYSTEMNSPECTRUM DLL Software Driver Installation Windows 98 XJ 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 board s serial number to EE CY INDOWSSSYSTEM32 DRIVERSSpcwdm sys INDOWS
93. he board SPC_SYNCMASTERFIFO Defines the according board as the clock master for operating in FIFO mode only Example board number is clock master SpcSetParam hDrv 0 SPC COMMAND SPC SYNCMASTERFIFO Set board 0 to clock master 7 Define the remaining boards as clock slaves It is necessary to set all the remaining boards to clock slaves to obtain correct internal driver settings Value Direction Description _ ________ 99 _ __ _ __ SPC_COMMAND Ow Command register of the board SPC_SYNCSLAVEFIFO Defines the according board as a clock slave for operating in FIFO mode only Settings the remaining boards to clock slaves Board number O is clock master in the example SpcSetParam hDrv 1 SPC COMMAND SPC SYNCSLAVEFIFO Setting all the other boards to SpcSetParam hDrv 2 SPC COMMAND SPC SYNCSLAVEFIFO l clock slave is a must c Spectrum GmbH 89 The setup order for the different synchronization options Synchronization Option 9 Start all of the trigger slave boards After having armed the synchronized boards you must start all of the boards that are defined as trigger slaves first This is done with the FIFOSTART command Register Value Direction Description __ _6___ _6__ _ 6 ____ SPC_COMMAND ___ Command register of the board SPC_FIFOSTART Starts the board with the current register settings in FIFO mode and waits for the first interrupt Remember that
94. he length of one multiple recording segment is set by the value of the posttrigger register The total amount of samples to be recorded is defined by the memsize regi ster In most cases memsize will be set to a a multiple of the seg ment size postcounter The table below shows the register SPO START pigs Tie ge Thea SB S for enabling Multiple Recording For detailed information on how to setup and start the standard acquisition mode please refer to the according chapter eralier in this manual When using Multiple Recording pretrigger is not available Register Value ___ Direction Description Enables Multiple Recording mode Defines the size of one Multiple Recording segment FIFO Mode The Multiple Recording in FIFO Mode is similar to the Mul tiple Recording in Standard Mode The segment size is also set by the postcounter register In contrast to the Standard mode you cannot programm a certain total amount of samples to be recorded The acqui sition is running until the user stops it The data is read FIFO block by FIFO block by the driver These blocks are online _ SFCSTART pigg gr SPC STOP available for further data processing by the user program This mode sigficantly reduces the average data transfer rate on the PCI bus This enables you to use faster sample rates then you would be able to in FIFO mode without Multiple Recording Usually the FIFO blocks are multiples of the Multip
95. he related register to adjust the wait time Any changes of the wait time below the default value should only be done after detailed tests of the boards behaviour Setting lower values may be possible or may not be possible depending on the application that is done Register Value Direction Description _ _ _6__ ___ _ _ _ __ _ _ SPC_RELAISWAITTIME 200700 Wait time in ms for relais settling before the start of the board Default value is 200 ms If you want to know how many different input ranges are available on the actual board per channel you can easily read that information by using the read only register shown in the table below Register Value Direction Description ee SPC_READIRCOUNT 3000 Informs about the numer of the board s calibrated input ranges Additionally cou can read out the minimum and the maximum value of each input range as shown in the table below The number of input ranges is read out with the above shown register Register Value Direcion Description ____________________ SPC_READRANGEMAXO 4100 Gives back the maximum value of input range O in mV SPC READRANGEMAX 1 4101 Gives back the maximum value of input range 1 in mV SPC READRANGEMAX2 4102 Gives back the maximum value of input range 2 in mV C a a ______________ The following example reads out the number of available input ranges and reads and prints the minimum and maximum value of all input ranges 42 MI 20xx Manual Analog
96. i i Triggerevent Register Value Direction Description SPC PULSEWIDTH 44000 Sets the pulsewidth in samples Values from 2 to 255 are allowed SPC TRIGGERMODE 40000 Sets the triggermode for the board TM TTLLOW LP 20011 Sets the trigger mode for external TTL trigger to detect LOW pulses that are longer than a programmed pulsewidth TIL pulsewidth trigger for short LOW pulses This mode is for detecting LOW pulses of an external TTL signal that are shorter than a programmed pulsewidth If the pulse is lon ger than the programmed pulsewidth no trigger will be detected The board will trigger on the first pulse matching the trigger con dition after starting the board The next triggerevent will then be detected if the actual recording replay has finished and the THEM board is armed and waiting for a trigger again ee Triggerevent Register Value Direction Description SPC_PULSEWIDTH 44000 Sets the pulsewidth in samples Values from 2 to 255 are allowed SPC_TRIGGERMODE 40000 Sets the triggermode for the board TM_TTLLOW_SP 20012 Sets the trigger mode for external TTL trigger to detect LOW pulses that are shorter than a programmed pulsewidth Param bbs aram c Spectrum GmbH 61 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 equ
97. ination on the board If the termination is disabled the impedance is 1 Megaohm Please make sure that your source is capable of driving that current and that it still fulfills the clock input specification as given in the technical data section Register Value Direction Description _ _ _6 _ __ _6__ _6__ __ SPC CLOCK50OHM 20120 r w A 1 enables the 50 Ohm termination at the external clock connector Only possible when using the external connector as an input External clocking Direct external clock An external clock can be fed in on the external clock connector of the board This can be any clock that matches the specification of the board The external clock signal can be used to synchronize the board on a system clock or to feed in an exact matching sample rate Register Value Direction Description d SPC_EXTERNALCLOCK 20100 Enables the external clock input If external clock input is disabled internal clock will be used The maximum values for the external clock is board dependant and shown in the table below c Spectrum GmbH 55 Internally generated sample rate Clock generation Termination of the clock input If the external connector is used as an input either for feeding in an external reference clock or for external clocking you can enable a 50 Ohm termination on the board If the termination is disabled the impedance is 1 Megaohm Please make sure that your source is capable of driving that current
98. ipment like oscilloscopes The 17 different channel trigger modes enable you to observe nearly any part of the analog signal This chapter is about to explain the different modes in detail To enable the channel trigger you have to set the triggermode register accordingly Therefore you have to choose if you either want only one channel to be the trigger source or if you want to combine two or more channels to a logical OR trigger The following table shows the according registers for the two general channel trigger modes Register Value Direction Description ee SPC TRIGGERMODE 40000 Sets the triggermode for the board TM CHANNEL 20040 Enables the channel trigger mode so that only one channel can be a trigger source TM CHOR 35000 Enables the channel trigger mode so that more than one channel can be a trigger source If you have set the general triggermode to channel trigger you must set the all of the channels to their modes according to the following table So even if you use TM CHANNEL and only want to observe one channel you need to deactivate all other A channels You can do this by setting the channel specific register to the value TM_CHXOFF The tables lists the maximum of the available channel mode registers for your card s series So it can be that you have less channels installed on your specific card and therefore have less valid channel mode registers If you try to set a channel that is not installed on your specific
99. irecion Description O O SPC TRIGGERMODE _________ 40000 TM TTLLOW SP 20012 Sets the trigger mode for external TTL trigger to detect LOW pulses that are shorter than a programmed pulsewidth 58 MI 20xx Manual Trigger modes and appendant registers External TTL trigger 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 Direction Description _________ ______ SPC_TRIGGEROUT 40100 Defines the data direction of the external trigger connector If external triggermodes are used this register will have no effect 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 Please check carefully whether the source is able to fullfill the trigger input specification given in the technical data section If termination is disabled the input is at high impedance Register Value Direction Description __6_ _6_ __ _ _ _ _ 69____ TRIGGER50OHM 40110 r w A 1 sets the 50 Ohm termination if the trigger connector is used as an input for external trigger signals A sets the 1 MOhm termination The following short example shows how to set up the board for external positive edge TTL trigger The trigger input is 50 Ohm terminated The
100. ized kernel installed like a SMP kernel you can get the linux driver sources directly from us With this sources it s no problem to compile and use the linux driver on your system Please contact your local distributor to get the sources The Spectrum linux drivers are compatible with kernel versions 2 4 and 2 6 On this CD you ll find pre compiled linux kernel modules for the following versions SuSE version 8 0 Kernel 2 4 18 directory Driver linux suse80 SuSE version 8 2 Kernel 2 4 20 directory Driver linux suse82 SuSE version 9 0 Kernel 2 4 21 directory Driver linux suse90 SuSE version 9 1 Kernel 2 6 4 directory Driver linux suse9 1 Redhat version 9 0 Kernel 2 4 20 directory Driver linux redhat90 Installation Login as root It is necessary to have the root rights for installing a driver Select the right driver from the CD Refer to the list shown above If your distribution is not listed there please select the module that most closely matches your installed kernel version Copy the driver kernel module spc o from the CD directory to your hard disk Be sure to use a hard disk directory that is a accessible by all users who should work with the board First time load of the driver The linux driver is shipped as the loadable module spc o The driver includes all Spectrum PCI PXI and CompactPCI boards The boards recognized automatically after driver loading Load the driver with the insmod command The insmod command may ge
101. l 3 Spectrum GmbH 7 Additional options Introduction Additional options Extra I O Option XMF With this simple to use enhancement it is possible to control a wide range of external instruments or other equipment Therefore you have 24 digital I O and 4 analog outputs available The asynchronous I Os of the extra Digital 1 15 0 I O option are useful if an external amplifier should be controlled any kind of signal source must be pro grammed an antenna must be adju Digital Bit 23 16 sted a status information from Analog Outputs external machine has to be obtained or different test signals have to be routed to the board The additional inputs and outputs are mounted on an extra bracket The figure shows the allocation of the two 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 Extra I O Option XIO With this simple to use enhancement it is possible to control a wide range of external instruments or other equipment Therefore you have 16 digital I O and the 4 analog outputs available The asynchronous I Os of the extra I O option are useful if an external amplifier should
102. l6 GlobalAlloc FIXED FIFO BUFLEN allocate memory SpcSetParam b FIFO BUFADRO 1 int32 pnData b i send the adress to the driver 2a Write first data for output boards When using the synchronization FIFO mode with output boards this is the right position to fill the first software buffers with data As you can read in the FIFO chapter output boards need some data to be written to the software FIFO buffers before starting he board Example of calulcating and writing output data to software FIFO buffers data calculation routine ini uw nPos U some global variables youd vCaleoOutpurData ptrlo pub amp ata inct52 lBufsize funetion to calculate the output data In this int i a sine function is used fom 2 er ae Bie e OY pe PI 500000 Ig g nPos lButsize 2 Main task ine main int arge char argv for i 0 i BUF i till the first buffers nith data for b 07 b 3r b jf tor all anstallead boards lb i BUFSIZE 6 Define the board for clock master Using the synchronization option requires one board to be set up as the clock master for all the synchronized board It is not allowed to set more than one board to clock master Register Value Direction Description __6_ ___ _ _ _________ SPC_COMMAND o oo Command register of t
103. la ls CIL cU DA LACE 95 Pin eissigninentorine internal ODD ec OEC is ueste tome Descr Let votes IM ELI e etd 96 Extra I O with internal connector Option 96 Preface Introduction Introduction Preface This manual provides detailed information on the hardware features of your Spectrum instrumentation board This information includes tech nical data specifications block diagram and a connector description In addition this guide takes you through the process of installing your board and also describes the installation of the delivered driver package for each operating system Finally this manual provides you with the complete software information of the board and the related driver The reader of this manual will be able to integrate the board in any PC system with one of the supported bus and operating systems Please note that this manual provides no description for specific driver parts such as those for LabVIEW or MATLAB These drivers are provi ded by special order For any new information on the board as well as new available options or memory upgrades please contact our webside http www spectrum instrumentation com You will also find the current driver package with the latest bug fixes and new features on our site Please read this manual carefully before you install any hardware or sofrware Spectrum is not responsible for any hardware failures resulting from inco
104. le Recording segments The advantage of Multiple Recording in FIFO mode is that you can stream data online to the hostsystem You can make realtime data pro cessing or store a huge amount of data to the hard disk The table below shows the dedicated register for enabling Multiple Recording For detailed information how to setup and start the board in FIFO mode please refer to the according chapter earlier in this manual Register Direction Description SPC MUITI 220000 Enables Multiple Recording mode SPC POSTTRIGGER Defines the size of one Multiple Recording segment Trigger modes In Multiple Recording modes all of the board s trigger mo des are available except the software trigger Depending cu poe a on the different trigger modes the chosen sample rate the used channels and activated board synchronisation see according chapter for details about synchronizing multiple boards there are different delay times between the trigger event and the first sampled data see figure This delay is necessary as the board is equipped with dy namic RAM which needs refresh cycles to keep the data in memory when the board is not recording Trigger event The delay is fix for a certain board setup All possible Data in memory delays in samples between the trigger event and the first re corded sample are listed in the table below A negative 3 amount of samples indicates that the trigger will be visible r
105. le waiting for an interrupt Why this happens depends on the application Please check whether the timeout value is programmed too small ERR_CHANNEL 110h 272 The channel number may not be accessed on the board Either it is not a valid channel number or the chan nel is not accessible due to the actual setup e g Only channel 0 is accessible in interlace mode ERR RUNNING 120h 288 The board is still running this function is not available now or this register is not accessible now ERR ADJUST 130h 304 Automatic adjustion has reported an error Please check the boards inputs ERR NOPCI 200h 512 No PCI BIOS is found on the system ERR PCIVERSION 201h 513 The PCI bus has the wrong version SPECTRUM PCI boards require PCI revision 2 1 or higher ERR PCINOBOARDS 202h 514 No SPECTRUM PCI boards found If you have a PCI board in your system please check whether it is cor rectly plug into the slot connector and whether you have the latest driver version ERR PCICHECKSUM 203h 545 The checksum of the board information has failed This could be critical hardware failure Restart the system and check the connection of the board in the slot ERR_DMALOCKED 204h 516 DMA buffer not available now ERR MEMALLOC 205h 517 Internal memory allocation failed Please restart the system and be sure that there is enough free memory ERR_FIFOBUFOVERRUN 300h 768 Driver buffer overrun in FIFO mode The hardware and the driver have been fast enough but the application softwa
106. length PCI slot with a track at the backside to guide the board by it s retainer Now insert the board and the extra bracket slowly into your computer This is done best with one hand each at both fronts of the board Please keep in mind that the board carrying the starhub piggy back module requires the width of two slots While inserting the boards take care not to tilt the retainers in the tracks A Please be very carefully when inserting the boards in the PCI slots as most of the mainboards are mounted with spacers and therefore might be damaged if they are exposed to high preasure A 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 2 Retainer Se amp PCI Slots c Spectrum GmbH 15 Installing the board in the system Hardware Installation Installing multiple synchronized boards Hooking up the boards Before mounting several synchronized boards for a multi channel system into the PC you can hook up the boards with the synchronization cable first If there is enough space in your computer s case e g a big tower case you can also mount the boards first and hook them up afterwards Spectrum ships the boards together with the needed synchronization cable All of the possible four boards must be wired with the delivered synchronization cable The figure is showing an example of three syn
107. lution 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 Function SpcSetData Linux 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 parameter contains the memory channel start and define the position of data to be read is a pointer to the array that should hold the data 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 generator boards Function SpcGetData 30 MI 20xx Manual 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 Function SpcGetData Linux c Spectrum GmbH 3 Delphi Pascal Programming Interface Software Delphi Pascal Programming Interface Type definition All Spectrum driver functions are using pre defined varia
108. ly simply click on the button After installtion the sy stem must be rebooted once see picture on the right side The driver is install to support one PCI PXI or CompactPCI device If more boards are installed in the system the configuration of the driver has to be changed Please see the following chapter for this topic C will restart my computer later WARNING This program is protected by copyright law and international treaties Remove any disks from their drives and then click Finish to Unauthorized reproduction or distribution of this program or any lr ds portion of it may result in severe civil and criminal penalties and will be prosecuted to the maximum extent possible under law Next gt lt Back Adding boards to the Windows NT driver Driver Configuration Ed The Windows NT driver Driver Configuration x BosdNumer 171 el must be confi Qu red by the Board Number f gt T Driver Configuration utility Pci Board i EM NI to su p po rt more th an one Type Not Installed f gt FRA Baseaddess He board The Driver Co nfig U Baseaddess ne Memory installed None He ration uti ity is automatica Memory installed Noe Bp Interrupt Channel Delete board ly in stal led with th e d river Interrupt Channel a Delete board Options None
109. m 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 This is more or less similar to the above shown process with the only difference that LabWindows CVI uses it s own library handling functions instead of the windows standard functions Example of function loding under LabWindows CVI load the driver entries from the DLL DriverlId LoadExternalModule spectrum lib Load functions from DLL SpclnitPCIBoards SPCINITPCIBOARDS GetExternalModuleAddr Driverld SpolnitPClBoards amp Status SpcSetParam SPCSETPARAM GetExternalModuleAddr DriverId SpcSetParam amp Status SpcGetParam SPCGETPARAM GetExternalModuleAddr DriverlId SpcGetParam amp Status Examples Examples for LabWindows CVI can be found on CD in the directory Examples cvi Theses examples show mainly how to include the driver in a LabWindows CVI environment and don t use any special functions of the boards The examples have to be merged with the standard windows examples described under Visual C Driver functions The driver contains five functions to access the hardware Function SpclnitPClBoard This function initializes all installed PCI and CompactPCI boards The boards are recognized automatically All installation parameters are read out from the hardware and stored in the driver The number of PCI board
110. mance of this device What do you want the wizard to do LZ C Display a list of the known drivers for this device so that can choose a specific driver Back Cancel Upgrade Device Driver Wizard X Cancel Insert the manufacturer s installation disk into the drive selected and then click OK Copy manufacturer s files from Browse Upgrade Device Driver Wizard Completing the Upgrade Device Driver Wizard Eg MI 3020 Windows has finished installing the software for this device To close this wizard click Finish 21 Windows XP Windows XP 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 Do not let Windows automatically search for the best driver becau se sometimes the driver will not be found on the CD Please take the option of choosing a manual installation path instead Allow Windows XP to search for the most suitable driver in a specific directory Se lect the CD that was delivered with the board as installation source The driver files are located on CD in the directory Driver Win98_2k_XP The hardware assistant shows you the exact board type that has been found like the MI 3020 in the example Older boards before june 2004 show Spectrum Board instead The drivers can be used di
111. mmed gate condition it might hap ds Y pen that at maximum seven more samples are recorded gate interval before board pauses see figure Gate The figure on the right is showing this end delay exem signa plarily for three possible gate signals As all samples mE u 7 counted from zero The eight samples alignment in the Samples 27 29 31 sz 35 37 upper two cases is reached at the end of sample 39 which is therefore 40th sample End of End af gate interval recording Crate Signal i Samples 27 wj 31 End of End of gate interval recording Resulting start delays Activated channels Sample rate external TTL trigger internal trigger ext TIL trigger with internal trigger with activated activated 0 1 2 3 synchronization synchronization aa ____ amples samples a o 1 B pp p roses O O qx az samples ooe samples B x messes 20 samples 21 samples a e O 5 pe 32 amples 18 samples O Allowed trigger modes As mentioned above not all of the possible trigger modes can be used as a gate condition The following table is showing the allowed trigger m
112. modes please refer to the according chapter in this ma nual Register Value Direction Description _ _ _6__ __ __ _ __ __ _ 6_ _ __ SPC_CLOCKDIV 20040 Extra clock divider for synchronizing different boards Available divider values 1 2 4 8 10 16 20 40 50 80 100 200 400 500 800 1000 2000 The clock divider is also used by internal clock generation for all clock rates that are below 1 MS s sum sam ple rate per module If internal clock divider and extra clock divider are used together the resulting clock divider is one value of the above listed The driver searches for the best matching divider Read out the regi ster after all sample rate registers are set to receive the resulting extra clock divider For correct setting of the clock divider the sample rate and channel enable information must be set before the clock divider is programmed Although this setup is looking very complicated at first glance it is not really difficult to set up different boards to work synchronously with the same speed To give you an idea on how to setup the boards the calculations are shown in the following two examples Each example contains of a simple setup of two synchronized boards It is assumed that all of the available channels on the dedicated boards have been activated Example calculation with synchronous speed where slave clock is divided Board type 3122 3120 Channels available 8 x 12 bit A D 2x 12 bit A D Desired sample rate 10 M
113. mponents that can be damaged by electrostatic discharge ESD Before installing the board in your system or even before touching it it is absolutely necessary to bleed of any electrostatic electricity Cooling Precautions The boards of the MI xxxx series operate with components having very high power consumption at high speeds For this reason it is absolutely required to cool this board sufficiently It is strongly recommended to install an additional cooling fan producing a stream of air across the boards surface In most cases professional PC systems are already equipped with sufficient cooling power In that case please make sure that the air stream is not blocked During longer pauses between the single measurements the power down mode should be called to reduce the heat production Sources of noise The boards of the MI xxxx series should be placed far away from any noise producing source like e g the power supply It should especially be avoided to place the board in the slot directly adjacent to another fast board like the graphics controller Installing the board in the system Installing a single board without any options 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 board afterwards All Spectrum boards require a full length PCI slot with a track at the backside to guide the
114. mum memsize o o e CN chO ch ch2 ch3 FQ q q How to read this table If you have installed the standard amount of 16 MSample on your 2021 board and you want to record all four channels you have a total maximum memory of 16 MSample 1 4 4 MSample per channel for your data The maximum settings for the post counter are limited by the hardware because the post counter has a limited range for counting The settings depend on the number of activated channels as the table below is showing Maximum posttrigger in MSamples The amount of memory that can be either set for the used memsize and postcounter values can only be set by certain steps These steps are results of the internal memory organization For this reason these steps also define the minimum size for the data memory and the postcounter c Spectrum GmbH A5 Programming Standard acquisition modes The values depend on the number of activated channels and on the type of board being used The minimum stepsizes for setting up the mem size and the postcounter are shown in the table below Minimum and stepsize of memsize and posttrigger in samples 2020 2021 2030 2031 chO ch ch2 ch3 Starting without interrupt classic mode Command register Register _________ Value Direction Description a SPC_COMMAND ___ Command register of the board SPC_START Starts the board with the current register settings SPC SIOP
115. n SPC _XIO_ANALOGOUTO 471 20 ae Defines the output value for the analog output AO 10000 mV i in steps of 5 mV SPC ANALOGOUTI 47121 Defines the output value for analog output A1 10000 mV in steps of 5 mV SPC_XIO_ANALOGOUT2 47122 Defines output value for analog output A2 10000 mV in steps of 5 mV SPC_XIO_ANALOGOUT3 47123 Defines output value for analog output A3 10000 mV in steps of 5 mV After programming the levels of all analog outputs by the registers above you have to update the analog outputs This is done by the register shown in the table below To update all of the outputs all you need to do is write a 1 to the dedicated register Description SPC _XIO_WRITEDACS 47130 All the analog outputs are simultaniously updated by the programmed levels if a 1 is written Programming example The following example shows how to use either the digital O s and the analog outputs c Spectrum GmbH 83 The different synchronization options Synchronization Option Synchronization Option This option allows the connection of multiple boards to generate a multi channel system It is possible to synchronize multiple Spectrum boards of the same type as well as different board types Therefore the synchronized boards must be linked concerning the board s system clock and the trigger signals If no synchronization is desired for a certain board you can exclude it by setting the r
116. n additional bracket will be used for moun ting the connectors as well The pin assignment depends on what type of board you have and on which of the below mentioned options are installed Extra I O with external connector Option XMF Bl 2 B3 84 85 6 87 88 B BIO 1 812 BI3 BIA 815 B16 BI7 818 BI9 520 GND DI 02 GND 03 GND PGND 05 GND 06 GND 07 GND PAY 2 Jas 5 6 7 jas 9 jaio AI 12 AI3 AI4 15 16 17 AI8 19 20 08 GND D9 GND DIO GND 012 GND 013 GND 014 GND DI5 GND nc inc B21 B22 823 B24 825 B26 B27 B28 29 B31 832 B33 835 B36 B38 B39 LA21 A22 A23 A24 A25 26 27 A28 A29 A30 A3 A32 A33 A34 A35 A36 A37 A38 A39 AGO A3 A0 are the pins for the analog outputs while D23 DO are the 24 digital Os Pin assignment of the multipin cable The 40 lead multipin cable is used for the additional digital inputs on analog acquisition boards only or additional digital outputs on analog generation boards only as well as for the digital O or pat tern generator boards The flat ribbon cable is shipped with the boards that are equipped cable A with one or more of the above mentioned options The cable ends are assembled with a standard IDC socket connector so you can ea sily make
117. n be found on the CD in the path Driver Win98_2k_XP Please include the library file Spectrum lib in your Visual C project functions described below are now available in your program Examples Examples can be found on CD in the path Examples vc There is one subdirectory for each board family You ll find board specific examples for that family there The examples are bus type independent As a result that means that the MI3Oxx directory contains examples for the MI 30xx the MC 30xx and the MX 30xx families The example directories contain a running project file for Microsoft Visual C that can be directly loaded and compiled There are also some more board independent examples in the directory MIxxxx These examples show different aspects of the boards like programming options or synchronization and have to be combined with one of the board specific example Linux Gnu C Include Driver The interface of the linux drivers is a little bit different from the windows interface To make the access easier and to have more similar exam ples we added an include file that re maps the standard driver functions to the linux specific functions This include file is found in the path Examples linux spcioctl inc All examples are based on this file Example for including Linux driver Examples Examples can be found on CD in the path Examples linux There is one subdirectory for each board family You ll find board specific ex amples for that
118. n is that one more output boards are used for continuously generating test patterns while one or more acqusition boards are triggering for test results or error conditions Therefore it is possible to exclude a board from the triggerbus so that only a synchronization for clock is done and the ac cording boards are just using the trigger events they have detected on their own Register Value Direction Description d SPC_NOTRIGSYNC 200040 If activated the dedicated board will use its own trigger modes instead of the synchronization trigger 86 MI 20xx Manual Synchronization Option The setup order for the different synchronization options y p p y p 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 So only all the boards that should work synchronously must be set up for the same trigger modes to get the synchro P nization mode working correctly 6 Define the board for clock master Using the synchronization option requires one board to be set up as the clock master for all the synchronized board It is not allowed to set more than one board to clock master Register Value Direction Description SPC COMMAND ___ fw Command register o
119. nd that after starting the board the pretrigger memory of all boards will be recorded first before the boards trigger detection is armed Take A care to prevent boards with a long pretrigger setup time from hangup by adequately checking the board s status Long setup times are needed if either you use a huge pretrigger size and or a slow sample rate If you don t care it might happen that boards with a small pretrigger are armed first and detect a triggerevent while one or more boards with a huge pretrigger are still not armed This might lead to an endless waiting state on these boards which should be avoided Example of board setup for three boards 2 Let the master calculate it s clocking To obtain proper clock initailization when doing the first start it is necessary to let the clock master do all clock related calculations prior to setting all the synchronization configuration for the slave boards Example of board 0 set as clock master and forced to do the appropriate clock calculation 3 Write Data to on board memory output boards only If one or more of the synchronized boards are used for generating data arbitrary waveform generator boards or digital I O boards with one or more channels set to output direction you have to transfer the data to the board s on board memory before starting the synchronization Please refer to the related chapter for the standard mode in this manual If none of your synchronized boards i
120. nerate a warning that the driver module was compiled for another kernel version In that case you may try to load the driver module with the force parameter and test the board very carefully If the kernel module could not be loaded in your linux installation it is necessary to compile the driver directly on your system Please contact Spectrum to get the needed source files including the compilation description Depending on the used linux distribution the insmod command generates a message telling the driver version and the board types and serial numbers that have been found If your distribution does not show this message it is possible to view them with the dmesg command In the example we show you the output generated by a MI 3020 All other board types are similar to this output but showing the correct board type Examine the major number of the driver For accessing the device driver it is necessary to know the major number of the device This number is listed in the proc devices list The device driver is called spec in this list Normally this number is 254 but this depends on the device drivers that have been installed before c Spectrum GmbH 25 Linux Software Driver Installation Installing the device You connect a device to the driver with the mknod command The major number is the number of the driver as shown in the last step the minor number is the index of the board starting with This step must only be done once for th
121. nual allocation of interrupt lines Have a look in your mainboard manual for further information on this topic Because normally the interrupt line is fixed for one PCI slot it is simply necessary to use another slot for the critical board to force a new interrupt allocation You have to search a configuration where all critical boards have only exclusive access to one interrupt Depending on the system using the Spectrum board with a shared interrupt may degrade performance a little Each interrupt needs to be checked by two drivers For this reason when using time critical FIFO mode even the Spectrum board should have an exclusively access to one interrupt line c Spectrum GmbH 17 Windows 98 Windows 98 Installation Add New Hardware Wizard Add New Hardware Wizard E Driver win98_2k_ P New Coca Add New Hardware Wizard LIE Computer 91 8 CDROM 9 9 Disk drives Display adapters aS Floppy disk controllers H Hard disk controllers 9 8 Keyboard H Monitors 9 7 Mouse mH Network adapters Ports COM amp LPT El Spectrum GmbH a MI 3020 9 80 System devices Universal Serial Bus controllers When installing the board in a Win dows 98 system the Spectrum board will be recognized automatically on the next start up The system offers the direct installa tion of a driver for the board Let Windows search automatically for the best driver for your system Select t
122. number of PCI boards will be given back in the value Count and the version of the PCI bus itself will be given back in the value PClVersion Function SpclnitPClBoard Function SpcSetParam All hardware settings are based on software registers that can be set by the function SpcSetParam This function sets a register to a defined value or executes a command The board must first be initialized The available software registers for the driver are listed in the board specific part of the documentation below The value contains the index of the board that you want to access the value is the register that has to be changed and the 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 34 MI 20xx Manual Software Visual Basic Programming Interface 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 is a pointer to a value that should contain the read parameter after function call The function will return an error value in case of malfunction Function SpcGetPa
123. oards including the one the starhub module is Channel 1 LJ Ly 1 anne mounted on are connected to the starhub with cables of the same length Slave 1 Channel 0 LI LI LI L4 Ch The figure on right shows the clock of three boards with two me channels each that are synchronized by starhub Slave 2 Channel 0 Channel 1 The setup order for the different synchronization options If you setup the boards for the use with synchronization it is important to keep the order within the software commands as mentioned below to get the boards working correctly A Depending on if you use the board either in standard or in FIFO mode there are slightly different orders in the setup for the synchronization option The following steps are showing the setups either for standard or FIFO mode Setup Order for use with standard non FIFO mode and equally clocked boards 1 Set up the board parameters Set all parameters like for example sample rate memsize and trigger modes for all the synchronized boards except the dedicated registers for the synchronization itself that are shown in the tables below All boards must be set to the same settings for the entire clocking registers see the according chapter for sample rate generation for the trigger mode and memory and should be set to the same postcounter size to get the same pretrigger sizes as well If you use acquisition boards with different pretrigger sizes please keep in mi
124. odes that can be used and explains the event that has to be detected for gate start end for gate end External TTL edge trigger The following table shows the allowed trigger modes when using the external TTL trigger connector Gate start will be detected on Gate end will be detected on TM TTLPOS positive edge on external trigger negative edge on external trigger TM TTL NEG negative edge on external trigger positive edge on external trigger External TTL pulsewidth trigger The following table shows the allowed pulsewidth trigger modes when using the external TTL trigger connector Mode Gate start will be detected on Gate end will be detected on TM TTLHICH LP high pulse of external trigger longer than programmed pulsewidth negative edge on external trigger TM TTLLOW LP low pulse of external trigger longer than programmed pulsewidth positive edge on external trigger 76 MI 20xx Manual Option Gated Sampling Example program Channel trigger Mode Gate start will be detectedon Gateendwillbedetectedon _________ Example program The following example shows how to set up the board for Gated Sampling in standard mode The setup would be similar in FIFO mode but the memsize register would not be used c Spectrum GmbH 77 General information Option Timestamp Option Timestamp General information The timestamp function is used to record trigger events relative to the beginning of the measurement rel
125. oftware register to examine the cause for the error message Example for error checking This short program then would generate a printout as Initialization Starting the automatic initialization routine Before you can access the boards in your program you have to initialize them first Therefore the Spectrum function SpclnitPClBoards is used If it is called all Spectrum boards in the host system are initialized automatically If no errors occured during the initialization the returned value is ERR In any other cases something has gone wrong Please see appendix for explanations of the different error codes If the process of initializing the boards was successful the function returns the total number of Spectrum boards that have been found in your system The third return value is the revision of the PCI Bus the Spectrum boards are installed in The following example shows how to start the initialization of the board and check for errors PCI Register These registers are set by the driver after the PCI initialization The information is found in the on board EEPROM and can easily be read out by your own application software All of the following PCI registers are read only You get access to all registers by using the Spectrum function SpcGetParam with one of the following registers One of the following values is returned when reading this register Boardtype Value hexade Value dezimal Boardtyp
126. om a second task with a stop command This handshake command tells the driver that the application has finished it s work with the software buffer The both commands SPC FIFOWAIT SPC FIFOSTART and SPC BUFFERS form a simple but powerful handshake protocol between application software and board driver SPC FIFO BUFREADY 1 pm Application has Ime with that velis Value is index m bU Backward compatibility This register replaces the formerly known SPC FIFO BUFREADYO SPC_FIFO_BUFREADY15 commandis It has the same functionality but can handle more FIFO buffers For back ward compatibility the older commands still work but are still limited to 16 buffers Example FIFO acquisition mode This example shows the main loop of a FIFO acquisition The example is a part of the FIFO examples that are available for each board on CD The example simply counts the buffers when it receives a new buffer from the driver and returns control immideately back to the driver FIFO acquisition example Data organization When using FIFO mode data in memory is organized in some cases a little bit different then in standard mode This is a result of the internal hardware structure of the board The organization of data is depending on the activated channels Chl Ch2 Ch3 Sample ordering in FIFO buffer The samples are re named for better readability AO is sample O of channel 0 i
127. opy manufacturer s files from D Driver win88 2k i Browse Upgrade Device Driver Wizard Completing the Upgrade Device Driver Wizard MI 3020 Windows has finished installing the software for this device To close this wizard click Finish Back lt Back Cancel Version control 5 Device Manager If you want to check which driver version MI 3020 Properties Fri ES Acti Vi m E T e En is installed in the system this can be eas General Diver Resources Computer ily done in the device manager There gt fore please start the device manager 3 DVD CD ROM drives from the control panel and show the Hover ue peciam properties of the installed driver nara IDE ATAZATAPI controllers m Driver Version 3 7 0 0 Keyboards and other pointing devices On the property page Windows 2000 Digital Signer digitally signed Monitors Network adapters shows the date and the version of the IH To view details about the driver files loaded for this device click Driver 7 Ports COM amp LPT stalled d river Details To uninstall the driver files for this device click Uninstall To update 9 Sound video and game controllers the driver files for this device click Update Driver Spectrum Drivers After clicking the driver details button the MI 3020 Je ewe
128. ording front end Different export and import formats allow use of T oe SBench together with a variety of other programs On CD you ll find an install version of SBench in the directory Install SBench There s also a pre installed program version on CD that can be started directly from CD without installing to hard disk This file can be found in the Programs SBench5 directory Also on CD 15 a pro gram description that shows in detail how SBench works and what settings have to be done to use SBench in one of the different modes The manual is found in the path Internet english swmanuals SBench The current version of SBench can be down loaded free of charge directly from the Spectrum website http www spectrum instrumentation com Please go to the download section and get the latest version there It does not run under Linux At the moment there is no graphical ready to run software for Linux available SBench is designed to run under Windows 98 Windows ME Windows NT Windows 2000 and Windows XP Please use the driver examples to examine whether the board is correctly installed under Linux c Spectrum GmbH 27 C C Driver Interface Software C C Driver Interface C C is the main programming language for which the drivers have been build up Therefore the interface to C C is the best match All the small examples of the manual showing different parts of the hardware programming are done with C Header files The
129. ound C compiler cannot use the header file directly ten w above or below this register m se COMMAND o command register ofthe boards Any constants that can be used to The decimal value of the constant Also Short description of program the register directly are found in the regs h file This value must be the use of this con shown inserted beneath the register used with all programs or compilers that stant table cannot use the header file directly If no constants are given below the register table the dedicated register is used as a switch All such registers A are activated if written with a 1 and deactivated if written with a 0 Programming examples In this manual a lot of programming examples are used to give you an impression on how the actual mentioned registers can be set within your own program All of the examples are located in a seperated colored box to indicate the example and to make it easier to differ it from the describing text All of the examples mentioned throughout the manual are basically written using the Visual C compiler for Windows If you use Linux there are some changes in the funtion s parameter lists as mentioned in the relating software chapter oi keep the examples as compatible as possible for users of both operational systems Windows and Linux all the functions that contain either a board number Windows or a handle Linux use the common p
130. perature Storage temperature Humidity Power consumption 5 V full speed Power consumption 5 V power down Clock input Standard TTL level Clock output 312 mm x 107 mm 1 full size slot 2 full size slots 3 mm SMB male 5 V 50 V 10 minutes 0 C 50 10 C 70 C 10 to 90 max 3 4 A 17 0 Watt max 1 9 A 9 5 Watt Low 0 5 level 0 8 V High 2 0 V level 5 5 V Rising edge is used Required duty cycle 50 5 Standard TTL capable of driving 50 Ohm Low lt 0 4 V 8 20 mA max 64 mA High gt 2 4 V 20 mA max 32 mA Software programmable offset Offset error Gain error MI 202x Noise rms 50 Ohm 50 MS s MI 203x Noise rms 50 Ohm 100 200 MS s Crosstalk 5 MHz signal 50 mV input 50 Ohm 50 mV 100 mV 200 mV 500 mV 1V 200 mV 400 mV 800 mV 2 V 4V lt 1 LSB adjustable by user 2 lt 2 lt 2 lt 2 lt 2 lt 0 5 LSB lt 0 5 LSB lt 0 5 LSB lt 0 5 LSB lt 0 5 LSB lt 2 0 LSB lt 1 5 LSB lt 1 0 LSB lt 1 0 LSB lt 1 0 LSB lt 62 dB c Spectrum GmbH 2 V 5 V 8 V 20 V 2 96 2 96 0 5 LSB lt 0 5 LSB lt 1 0 LSB lt 1 0 LSB 1 Hardware information MI 2020 MI 2030 2021 2031 max internal clock 50 MS s 200 MS s max external clock 50 MS s 100 MS s 3 dB bandwidth gt 25 MHz gt 90 MHz Dynamic Parameters MI 2020 MI 2030 MI 2021 MI 2031 Test Samplerate 50 MS s 100 MS s Testsignal frequ
131. ram Function SpcSetData Writes data to the board for a specific memory channel The board must first be initialized The value contains the index of the board that you want to access the parameter contains the memory channel start and define the position of data to be written is a pointer to the array holding the data The function will return an error value in case of malfunction Function SpcSetData tions Use the SpcSetData8 function for boards with 8 bit resolution and use the SpcSetDatal 6 function for It is necessary to select the function with the matching data width from the above mentioned data write func j boards with 12 14 and 16 bit resolution 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 parameter contains the memory channel start and define the position of data to be read is a pointer to the array that should hold the data The function will return an error value in case of malfunction Function SpcGetData It is necessary to select the function with the matching data width from the above mentioned data read func tions Use the SpcGetData8 function for boar
132. ram 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 is a pointer to a value that should contain the read parameter after function call The function will return an error value in case of malfunction Function SpcGetParam Under Linux the value must contain the handle that was given back by the open function of that specific A board The values is then not of the type int16 but of the type handle Function SpcSetData Writes data to the board for 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 parameter contains the memory channel start define the position of data to be written is a pointer to the array holding the data The function will return an error value in case of malfunction This function is only available on generator or i o boards The function is not available on acquisition boards Function SpcSetData Windows Under Linux the additional parameter nBytesPerSample must be used for this function For all boards with 8 bit reso
133. rates of the slave boards A The following example calculation is explaining that case by using to acquisition boards One of the boards is running with only a hundreth of the other sample rate Example with equal boards but asynchronous speeds Board type 3121 3121 Channels available 4 x 12 bit A D 4 x 12 bit A D Desired sample rate 10 MS s Enabled channels per module 4 4 Sum sample rate 40 MS s This board is set up to be the clockmaster now Sync speed 40 MS s 40 MS s Clock divider is set to 1 100 Divided sum clock 40 MS s 400 kS s Enabled channels per module 4 4 Conversion speed 10 MS s 100 kS s Resulting delays using different boards or speeds Delay in standard non FIFO modes There is a fixed delay between the samples of the different boards depending on the type of board the selected clock divider and the acti vated channels This delay is fixed for data acquisition or generation with the same setup wel If you use generation boards in the single shot mode this delay will be compensated within the software driver automatically 425 Delay in FIFO mode When the FIFO mode is used a delay is occuring between the data of the different boards This delay is depending on the type of board the selected clock divider and the activated channel You can read out the actual resulting delay from every board with the following register Register Value Direction Description Oi i _6__ 9_ ______ ________ SPC_STARTDELAY
134. re didn t manage to transfer the buffers in time ERR FIFOHWOVERRUN 301h 769 Hardware buffer overrun in FIFO mode The hardware transfer and the driver has not been fast enough Please check the system for bottlenecks and make sure that the driver thread has enough time to transfer data ERR_FIFOFINISHED 302h 770 FIFO transfer has been finished programmed number of buffers has been transferred ERR_FIFOSETUP 309h 777 FIFO setup not possible transfer rate to high max 250 MB s ERR_TIMESTAMP_SYNC 310h 784 Synchronisation to external timestamp reference clock failed At initialisation is checked wether there is a clock edge present at the input ERR_STARHUB 320h 800 The autorouting function of the star hub initialisation has failed Please check whether all cables are mounted 94 correctly MI 20xx Manual 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 addi tionally used for different options like Extra O or the additional digital inputs on analog acquisition boards only or additional digital outputs on analog generation boards only The connectors for all the options are mounted on an extra bracket while the main conncectors for the digital boards are mounted directly on the board s bracket Only in case that a digital board uses more than two connectors more than 32 in and or output bits a
135. rectly after installation It is not necessary to restart the system The installed drivers are linked in the device manager Below you ll see how to examine the driver version and how to update the driver with a newer version Version control 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 Device Manager Software Driver Installation Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install software for PCI Device If your hardware came with an installation CD or floppy disk insert it now What do you want the wizard to do Install the software automatically Recommended Click Next to continue Found New Hardware Wizard Please choose your search and installation options ue S Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed C Search removable media floppy CD ROM Include this location in the search D Driver win88 2k B Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choo
136. rigger events are refe Trigger M renced to this common zero time With this mode you can calculate the exact time difference between diffe Counter X STET Fe je je qe e Tes pas eee ser 23 rent recordings Y Y The following table shows the valid values that can be 5 11 z1 written to the timestamp command register Register Value Direction Description _ _ _6__ _ ____ ___ ____ SPC_TIMESTAMP_CMD 47000 Writes a command to the timestamp command register SPC_TIMESTAMP_CMD 47000 Reads out the actual timestamp mode TS_RESET LEN Resets the counter of the timestamp module to zero TS MODE DISABLE Disables the timestamp module No timestamps are recorded TS MODE STANDARD 12 Must be written to enable the Standard timestamp mode The counter must be manually reset by writing the command TS RESET to the command register The timestamps values will be relative to this reset time StartReset mode In StartReset mode the timestamp counter is set to zero on every start of the board After starting the board the Command rs eser _ SPC START counter counts continuously Run 8 The timestamps of one recording are referenced to start of the recording This mode is very useful for Multi Trigger ple Recording and Gated Sampling see according chapters for detailed information on these two optional Counter modes Y The following table shows the valid values tha
137. river To include the driver functions into Basic it is necessary to first add them to the module definition section of the program file There the name of the function and the location in the dll is defined Module definition The module definition is already done for the examples and can be found in the Visual Basic examples directory Please simply use the file declnt bas Visual Basic Examples Examples for Visual Basic can be found on CD in the directory Examples vb There is one subdirectory for each board family You ll find board specific examples for that family there The examples are bus type independent As a result that means that the MI3Oxx directory con tains examples for the MI 30xx the MC 30xx and the MX 30xx families The example directories contain a running project file for Visual Basic that can be directly loaded VBA for Excel Examples Examples for VBA for Excel can be found on CD in the directory Examples excel The example here simply show the access of the driver and make a very small demo acquisition It is necessary to combine these examples with the Visual Basic examples to have full board func tionality Driver functions The driver contains five functions to access the hardware Function SpclnitPClBoard This function initializes all installed PCI PXI and CompactPCI boards The boards are recognized automatically All installation parameters are read out from the hardware and stored in the driver The
138. rrect usage General Information The 4 models of the 20 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 This allows to record signals with 8 bit resolution without any phase delay between them The inputs could be selected to one of seven input ranges by software and could be programmed to compensate an input offset of 400 of the input range The extremely large on board memory allows long time recording even with highest sample rates A FIFO mode is also integrated on the board This allows to record data continuously and to process it in the PC or to store it to hard disk Several boards of the MI xxxx series may be connected together by the internal standard synchronisation bus to work with the same time base Application examples Laboratory equipment Supersonics LDA PDA Radar Spectroscopy production test 6 MI 20xx Manual Introduction Different models of the MI 20xx series 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 MI 2020 MI 2030 Channel lo Channel 0 Trigger Clock 0 MI 2021 MI 2031 Channe
139. rs the window before the pulsewidth counter has stopped no trig ger will be detected If the pulsewidth counter stops and the signal is still outside the window the triggerevent will be detected Triggerevent Register Value Direction SPC TRIGGERMODE 40000 CHANNEL 20040 SPC TRIGGERMODEO 40200 TM CHXWINLEAVE LP 10051 SPC HIGHLEVELO 42000 Sets the window s upper level relatively to the channel s input range board dependant SPC LOWLEVELO 42100 Sets the window s lower level relatively to the channel s input range board dependant SPC PULSEWIDTH 44000 Set to the desired pulsewidth in samples 2 to 255 c Spectrum GmbH 7 Channel Trigger Trigger modes and appendant registers Channel window trigger for short inner signals The analog input is continuously sampled with the selected sample rate The upper and the lower levels define a win dow Every time the signal enters the window from the out side the pulsewidth counter is startet If the pulsewidth counter stops and the signal is still inside the window no trigger will be detected f level If the signal leaves the window before the pulsewidth coun diii edis ter has stopped the triggerevent will be detected Triggerevent Register Value Direction setto le Channel window trigger for short outer signals The analogd input is continuously sampled with the selected sample rate The upper and the lower levels define a win dow
140. rum board All 8 bit boards can store only sample per byte while other boards with 12 14 and 16 bit use two bytes to store one sample Register Value Direction Description _____ _ _______ _6__ ______ SPC_PCIMEMSIZE 2110 Instaleld memory in bytes as a 32 bit integer value The following example is written for bytes per sample board 12 14 or 16 bit board 024 lInstMemsize 1024 38 MI 20xx Manual Programming the Board Initialization 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 Direction Description ee masked with one of the masks below to get information about one certain feature ls set if the Option Synchronization is installed for that certain board regardless what kind of synchronization you use Boards without this option cannot be synchronized with other boards PCIBIT_STARHUB 2048 Is set on the board that carrys the starhub piggy back module This flag is set in addition to the PCIBIT SYNC flag mentioned above If on no synchronized board the starhub option is installed the boards are synchronized with the cascading option PCIBIT_XIO 8192 ls set if the Option Extra I O is installed The following example demonstrates how to read out the information about one feature
141. s been reached the board stops immediately see figure The total amount of samples to be recorded can be defined by the memsize register The table below shows the register for enabling Gated Sam pling For detailed information on how to setup and start the stan dard acquisition mode please refer to the according chapter earlier in this manual When using Gated Sampling pretrigger is not available and postcounter has no function Register Value Direction Description SPC_GATE 220400 Enables Gated Sampling mode SPC_MEMSIZE 10000 Defines the total amount of samples to record FIFO Mode The Gated Sampling in FIFO Mode is similar to the Gated Sam pling in Standard Mode In contrast to the Standard mode you cannot programm a certain total amount of samples to be recor ded The acquisition is running until the user stops it The data is read FIFO block by FIFO block by the driver These blocks are online available for further data processing by the user program The advantage of Gated Sampling in FIFO mode is that you can stream data online to the hostsystem with a lower average data rate than in conventional FIFO mode without gated sampling SEC START SPC STOP You can make realtime data processing or store a huge amount of data to the hard disk The table below shows the dedicated register for enabling Gated Sampling For detailed information how to setup and start the board in
142. s of the Spectrum MI MC and MX A D boards are very complex and give you the possibility to detect nearly any trigger event you can think of You can choose between seven external TTL trigger modes and up to 18 internal trigger modes including software and channel trigger de pending on your type of board Five of the internal trigger modes can be independently set set for each input channel on A D boards only resulting in a even bigger variety of modes This chapter is about to explain all of the different trigger modes and setting up the board s registers for the desired mode Every analog Spectrum board has one dedicated SMB connector mounted in it s bracket for feeding in an external trigger signal or outputting a trigger signal of an internal trigger event Due to the fact that only one connector is available for external trigger I O it is not possible to forward the fed in external trigger signal to another board If this is however necessary you need to split up the external trigger signal before 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 START Triggerevent OY Board setup time command Register Value Direction Description a SPC_TRIGGERMODE 40000 Sets the triggermode for the board TM_SOFTWARE 0 Sets the trigger
143. s sample 4 of channel 2 52 MI 20xx Manual FIFO Mode Programming The following example shows how to sort the channel data when using 4 channels in FIFO mode Sample format The sample format in FIFO mode does not differ from the one of the standard non FIFO mode Please refer to the relating passage concerning the sample format in the standard acquisition chapter c Spectrum GmbH 53 Overview Clock generation Clock generation Overview The Spectrum boards offer a wide variety of different clock modes to match all the customers needs All the clock modes are described in detail with programming examples below This chapter simply gives you an overview which clock mode to select Standard internal sample rate PLL with internal 40 MHz reference This is the easiest way to generate a sample rate with no need for additional external clock signals The sample rate has a fine resolution Quartz and divider Internal quarz clock with divider For applications that need a lower clock jitter than the PLL produces The possible sample rates are restricted to the values of the divider External reference clock PLL with external 1 MHz to 125 MHz reference clock This provides a very good clock accuracy if a stable external reference clock is used It also allows the easy synchronization with an external source External clock Any clock can be fed in that matches the specification of the board The external clock signal can be u
144. s step Example for data reading 13 Restarting the board for another synchronized run If you want to restart the synchronized boards with the same settings as before it is sufficient to repeat only the steps starting with 7 This assumes that on generation boards the output data is not changed as well If you want to change the output data of generation boards you ll have to restart the setup procedure starting with step 2 If you even want to change any of the boards parameters you ll have to restart the setup procedure from the first step on 88 MI 20xx Manual Synchronization Option The setup order for the different synchronization options y p p y p 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 All steps that are not mentioned here are similar as described before 2 Allocate the FIFO software buffers If you use the board in FIFO mode additional memory in the PC RAM is needed for software FIFO buffers For details please refer to the according chapter for the FIFO mode Example of FIFO buffer allocation for 1 DR i PLP BHPEBRRGE for 0 b lt 3 bes pnData b i ptr
145. s used for generation purposes you can ignore this step c Spectrum GmbH 85 The setup order for the different synchronization options Synchronization Option Example for data writing 4 Define the board s for trigger master At least one board must be set as the trigger master to get synchronization running Every one of the synchronized boards can be programmed for beeing the trigger master device Value Direction Description _____ __6 _ 6_ _ __ ______ SPC_COMMAND ___ Command register of the board SPC_SYNCTRIGGERMASTER Defines the according board as the triggermaster Example of board 2 set as trigger master 4a Define synchronization OR trigger IF you use synchronization with the starhub option you can even set up more than one board as the trigger master The boards will be com bined by a logical OR and therefore the boards will be started if any of the trigger masters has detected a trigger event The synchronization OR trigger is not available when using the cascading option It is also not available with starhub option prior to hardware version V4 See the initialization section of this manual to find out how to determint the hardware version of the starhub If you set up the boards for the synchronization OR trigger all boards that are set as trigger master must be programmed to the same trigger mode If the boards are using different trigger modes this will res
146. s will be given back in the value Count and the version of the PCI bus itself will be given back in the value PClVersion Function SpclnitPClBoards intl6 SpoclImnitPClBoards intl5 count intlo PClVersion Under Linux this function is not available Instead one must open and close the driver with the standard file functions open and close The functionality behind this function is the same as the SpclnitPClBoards function A Using the Driver under Linux hDrv open dev spcO RDWR close c Spectrum GmbH 29 C C Driver Interface Software Function SpcSetParam All hardware settings are based on software registers that can be set by the function SpcSetParam This function sets a register to a defined value or executes a command The board must first be initialized The available software registers for the driver are listed in the board specific part of the documentation below The value contains the index of the board that you want to access the value is the register that has to be changed and the 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 Under Linux the value must contain the handle that was retrieved by the open function for that specific A board The values is then not of the type int16 but of the type handle Function SpcGetPa
147. se will be the best match for your hardware Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for Hg MI 3020 Click Finish to close the wizard Finish File Action View Help gt 4 Computer Disk drives 0 Display adapters 4 Floppy disk controllers 3 Floppy disk drives ATA ATAPI controllers Keyboards DVD CD ROM drives Mice and other pointing devices Monitors 88 Network adapters 7 Ports COM amp 3888 Processors Sound video and game controllers 8 Spectrum Drivers HB MI 3020 System devices Universal Serial Bus controllers 22 MI 20xx Manual Software Driver Installation Windows XP On the property page Windows XP shows the date and the version of the installed driver MI 3020 Properties n General Driver Resources After clicking the driver details button the detailed version information of the driver is shown gg om 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 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 directl
148. sed to synchronize the board on a system clock or to feed in an exact matching sample rate External clock with divider The externally fed in clock can be divided to generate a low jitter sample rate of a slower speed than the external clock available There is a more detailed description of the clock generation part available as an application note There some more background information and details of the internal structure are explained Internally generated sample rate Standard internal sample rate The internal sample rate is generated in default mode by a PLL and dividers out of an internal 40 MHz frequency reference In most cases the user does not need to care on how the desired sample rate is generated by multiplying and dividing internally You simply write the desired sample rate to the according register shown in the table below If you want to make sure the sample rate has been set correctly you can also read out the register and the driver will give you back the sample rate that is matching your desired one best Register Value Direction Description d SPC_SAMPLERATE 20000 Defines the sample rate in Hz for internal sample rate generation Read out the internal sample rate that is nearest matching to the desired one If a sample rate is generated internally you can additionally enable the clock output The clock will be available on the external clock con nector and can be used to synchronize external equipment with the boar
149. sewidth time no trigger will be detec ted If the pulsewidth counter reaches the programmed amount of samples without the signal crossing the trigger level in the opposite direction the triggerevent will be de re tected PW Triggerlevel Triggerevent The pulsewidth trigger modes for long pulses can be used to prevent the board from triggering on wrong short edges in noisy signals Register Value Direction Set it to the desired triggerlevel relatively to the channel s input range Set to the desired pulsewidth in samples Channel pulsewidth trigger for long negative pulses The analog input is continuously sampled with the selected sample rate If the programmed triggerlevel is crossed by the channel s signal from higher to lower values falling edge the pulsewidth counter is started If the signal crosses the triggerlevel again in the opposite direction within the the programmed pulsewidth time no trigger will be detec ted If the pulsewidth counter reaches the programmed amount of samples without the signal crossing the trigger level in the opposite direction the triggerevent will be de tected Triggerevent The pulsewidth trigger modes for long pulses can be used to prevent the board from triggering on wrong short edges in noisy signals Register ________________ Value Direction _ SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 CHXNEG 10011 SPC_HIGHLEVELO 42000 Se
150. stalled 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 Interrupt Sharing This board uses a PCI interrupt for DMA data transfer and for controlling the FIFO mode The used interrupt line is allocated by the PC BIOS at system start and is normally depending on the selected slot Because there is only a limited number of interrupt lines available on the bus it can happen that two or more boards must use the same interrupt line This so called interrupt sharing must be supported by all drivers of the participating equipment 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 If this happens it is necessary to reconfigure the system in that way that the critical equipment has an exclusive access to an interrupt On most systems the BIOS shows a list of all installed PCI boards with their allocated interrupt lines directly after system start You have to check whether an interrupt line is shared between two boards Some BIOS allow the ma
151. ster SPC_TIMESTAMP_CMD 47000 Reads out the actual timestamp mode TS_RESET Resets the whole counter of the timestamp module to zero Waits for synchronization to an external seconds signal This may last up to 1 second The lower part of the counter can be reset with the external fed in second signal The edge of the reset signal can be programmed with the SPC_TIMESTAMP_RESETMODE register as shown in the table below TS MODE DISABLE Disables the timestamp module No timestamps are recorded TS MODE REFCLOCK 13 Must be written to enable the RefClock timestamp mode The counter must be manually reset by writing the command TS RESET to the command register The counter is splitted into two parts The upper part counts the seconds of an external reference clock The lower part is reset on each second signal and counts the samples The edge of the external TTL seconds signal can be programmed by the following register either to detect the rising or falling edge Register 1 Value Direction Description d values written here do not affect the timestamp command TS RESET To get recordings in relation to each other it is importent to know the absolute start time This time can be easily read out by the following register The time is given back in seconds since midnight 00 00 00 January 1 1970 which is the standard time C C Register Value Direction Description _ _ 6_6__ _6_6_ __ _6__ _ SPC TIMESTAMP STARTTIME 4
152. ster Value Direction Description __6_ ______ ___ ____9____ SPC_FIFO_BUFLEN 60010 Length of each buffer in bytes Must be a multiple of 1024 bytes Each FIFO buffer can be a maximum of half the memory Be aware that the buffer length is given in overall bytes not in samples Therefore the value has to be calculated depending on the activated channels and the resolution of the board 50 MI 20xx Manual FIFO Mode Programming Analog acquisition or generation boards Buffer length to be programmed in Bytes 8 bit resolution 12 bit resolution 14 bit resolution 16 bit resolution 1 Channel 1 x Samples in Buffer 1 x 2 x Samples in Buffer 1 x 2 x Samples in Buffer 1 x 2 x Samples in Buffer 2 Channels 2 x Samples in Buffer 2 x 2 x Samples in Buffer 2 x 2 x Samples in Buffer 2 x 2 x Samples in Buffer A Channels 4 x Samples in Buffer A x 2 x Samples in Buffer 4 x 2 x Samples in Buffer 4 x 2 x Samples in Buffer 8 Channels 8 x Samples in Buffer 8 x 2 x Samples in Buffer 8 x 2 x Samples in Buffer 8 x 2 x Samples in Buffer Digital 1 0 701x or 702x or pattern generator boards 72 Buffer length to be programmed in Bytes 8 bit mode 16 bit mode 32 bit mode 64 bit mode Samples in Buffer 2 x Samples in Buffer 4 x Samples in Buffer 8 x Samples in Buffer Digital board 7005 only Buffer length to be programmed in Bytes 1 bit mode 2 bit mode 4 bit mode 8 bit mode 16 bit mode 1 Channel 1 8
153. t can be 1 7 written to the timestamp command register Register Value Direction Description _ _ _6__ __ _ _6_ ___6_ __ _ SPC_TIMESTAMP_CMD 47000 Writes a command to the timestamp command register SPC_TIMESTAMP_CMD 47000 Reads out the actual timestamp mode TS_RESET Resets the counter of the timestamp module to zero TS_MODE_DISABLE Disables the timestamp module No timestamps are recorded TS_MODE_STARTRESET 11 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 RefClock mode optional The counter is spilt in a HIGH and a LOW part and an additional secons signal that affects both parts of the counter TTL pulse with f 1 Hz is must be externally fed in 78 MI 20xx Manual Option Timestamp Timestamp Status 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 This mode allows the recording of an absolute time of a trigger event This even allows the synchronization of data that has been recorded with different boards Register Value Direction Description _ _ _6__ _ __ _ ____ __ SPC_TIMESTAMP_CMD 47000 Writes a command to the timestamp command regi
154. t it to the desired triggerlevel relatively to the channel s input range board dependant SPC_PULSEWIDTH 44000 Set to the desired pulsewidth in samples 66 MI 20xx Manual Trigger modes and appendant registers Channel Trigger 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 If the signal does cross the triggerlevel again within the the programmed pulsewidth time a triggerevent will be detec ted Triggerevent Register Value Direction Set it to the desired triggerlevel relatively to the channel s input range Set to the desired pulsewidth in samples Channel pulsewidth trigger for short negative pulses The analog input is continuously sampled with the selected sample rate If the programmed triggerlevel is crossed by the channel s signal from higher to lower values falling edge the pulsewidth counter is started If the pulsewidth counter reaches the programmed amount of samples no trigger will be detected If the signal does cross the triggerlevel again within the the Triggerlevel programmed pulsewidth time a triggerevent will be detec ted Triggerevent Regiser Value Direction _ SPC TRIG
155. t of user settings that can be saved within the on board EEPROM The default settings of the offset and gain values are read only and cannot be written to the EEProm by the user You can easily either save adjustment settings to the EEPROM with SAVE or recall them with SPC ADJ LOAD These two registers are shown in the table below The values for these EEPROM access registers are the sets that can be stored within the EEPROM The amount of sets available for storing user offset settings depends on the type of board you use The table below shows all the EEPROM sets that are available for your board Register Value Direction Description __6_6_6__ _ __ _ ___ _____ SPC ADJ LOAD 50000 w Loads the specified set of settings from the EEPROM The default settings are automatically loaded the driver is started fr Reads out what kind of settings have been loaded last SPC_ADJ_SAVE 50010 Stores the actual settings to the specified set in the EEPROM T fr Reads out what kind of settings have been saved last DEFAULT Default settings can be loaded only These settings cannot be saved by user ADJ_USERO Mie User settings This is a valid set for storing user offset settings to If you want to make an offset adjustment on all the channels and store the data to the ADJ_USERO set of the EEPROM you can do this the way the following example shows To work with these settings instead wi
156. te must be set up as the clock master This maximum sum sample rate is used as the overall sync speed which is distributed via the sync bus If you have cal culated the sync speed you can calculate the clock dividers for the diffe rent boards with the formula on the right SvneSneed The maximum possible channels per module for all Spectrum boards are given in the table below ___ 20 x 30xx 1 x 40 45 x 60 lxx x 70 72xx x qug 1 22000 ___ E EE 32 ae ae E Es Sain E a ee 7 _ 31 p __ d dq 15 E L gu E L L oum _ eee EE stc E LLL LEE eee L LLL 2020 2 2021 2 Lj p ais a 1 Co o N E ae ___ dL LLL ___ __ 2 _ qb ee 87 25 EE Em e H EE TERR ERE RR c Spectrum GmbH 91 Additions for synchronizing different boards Synchronization Option Setting up the clock divider The clock divider can easily be set by the following register Please keep in mind that the divider must be set for every synchronized board to have synchronization working correctly For more details on the board s clocking
157. tected These edge triggered channel trigger modes correspond to the trigger possibilities of usual ocilloscopes Triggerevent Register ___ Direction Value __ SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXNEG 10010 SPC_HIGHLEVELO 42000 Set it to the desired triggerlevel relatively to the channel s input range board dependant Channel trigger on positive and negative edge The analog input is continuously sampled with the selected sample rate If the programmed triggerlevel is crossed by the channel s signal either rising or falling edge the trigge revent will be detected These edge triggered channel trigger modes correspond to the trigger possibilities of usual ocilloscopes Triggerevent Triggerevent Register ________________ Value Direction _ SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXBOTH 10030 SPC_HIGHLEVELO 42000 Set it to the desired triggerlevel relatively to the channel s input range board dependant c Spectrum GmbH 65 Channel Trigger Trigger modes and appendant registers Channel pulsewidth trigger for long 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 signal crosses the triggerlevel again in the opposite direction within the the programmed pul
158. tes above 100 MS is described in the next chapter Interlace mode In standard mode tha data is organized on the board in two memory channels named memory channel 0 and memory channel 1 The data in memory is organized depending on the used channels and the type of board This is a result of the internal hardware structure of the board ChO Chl Ch2 Ch3 Sample ordering in standard mode on memory channel Sample ordering in standard mode on memory channel 1 A9 BA A9 BO 2 4 B5 B7 B8 B9 BA CO DO C D1 2 D2 D3 04 The samples re named for better readability AO is sample O of channel 0 is sample 4 of channel 2 Sample format The 8 bit samples in twos complement are always stored in memory as sign extended 8 bit integer values This leads to a range of possible integer values 128 0 127 Standard Mode _____ s bo Reading out the data with SpcGetData The function SpcGetData enables you to read out the data that is stored in the on board memory during any of the standard recording modes easily after the acquisition has finished Depending on your operating system the function is called with a different amount of parameters c Spectrum GmbH 47 Programming Standard acquisition modes Please refer to the relating chapter earlier in this manual The examples in this section are written in Visual C for Windows so the examples differ a li
159. th the default ones at for example another day you need to restore your user settings with the help pf the SPC_ADJ_LOAD register as the following example shows 4A MI 20xx Manual Standard acquisition modes General Information 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 The sampled and converted data is stored in the onboard memory and is held there for being read out after the acquisition This mode allows sampling at very high conversion rates without the need to transfer the data into the memory of the host system at high speed After the recording is done the data can be read out by the user and is transfered via the PCI bus into PC memory This standard recording mode is the most common mode for all ana log acquisition and oscilloscope boards The data is written to a programmed amount of the onboard memory memsize That part of memory is used as a ringbuffer and recording is done conti nuously until a triggerevent is detected After the trigger event a certain programmable amount of data is recorded posttrigger and then the recording finishes D
160. the star hub piggy back module as last Otherwise the trigger masters that are started first might detect trigger events while other trigger masters haven t even been started Be sure that the pretrigger area of all other trigger masters is filled at the moment when the pretrigger area of the star hub board has been filled To find out what board is carrying the starhub piggy back module you make use of the board s feature registers as described in the chapter about programming the board Example of starting the trigger master board 11 Wait for the end of the measurement After having started the last board you will have to wait until the measurement is done Depending if you use the board in standard non FIFO mode interrupt driven or not you can poll for the board s status Please refer to the relating chapter in this manual It is necessary to wait until each board returns the status SPC_READY before proceeding Example for polling for three synchronzed boards 12 Read data from the on board memory acquisition boards only If one or more of the synchronized boards are used for recording data transient recorder boards or digital O boards with one or more channels set to input direction you have to read out the data from the board s on board memory now Please refer to the related chapter for the standard non FIFO mode in this manual If none of your synchronized boards is used for recording purposes you can ignore thi
161. ttle bit for the use with linux As the data is read out individually for every memory channel it is important to know where the data has been stored Please refer to the data organization section to get the information you need first Assuming that you know the memory channel or channels that contain the acquired data you now have to decide whether you want to read out the whole memory or just one part of it To select the area to be read out two values are needed by the function SpcGetData The value start as a 32 bit integer value This value defines the start of the memory area to be read out in samples This result is that you do not need to care for the number of bytes a single sample contains If you want to read out the whole memory this value must be set to 0 The value len as a 32 bit integer value This value defines the number of samples that are read out beginning with the first sample defined by the start value mentioned above If you want to read out the whole on board memory you need to program parameter to the before programmed memory size At this point please keep in mind that depending on the activated channels there may be more than one board channel in one memory channel This value must be a total memsize for all channels that are acquired in that memory channel As a result that means if acquiring two channels to memory channel the value must be set to 2 memsize
162. ual Introduction Hardware information Block diagram Technical Data Resolution Differential linearity error ADC Integral linearity error ADC Multi Trigger to 1st sample delay Multi Recovery re arm time Trigger accuracy 2 4 channel mode Trigger accuracy 1 channel mode Ext clock delay to internal clock input signal with 50 termination Trigger output delay Input impedance Min internal clock Min external clock Trigger input Standard TTL level Trigger output Input range 8 bit 0 5 LSB typ 0 5 LSB typ fixed lt 20 samples 1 Sample 2 Samples 42 ns 2 ns max 5 V rms 1 Sample 50 Ohm 1 MOhm 25 pF 1 kS s 1 MS s Low 0 5 gt level lt 0 8 V High 2 0 V gt level lt 5 5 V Trigger pulse must be valid gt 2 clock periods Standard TTL capable of driving 50 Ohm Low lt 0 4 V 20 mA max 64 mA High gt 2 4 V 20 mA max 32 mA One positive edge after the first internal trigger Trigger Multiplexer Offset Gain Trigger Multiplexer Hardware information 71 Bank 1 Board Control Offset Gain Mem Control Trigger Clock Star Hub Timestamp Extra I D PCI Interface Dimension Width Standard Width with star hub option Analogue Connector Overvoltage protection range lt 500 mV Overvoltage protection range gt 500 mV Warm up time Operating tem
163. ue to the continuously ringbuffer recor ding there are also samples prior to the triggerevent in the memory pretrigger Pretrigger Posttrigger Memsize P When the board is started the pretrigger is filled up with data first While doing this the board s trigger de tection is not armed If you use a huge pretrigger size and a slow sample rate it can take up some time after starting the board before a trigger event will be detected Programming Memory Pre and Posttrigger At first you have to define how many samples are to be recorded at all and how many of them should be acquired after the triggerevent has been detected Register Direction Description SPC_MEMSIZE 10000 Sets the memory size in samples per channel SPC_POSTTRIGGER 10100 Sets the number of samples to be recorded after the trigger event has been detected You can access these settings by the registers SPC MEMSIZE which sets the total amount of data that is recorded and the register SPC POSTTRIGGER that defines the number of samples to be recorded after the triggerevent has been detected The size of the pretrigger results on the simple formula pretrigger memsize posttrigger The maximum memsize that can be use for recording is of course limited by the installed amount of memory and by the number of channels to be recorded The following table gives you an overview on the maximum memsize in relation to the installed memory Maxi
164. ult in a time shift between the boards It is of course possible to set different edges or different trigger levels on the channels It is only possible to use the synchronization OR trigger if the board carrying the starhub piggy back module A is one of the boards that is programmed as a trigger master To find out what board is carrying the starhub piggy back module you make use of the board s feature registers as described the chapter about initialising the board Example of setting up three boards to be trigger master 5 Define the remaining boards as trigger slaves As you can set more than one board as the trigger master starhub option only you have to tell the driver additionally which of the boards are working as trigger slaves Register Value Direction Description _____9 ___ _ 0 _ _ _ __ _ ______ SPC_COMMAND ___ ____ Command register of the board SPC_SYNCTRIGGERSLAVE Defines the according board as the trigger slave Each of the synchronized boards must be set up either as a trigger master or as a trigger slave to get the It is assumed that only one of the three boards board 2 in this case is set up as trigger master as described in 3 synchronization option working correctly Therefore it does not matter if you use the cascading or starhub option It sometimes might be necessary to exclude one or more boards from the synchronization trigger An example for this solutio
165. vers for third party software like LabVIEW MATLAB DASYLab or VEE an additional manual is required that is de livered with the ordered driver option Software Overview Customer specific application Compiler Basic Delphi C C MATLAB DASYLab VEE LabVIEW drivers The Spectrum drivers offer you a common and fast API for using all of the board hardware features This API is nearly the same on all operating systems Based on this API one can write your own programs using any programming language that can access the driver API This manual detailed describes the driver API allowing you to write your own programs The optional drivers for third party products like LabVIEW or DASYLab are also based on this API The special functionality of these drivers is not subject of this manual and is described on separate manuals delivered with the driver option First Test with SBench After installation of the board and the drivers it can be useful to first test the board function with a ready to run software before starting with programming A full version of SBench 5 x is de livered with the board on CD The program supports all actual acquisition generator and dig ITE ital I O boards from Spectrum Depending on the used board and the software setup one aa could use SBench as a digital storage oscilloscope spectrum analyser logic analyser or 0 simply as a data rec
166. w the actually selected input range Trigger step width Number of trigger levels 1 To give you an example on how to use this formular we assume that the 1000 mV 1000 mV 1 0 V input range is selected and the board uses 8 bits for trigger detection Trigger step width 25541 The result would be 7 81 mV which is the step width for your type of board withing the actually chosen input range 64 MI 20xx Manual Trigger modes and appendant registers Channel Trigger 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 These edge triggered channel trigger modes correspond to the trigger possibilities of usual ocilloscopes Triggerevent Register ________________ Value ___ Direction SPC_TRIGGERMODE 40000 TM_CHANNEL 20040 SPC_TRIGGERMODEO 40200 TM_CHXPOS 10000 SPC_HIGHLEVELO 42000 Set it to the desired triggerlevel relatively to the channel s input range board dependant Channel trigger on negative edge The analog input is continuously sampled with the selected sample rate If the programmed triggerlevel is crossed by the channel s signal from higher values to lower values fal ling edge then the triggerevent will be de
167. what channel activation mask the driver has set Reading out the channel enable register can be done directely after setting it or later like this Important note on channels selection As some of the manuals passages are used in more than one hardware manual most of the registers and channel settings throughout this handbook are described for the maximum number of possible channels that are available on one board of the actual series There can be less channels on your actual type of board or bus system Please refer to the table above to get the actual number of available channels c Spectrum GmbH 41 Setting up the inputs Analog Inputs Setting up the inputs Input ranges This analog acquisition board uses separate input amplifiers and converters on each channel This gives you the possibility to set up the de sired and concerning your application best suiting input range also separately for each channel The input ranges can easily be set by the corresponding input registers The table below shows the available input registers and possible ranges for your type of board Register Value _ Direction Description _______________________ 5000 5 V calibrated input range for the appropriate channel The different input ranges are set with the help of relais These relais need a settling time if they are changed so that the relais are fully set and didn t influence the signal when the board is started The following table shows t
168. x Samples in Buffer 1 4 x Samples in Buffer 1 2 x Samples in Buffer Samples in Buffer 2 x Samples in Buffer We at Spectrum achieved best results when programming the buffer length to a number of samples that can hold approximately 100 ms of data However if going to the limit of the PCI bus with the FIFO mode or when having buffer overruns it can be useful to have larger FIFO buffers to buffer more data in it When the goal is a fast update in FIFO mode smaller buffers and a larger number of buffers can be a better setup Register Value Direction Description _________3____ SPC FIFO BUFADRO 60100 32 bit address of FIFO buffer O Must be allocated by application program SPC_FIFO_BUFADR 1 60101 32 bit address of FIFO buffer 1 Must be allocated by application program SPC_FIFO_BUFADR255 32 bit address of FIFO buffer 255 Must be allocated by application program The driver handles the programmed number of buffers To speed up FIFO transfer the driver uses buffers that are allocated and maintained by the application program Before starting the FIFO mode the addresses of the allocated buffers must be set to the driver Example of FIFO buffer setup No memory allocation error checking in the example to improve readability Buffer processing The driver counts all the software buffers that have been transferred This number can be read out from the driver to know the exact amount of data that has been transferred Register
169. y installed from the device manager Therefore please open the properties page of the driver as shown in the section before As next step click on the update driver button and follow the steps of the driver installation in a similar way to the previous board and driver installation Please select the path where the new driver version was unzipped to If you ve got the new driver version on CD please select the NDriverNWin98 2k XP path on the CD containing the new driver version The new driver version can be used directly after installation without restarting the system Please keep in mind to update the driver of all installed Spectrum boards c Spectrum GmbH Driver Provider Spectrum GmbH Driver Date 4 30 2004 Driver Version 3 7 0 0 Digital Signer Not digitally signed Driver Details view details about the driver files To update the driver for this device If the device fails after updating the driver roll a back to the previously installed driver To uninstall the driver Advanced Hardware Update Wizard Welcome to the Hardware Update mE B wizard This wizard helps you install software for MI 3020 If your hardware came with an installation CD lt 6 or floppy disk insert it now What do you want the wizard to do O Install the software automatically Recommended Click Next to continue Hardware Update Wizard Please choose your search and installation options e

Download Pdf Manuals

image

Related Search

Related Contents

  取扱説明書 (33515 33551)リザーブタンクレスキット  LC-P-2313 - Gazanaliz.ru  User Manual  DeLOCK USB 3.0 Adapter    User Manual - Reliability Direct, Inc.    User Manual XH-W1301  

Copyright © All rights reserved.
Failed to retrieve file