Spectrum M2p.59 Series Hardware Manual Download Page 10

10

(c) Spectrum Instrumentation GmbH

Markings and Labelling

Safety Instructions

Repair/Service

In the event of a necessary repair, the product must be returned to the manufacturer. Before returning any good get in contact with the support 

group and obtain a RMA code. The support group can be reached by email: [email protected]

Please ensure suitable packaging to avoid damage during transport.

World-wide service address is:

Spectrum Instrumentation GmbH

Ahrensfelder Weg 13-17

22927 Grosshansdorf

Germany

Cleaning the module housing (NETBOX devices, cables, amplfiers, systems only)

Use a dry or lightly moistened, soft cloth for cleaning the module housing. Do not user any sprays, solvents or abrasive cleaners which could 

damage the housing. Ensure that no moisture enters the housing. Never spray cleaning agents directly onto the module.

Opening the module (NETBOX devices, amplifiers only)

Do not open or change the module housing! Work on the module housing may only be performed by the manufacturer. 

Dismounting parts of the card (instrument card only)

Do not dismount any part of the card like modules, front plates or internal cable connections.

Markings and Labelling

The product complies with the current European directives on CE marking. A CE declaration of conformity is available on request.

The product complies with the current European Directives on the Use of Certain Hazardous Substances (RoHS-3) 2015/863/EU).

According to the European directive WEEE (Waste Electrical and Electronic Equipment), the user is obliged to return the product to the system 

for collection, treatment and recycling of waste electronic equipment. Disposal via residual waste is not permitted.

Up-to-date information on notifiable substances according to REACH regulation (EC) No 1907 /2006 can be quoted on request. 

Summary of Contents for M2p.59 Series

Page 1: ...xx x4 Fast 16 bit transient recorder digitizer A D converter board for PCI Express bus Hardware Manual Software Driver Manual Valid for all hardware firmware and soft ware versions Manual Version 27 July 2021 ...

Page 2: ... a registered trademark of Weisang GmbH Co KG PCIe PCI Express PCI X and PCI SIG are trademarks of PCI SIG PICMG and CompactPCI are trademarks of the PCI Industrial Computation Manufacturers Group PXI is a trademark of the PXI Systems Alliance LXI is a registered trademark of the LXI Consortium IVI is a registered trademark of the IVI Foundation Oracle and Java are registered trademarks of Oracle ...

Page 3: ...ies 13 Additional options 15 Digital I O with Dig SMB 15 Digital I O with Dig FX2 15 Star Hub 16 The Spectrum type plate 17 Hardware information 18 Block Diagrams 18 Technical Data 19 Order Information 25 M2p Order Information 25 Hardware Installation 27 ESD Precautions 27 Sources of noise 27 Cooling Precautions 27 Connector Handling Precautions 27 M2p PCIe Cards 28 System Requirements 28 Installi...

Page 4: ... SBench 6 45 C C Driver Interface 45 Header files 45 General Information on Windows 64 bit drivers 46 Microsoft Visual C 6 0 2005 and newer 32 Bit 46 Microsoft Visual C 2005 and newer 64 Bit 46 C Builder 32 Bit 46 Linux Gnu C C 32 64 Bit 47 C for NET 47 Other Windows C C compilers 32 Bit 47 Other Windows C C compilers 64 Bit 47 Driver functions 47 Delphi Pascal Programming Interface 53 Driver inte...

Page 5: ...5 Input ranges 75 Input offset 76 Input termination 77 M2p 591x Digital bandwidth filter 77 Automatic on board calibration of the offset and gain settings 77 Read out of input features 78 Acquisition modes 79 Overview 79 Setup of the mode 79 Commands 80 Card Status 81 Acquisition cards status overview 81 Generation card status overview 81 Data Transfer 82 Standard Single acquisition mode 84 Card m...

Page 6: ...uts 125 Additional I O lines with Option DigSMB and DigFX2 127 Programming the behavior 127 Asynchronous I O 128 Synchronous digital inputs 128 Mode Multiple Recording 131 Recording modes 131 Standard Mode 131 FIFO Mode 131 Limits of pre trigger post trigger memory size 132 Multiple Recording and Timestamps 133 Trigger Modes 133 Trigger Counter 133 Programming examples 134 Mode Gated Sampling 135 ...

Page 7: ...zed cards 172 Error Handling 172 Option Remote Server 173 Introduction 173 Installing and starting the Remote Server 173 Windows 173 Linux 173 Detecting the digitizerNETBOX generatorNETBOX hybridNETBOX 173 Discovery Function 173 Finding the digitizerNETBOX generatorNETBOX hybridNETBOX in the network 174 Troubleshooting 175 Accessing remote cards 175 Appendix 176 Error Codes 176 Spectrum Knowledge ...

Page 8: ...s product Table 1 Symbols and Safety Labels Label Where Description Cards ESD symbol Parts can be damaged by electrostatic discharge Follow these precautions Avoid touching pins leads or circuitry Always be properly grounded when touching a static sensitive component or assembly NETBOX chassis GND symbol To enhance the immunity of the equipment against conducted and radiated RF disturbance sensiti...

Page 9: ...nments or in potentially explosive areas is not permitted The installer is responsible for the safety of the system in which the device is installed Electrical safety and power supply Observe the regulations applicable at the operating location concerning electrical safety as well as the laws and regulations concerning work safety Connect only current circuits with safety extra low voltage in acco...

Page 10: ...cleaning agents directly onto the module Opening the module NETBOX devices amplifiers only Do not open or change the module housing Work on the module housing may only be performed by the manufacturer Dismounting parts of the card instrument card only Do not dismount any part of the card like modules front plates or internal cable connections Markings and Labelling The product complies with the cu...

Page 11: ... sync cables Star Hub M2p xxxx SH16ex SH16tm Optional Star Hub mounted on card containing 16 sync cables Digital Option M2p xxxx DigSMB Optional Digital option mounted on card Digital Option M2p xxxx DigFX2 Optional Digital option mounted on card containing one Cab d40 idc 100 cable in separate bag Manual Yes Printed Installation Manual USB Stick Yes Containing drivers software and programming man...

Page 12: ...rdware failures resulting from incorrect usage Overview M2p cards for PCI Express PCIe General Information The M2p 59xx series allows recording of up to 8 channels in the low medium and high speed segment Due to the modular design a wide variety of 16 bit A D converter boards PCI Express PCIe bus can be offered These boards are available in several versions and different speed grades making it pos...

Page 13: ...the model dependent location of the input connectors M2p 5920 x4 M2p 5930 x4 M2p 5940 x4 M2p 5960 x4 M2p 5911 x4 M2p 5921 x4 M2p 5931 x4 M2p 5941 x4 M2p 5961 x4 M2p 5912 x4 M2p 5922 x4 M2p 5932 x4 M2p 5942 x4 M2p 5962 x4 Image 1 M2p card and front panel for versions with one differential channel Image 2 M2p card and front panel for versions with two differential channels Image 3 M2p card and front...

Page 14: ...6 x4 M2p 5926 x4 M2p 5936 x4 M2p 5946 x4 M2p 5966 x4 M2p 5913 x4 M2p 5923 x4 M2p 5933 x4 M2p 5943 x4 M2p 5968 x4 Image 4 M2p card and front panel for versions with four differential channels Image 5 M2p card and front panel for versions with four differential channels eight single ended channels ...

Page 15: ...i pin FX2 connector a type that is already used on many different Spectrum products in the past and pin compatible to the exist ing options and cards using it The pinning for that connector and the included adapt er cable to standard IDC connectors is giv en in the appendix of this manual These lines extend the already existing Multi Purpose I O lines that come stand ard with the main card X0 X3 B...

Page 16: ...th of an additional slot The module acts as a star hub for clock and trigger signals Each board is con nected with a small cable of the same length even the master board That minimizes the clock skew between the different cards The picture shows the extension module mounted on the base board schematically without any cables to achieve a better visibility The carrier card acts as the clock master a...

Page 17: ...rder information In this example no additional options are installed The base card version consisting of the printed circuit board PCB version the hardware version and the firmware version The version of the analog digital front end module consisting of the printed circuit board PCB version the hardware version and the firmware version if available If no programmable device is located on the modul...

Page 18: ...H Hardware information Introduction Hardware information Block Diagrams M2p 59xx Block Diagram Image 9 Block DIagram of M2p 59xx showing the analog module green and the components of the base card The optional star hub is shown in red ...

Page 19: ...20 MHz 3rd order butterworth alike fixed 40 MHz 3rd order butterworth alike fixed 60 MHz 3rd order butterworth alike CMRR Common Mode Rejection Ratio range 1V 100 kHz 75 dB 1 MHz 60 dB 10 MHz 40 dB CMRR Common Mode Rejection Ratio range 2V 100 kHz 55 dB 1 MHz 52 dB 10 MHz 50 dB Maximum Common Mode Voltage Differential Input Input Range VCM 200 mV 900 mV 500 mV 2 25 V 1 V 2 25 V 2 V 9 V 5 V 22 5 V ...

Page 20: ...pdate rate synchronous modes sampling clock Input signal levels 3 3 V LVTTL Input impedance 10 k to 3 3 V Input maximum voltage level 0 5 V to 4 0 V Input maximum bandwidth 125 MHz Input available signal types software programmable Synchronous Digital In M2p 59xx only Asynchronous Digital In Output available signal types software programmable Run Arm Trigger Output Synchronous Digital Out M2p 65xx...

Page 21: ...able Type Cab 3f xx xx Trigger Input SMB male Cable Type Cab 3f xx xx Clock Input SMB male Cable Type Cab 3f xx xx Standard Multi Purpose I O MMCX female 4 lines Cable Type Cab 1m xx xx Option M2p xxxx DigSMB on extra bracket SMB male Cable Type Cab 3f xx xx Option M2p xxxx DigFX2 on extra bracket 40 pole half pitch Hirose FX2 Cable Type Cab d40 xx xx Dimension Single Card type M2p 65x3 M2p 65x8 M...

Page 22: ... EN 61000 4 3 2011 Safety Compliance Compliant with CE Mark Low Voltage Directive 2014 35 EU LVD Applied Standards EN 61010 1 2010 RoHS Compliance RoHS Directive 2015 863 EC RoHS Directive 2011 65 EC RoHS II RoHS Directive 2002 95 EC RoHS REACH Compliance REACH directive 2006 1907 EC Product warranty 5 years starting with the day of delivery Software and firmware updates Life time free of charge 3...

Page 23: ... 6 V 305 2 V 50 6 0 LSB 37 V 5 0 LSB 77 V 4 5 LSB 138 V 6 5 LSB 397 V 5 0 LSB 763 V 4 5 LSB 1 4 mV 1 M 6 5 LSB 40 V 5 0 LSB 77 V 4 5 LSB 138 V 6 5 LSB 397 V 5 0 LSB 763 V 4 5 LSB 1 4 mV M2p 594x Input Range 200 mV 500 mV 1 2 V 5 V 10 V Voltage resolution 6 1 V 15 3 V 30 5 V 61 0 V 152 6 V 305 2 V 50 7 0 LSB 43 µV 5 5 LSB 85 µV 4 5 LSB 138 µV 7 5 LSB 458 µV 5 5 LSB 840 µV 4 5 LSB 1 4 mV 1 M 7 5 LSB...

Page 24: ...dB THD typ 87 8 dB 67 0 dB 89 0 dB 67 0 dB 86 1 dB 67 2 dB 79 0 dB 67 2 dB SFDR typ excl harm 98 3 dB 96 5 dB 98 8 dB 99 5 dB 101 0 dB 100 0 dB 81 7 dB 91 3 dB ENOB based on SNR 11 8 LSB 11 8 LSB 12 1 LSB 12 0 LSB 12 2 LSB 12 2 LSB 11 7 LSB 11 6 LSB ENOB based on SINAD 11 8 LSB 10 7 LSB 12 1 LSB 10 7 LSB 12 2 LSB 10 8 LSB 11 6 LSB 10 7 LSB M2p 594x Test sampling rate 80 MS s Input Range 200 mV 500...

Page 25: ...s 8 channels 125 MS s 80 MS s 4 channels 125 MS s Options Order no Option M2p xxxx SH6ex 1 Synchronization Star Hub for up to 6 cards incl cables only one slot width card length 245 mm M2p xxxx SH6tm 1 Synchronization Star Hub for up to 6 cards incl cables two slots width standard card length M2p xxxx SH16ex 1 Synchronization Star Hub for up to 16 cards incl cables only one slot width card length ...

Page 26: ...i Option multiple cards Needs SBench6 Pro Handles multiple synchronized cards in one system Volume Licenses Please ask Spectrum for details Software Options Order no SPc RServer Remote Server Software Package LAN remote access for M2i M3i M4i M4x M2p cards SPc SCAPP Spectrum s CUDA Access for Parallel Processing SDK for direct data transfer between Spectrum card and CUDA GPU Includes RDMA activati...

Page 27: ...ilters make sure that these are regularly cleaned Set the rotation speed for all chassis fans and especially those providing air for the PCIe cards to highest setting in the BIOS UEFI Whenever possible leave the slot adjacent to the M2p card empty This allows for best possible air flow over the card s surface If you do need to to use any adjacent slots preferably install cards that grant the most ...

Page 28: ...s x4 x8 or x16 slot electrically either x1 x4 x8 or x16 Now insert the board slowly into your computer This is done best with one hand each at both fronts of the board After the insertion of the board fasten the screw of the bracket carefully without overdoing Please take special care to not bend the card in any direction while inserting it into the system A bending of the card may damage the PCB ...

Page 29: ...ith digital inputs outputs mounted on an extra bracket Before installing the board you first need to unscrew and remove the dedicated blind bracket usually mounted to cover unused slots of your PC Please keep the screw in reach to fasten your Spectrum card afterwards All Spectrum M2p cards mechanically require one PCI Express x4 x8 or x16 slot electrically either x1 x4 x8 or x16 Now insert the boa...

Page 30: ...inst wrong plugging but nonetheless you should take care to have the pin 1 markers on the connector and on the cable on the same side as the figure on the right is showing Mounting the wired boards Before installing the cards you first need to unscrew and remove the dedicated blind brackets usually mounted to cover unused slots of your PC Please keep the screws in reach to fasten your Spectrum car...

Page 31: ...3i M4i M4x and M2p series meaning that you can use the same driver for all cards of these families Windows Before installation When you install a card for the very first time Windows will dis cover the new hardware and might try to search the Microsoft Website for available matching driver modules Prior to running the Spectrum installer the card will appear in the Windows device manager as a gener...

Page 32: ...Spectrum driver installer the card will appear in the Windows device manager with its name matching the card se ries The card is now ready to be used Image 17 Spectrum Driver Installer Progress Image 18 Spectrum Driver Installer finished Image 19 Windows Device Manager showing properly installed Spectrum card ...

Page 33: ...m Each of these distri butions has been installed with the default setup using no kernel updates A lot more different distributions are used by customers with self compiled kernel driver modules Standard Driver Installation The driver is delivered as installable kernel modules together with libraries to access the kernel driver The installation script will help you with the installation of the ker...

Page 34: ..._spcm4_linux_kerneldrv sh This script will examine the type of system you use and compile the kernel with the correct settings The compilation of the kernel driver modules requires the kernel sources of the running kernel These are normally available as a package with a name like kernel devel kernel dev kernel source and need to match the running kernel The compiled driver module will be copied to...

Page 35: ...ailable for Linux and needs to be installed sep arately The features of the Control Center are described in a later chapter in deeper detail The Control Center has been tested under all Linux distributions for which Spec trum delivers pre compiled kernel modules The following packages need to be in stalled to run the Control Center X Server expat freetype fontconfig libpng libspcm_linux the Spectr...

Page 36: ...ill doesn t help please add the library path to etc ld so conf and run ldconfig again If the libspcm_linux so is quoted as missing please make sure that you have installed the card driver properly before If any other library is stated as missing please install the matching package of your distribution spcm_control error while loading shared libraries libz so 1 cannot open shared object file No suc...

Page 37: ...he CD or on the website Card Control Center A special card control center is available on CD and from the internet for all Spec trum M2i M3i M4i M4x M2p cards and for all digitizerNETBOX generatorNETBOX or hybridNETBOX products Windows users find the Control Center installer on the CD under Install win spcmcontrol_install exe Linux users find the versions for the different stdc libraries under Ins...

Page 38: ...he serial number This is the stored information that al lows other Spectrum products to access previously found cards Using the Update cached cards button will try to re open these cards and gather information of it Afterwards the remote cards may disappear if they re in use from somewhere else or the complete information of the remote products is shown again Enter IP Address of digitizerNETBOX ge...

Page 39: ...n may be hidden as a Windows default and need to be set to visible using the Windows tray setup Left clicking on the tray icon will hide show the small Netbox Monitor status window Right clicking on the tray icon as shown in the picture on the right will open up a context menu In here one can again select to hide show the Netbox Monitor status window one can directly open the web interface from he...

Page 40: ... acquisition card the information con sists of the module s hardware revision of the converter resolution and the last calibration date as well as detailed information on the available analog input ranges offset compensation capabilities and additional features of the inputs Firmware information Another sub tree is informing about the cards firmware ver sion As all Spectrum cards consist of severa...

Page 41: ...ab as the picture is showing in the example The provided information informs about the used type distinguishing between Windows or Linux driver and the 32 bit or 64 bit type It also gives direct information about the version of the installed Spectrum kernel driver separately for M2i M3i cards and M4i M4x M2p cards and the version of the library which is the dll file under Windows The information g...

Page 42: ... hardware simply run the Control Center installer If the installer is not detecting the necessary driver files normally residing on a system with real hardware it will simply install the Spcm_driver Feature upgrade All optional features of the M2i M3i M4i M4x M2p cards that do not require any hardware modifications can be installed on fielded cards After Spectrum has received the order the custome...

Page 43: ...whether a desired acquisition speed is possible to reach one has to calculate the transfer speed in bytes There are a few things that have to be put into the calculation 12 14 and 16 bit analog cards need two bytes for each sample 16 channel digital cards need 2 bytes per sample while 32 channel digital cards need 4 bytes and 64 channel digital cards need 8 bytes The sum of analog channels must be...

Page 44: ...as been created in the standard program installation directory Please do the following steps when wanting to update the firmware of your M2i M3i M4i M4x M2p card Download the latest software driver for your operating system pro vided on the Spectrum homepage Install the new driver as described in the driver install section of your hardware manual or install manual All manuals can also be found on ...

Page 45: ...r programming languages like Delphi Basic Python or Java Please read the following chapters for additional information on this Header files The 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 c_header Please don t change them in any way because they are updated with each new driver...

Page 46: ...al Studio 2005 and newer vcproj that can be directly loaded or imported and compiled There are also some more board type independent examples in separate subdirectory These examples show different aspects of the cards like programming options or synchronization and can be combined with one of the board type specific examples As the examples are build for a card class there are some checking routin...

Page 47: ...e g Borland offers the implib tool that generates a matching library out of the windows driver DLL If such a tool is available it is recommended to use it Otherwise the driver functions need to be loaded from the dll using standard Windows functions There is one example in the example directory examples c_cpp dll_loading that shows the process for 32 bit environments The only line that needs to be...

Page 48: ...number gives the index of the device to open The Windows kernel driver numbers all devices that it finds on boot time starting with 0 Example for local installed cards Example for digitizerNETBOX generatorNETBOX and remote installed cards If the function returns a NULL it is possible to read out the error description of the failed open function by simply passing this NULL to the error function The...

Page 49: ...unctions only differ in the type of the parameters that are used to call them As some of the registers can exceed the 32 bit integer range like memory size or post trigger it is recommended to use the _i64 function to access these registers However as there are some spcm_vClose hDrv uint32 _stdcall spcm_dwSetParam_i32 Return value is an error code drv_handle hDevice handle to an already opened dev...

Page 50: ...ister read spcm_dwGetParam_i64 value is returned as 64 bit integer in pllValue 32 bit register read spcm_dwGetParam_i64m value is returned as 64 bit integer the lower part in plValueLow the upper part in plValueHigh The upper part can be ignored as it s only a sign extension 32 bit register write spcm_dwSetParam_i32 32 bit value can be directly written 32 bit register write spcm_dwSetParam_i64 64 ...

Page 51: ...ted as an error internally as it is not locking the driver but as a valid event Therefore the GetErrorInfo function won t return the timeout event even if it had occurred in between You can only recognize the ERR_TIMEOUT as a direct return value of the wait function that was called Function spcm_dwGetErrorInfo uint32 _stdcall spcm_dwDefTransfer_i64m Defines the transfer buffer by 2 x 32 bit unsign...

Page 52: ...tion GmbH Driver functions Software Example char szErrorBuf ERRORTEXTLEN if spcm_dwSetParam_i64 hDrv SPC_MEMSIZE 1 spcm_dwGetErrorInfo_i32 hDrv NULL NULL szErrorBuf printf Set of memsize failed with error message s n szErrorBuf ...

Page 53: ...files in the project it is also necessary to include them in the uses section of the source files where functions or constants should be used device handling functions function spcm_hOpen strName pchar int32 stdcall external spcm_win32 dll name _spcm_hOpen 4 procedure spcm_vClose hDevice int32 stdcall external spcm_win32 dll name _spcm_vClose 4 function spcm_dwGetErrorInfo_i32 hDevice int32 var lE...

Page 54: ...le implements a very simple scope program that makes single acquisitions on button pressing A fixed setup is done inside the example The spcm_scope example can be used with any analog data acquisition card from Spectrum It covers cards with 1 byte per sample 8 bit resolution as well as cards with 2 bytes per sample 12 14 and 16 bit resolution The program shows the following steps Initialization of...

Page 55: ...es are located in the directory SpcmDrv NET Using C The SpcmDrv NET dll needs to be included within the Solution Explorer in the References section Please use right mouse and select AddReference After this all functions and constants of the driver object are available Please see the example in the directory CSharp as a start Example for digitizerNETBOX generatorNETBOX and remotely installed cards ...

Page 56: ...iver object are available Please see the example in the directory JSharp as a start Example for digitizerNETBOX generatorNETBOX and remotely installed cards open card hDevice Drv spcm_hOpen dev spcm0 if int hDevice 0 Console WriteLine Error Could not open card n return 1 get card type dwErrorCode Drv spcm_dwGetParam_i32 hDevice Regs SPC_PCITYP lCardType dwErrorCode Drv spcm_dwGetParam_i32 hDevice ...

Page 57: ...m_dwGetParam_i32 getattr spcmDll _spcm_dwGetParam_i32 12 spcm_dwGetParam_i32 argtype drv_handle int32 ptr32 spcm_dwGetParam_i32 restype uint32 load spcm_dwGetParam_i64 spcm_dwGetParam_i64 getattr spcmDll _spcm_dwGetParam_i64 12 spcm_dwGetParam_i64 argtype drv_handle int32 ptr64 spcm_dwGetParam_i64 restype uint32 load spcm_dwSetParam_i32 spcm_dwSetParam_i32 getattr spcmDll _spcm_dwSetParam_i32 12 s...

Page 58: ...rned by the driver Examples Examples for Python can be found on CD in the directory examples python The directory contains the above mentioned header files and some examples each of them working with a certain type of card Please feel free to use these examples as a base for your programs and to modify them in any kind When allocating the buffer for DMA transfers use the following function to get ...

Page 59: ...ant names will be found throughout this hardware manual when certain aspects of the driver usage are explained It is recommended to only use these constant names for better readability of the programs SpcmErrors java The SpcmErrors class contains all error codes that may be returned by the driver Examples Examples for Java can be found on CD in the directory examples java The directory contains th...

Page 60: ...iles and some examples each of them working with a certain type of card Please feel free to use these examples as a base for your programs and to modify them in any kind hDevice Int64 spcm_hOpen sDeviceName String Cvoid spcm_vClose hDevice Int64 dwErr UInt32 lValue Int32 spcm_dwGetParam_i32 hDevice Int64 lRegister Int32 dwErr UInt32 llValue Int64 spcm_dwGetParam_i64 hDevice Int64 lRegister Int32 d...

Page 61: ...lculations a GPU can offer thousands of cores This computing capabilities can be used for calculations using the Nvidia CUDA interface Since bus bandwidth and CPU power are often a bottleneck in calculations CUDA Remote Direct Memory Access RDMA can be used to directly transfer data from to a Spectrum Digitizer Generator to from a GPU card for processing thus avoiding the transfer of raw data to t...

Page 62: ...ll of the examples are located in a separated 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 written in C C and can be used with any C C compiler for Windows or Linux Table 8 Spectrum API Command register and basic commands Register Value Direction Description SPC_M2CMD 100 w Command register o...

Page 63: ... the register and value where it occurs will be saved include c_header dlltyp h include c_header regs h include c_header spcm_drv h include stdio h int main drv_handle hDrv the handle of the device int32 lCardType a place to store card information hDrv spcm_hOpen dev spcm0 Opens the board and gets a handle if hDrv check whether we can access the card return 1 spcm_dwGetParam_i32 hDrv SPC_PCITYP lC...

Page 64: ...like shown in the example If one is not interested in the error text but wants to install its own error handler it may be interesting to just read out the error generating register and value Example for error checking with own simple error handler Gathering information from the card When opening the card the driver library internally reads out a lot of information from the on board eeprom The driv...

Page 65: ...ly on the card ordering as this is based on the BIOS the bus connections and the operating system One of the following values is returned when reading this register Each card has its own card type constant defined in regs h Please note that when reading the card information as a hex value the lower word shows the digits of the card name while the upper word is a indication for the used bus type Ta...

Page 66: ... x4 TYP_M2P5966_X4 95966h 612710 M2p 5933 x4 TYP_M2P5933_X4 95933h 612659 M2p 5963 x4 TYP_M2P5963_X4 95963h 612707 Table 11 Spectrum API Register for hardware and PCB versions of standard card Register Value Direction Description SPC_PCIVERSION 2010 read Base card version the upper 16 bit show the hardware version the lower 16 bit show the firmware version SPC_BASEPCBVERSION 2014 read Base card PC...

Page 67: ...r the standard release firm ware the type has always a value of 1 X SPCM_FW_CONFIG 210020 read Configuration controller version the upper 16 bit show the firmware type the lower 16 bit show the firmware version For the standard release firm ware the type has always a value of 1 X X SPCM_FW_MODULEA 210030 read Front end module A version the upper 16 bit show the firmware type the lower 16 bit show ...

Page 68: ... 1024 2 Table 16 Spectrum API Feature Register and available feature flags Register Value Direction Description SPC_PCIFEATURES 2120 read PCI feature register Holds the installed features and options as a bitfield The read value must be masked out with one of the masks below to get information about one certain feature SPCM_FEAT_MULTI 1h Is set if the feature Multiple Recording Multiple Replay is ...

Page 69: ... bitfield The read value must be masked out with one of the masks below to get information about one certain fea ture SPCM_FEAT_EXTFW_SEGSTAT 1h Is set if the firmware option Block Statistics is installed on the board which allows certain statistics to be on board calculated for data being recorded in segmented memory modes such as Multiple Recording or ABA SPCM_FEAT_EXTFW_SEGAVERAGE 2h Is set if ...

Page 70: ... driver is actually used DRVTYP_LINUX32 1 Linux 32bit driver is used DRVTYP_WDM32 4 Windows WDM 32bit driver is used XP Vista Windows 7 Windows 8 Windows 10 DRVTYP_WDM64 5 Windows WDM 64bit driver is used by 64bit application XP64 Vista Windows 7 Windows 8 Windows 10 DRVTYP_WOW64 6 Windows WDM 64bit driver is used by 32bit application XP64 Vista Windows 7 Windows 8 Windows 10 DRVTYP_LINUX64 7 Linu...

Page 71: ...mended that every custom written program performs a software reset first to be sure that the driver is in a defined state independent from possible previous setting Performing a board reset can be easily done by the related board command mentioned in the following table Table 22 Spectrum API command register and reset command Register Value Direction Description SPC_M2CMD 100 w Command register of...

Page 72: ...ot valid If programming an other channel activation the driver will return with an error code ERR_VALUE Table 23 Spectrum API channel enable register used to select the channels for the next acquisition generation Register Value Direction Description SPC_CHENABLE 11000 read write Sets the channel enable information for the next board run hex dec CHANNEL0 1h 1 Activates channel 0 CHANNEL1 2h 2 Acti...

Page 73: ...s to system ground The connector for the positive signal channel x is used in single ended and in differential mode while the connector for the negative input channel x 1 is used in differential mode for the negative phase Even in differential mode the inputs relate to system ground The inputs are not isolated so no connection to levels above the maximum input voltage is allowed The following draw...

Page 74: ...lexed channels one differential or one single ended Register Value Direction Description SPC_DIFF0 30040 r w Set channel 0 to differential mode The default mode is single ended SPC_DIFF1 30140 r w Set channel 1 to differential mode The default mode is single ended SPC_DIFF2 30240 r w Set channel 2 to differential mode The default mode is single ended SPC_DIFF3 30340 r w Set channel 3 to differenti...

Page 75: ... Defines the input range of channel2 SPC_AMP3 30310 r w Defines the input range of channel3 SPC_AMP4 30410 r w Defines the input range of channel4 SPC_AMP5 30510 r w Defines the input range of channel5 SPC_AMP6 30610 r w Defines the input range of channel6 SPC_AMP7 30710 r w Defines the input range of channel7 200 200 mV calibrated input range for the appropriate channel 500 500 mV calibrated inpu...

Page 76: ...to just read out the possible offset than can be programmed You can use the following read only register to get the possible programmable offset range in percent Table 28 Spectrum API input offset registers Register Offset range SPC_OFFS0 30000 r w Defines the input s offset and therefore shifts the input of channel0 100 in steps of 1 SPC_OFFS1 30100 r w Defines the input s offset and therefore sh...

Page 77: ...ter mentioned in the following table 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 All the internal settings of the driver are changed while the automatic offset compensation is in progress As all settings are temporarily stored in the driver the automatic adjustment will only aff...

Page 78: ...ADJ_SAVE ADJ_DEFAULT and store values to DEFAULT set in the EEPROM Table 32 Spectrum API readout register for analog input features with list of all possible input features Register Value Direction Description SPC_READAIFEATURES 3101 read Returns a bit map with the available features of the analog input path The possible return values are listed below SPCM_AI_TERM 00000001h Programmable input term...

Page 79: ...ater detail in a special chapter about the Multiple Recording option SPC_REC_STD_GATE 4h all cards Data acquisition to on board memory using an external Gate signal Acquisition is only done as long as the gate signal has a programmed level The mode is described in greater detail in a special chapter about the Gated Sampling option SPC_REC_STD_ABA 8h digitizer only Data acquisition to on board memo...

Page 80: ...ter Value Direction Description SPC_M2CMD 100 write only Executes a command for the card or data transfer M2CMD_CARD_RESET 1h Performs a hard and software reset of the card as explained further above M2CMD_CARD_WRITESETUP 2h Writes the current setup to the card without starting the hardware This command may be useful if changing some internal settings like clock frequency and enabling outputs M2CM...

Page 81: ...command the trigger engine is enabled and card checks for a trigger event As soon as the trigger event is received the status bit M2STAT_CARD_TRIGGER is set and the card starts with the card is started and trigger detection is enabled immediately spcm_dwSetParam_i32 hDrv SPC_M2CMD M2CMD_CARD_START M2CMD_CARD_ENABLETRIGGER we wait a maximum of 1 second for a trigger detection In case of timeout we ...

Page 82: ...er below The dwNotifySize parameter defines the amount of bytes after which an interrupt should be generated If leaving this parameter zero the transfer will run until all data is transferred and then generate an interrupt Filling in notify size zero will allow you to use the amount of data that has been transferred so far The notify size is used on FIFO mode to implement a buffer handshake with t...

Page 83: ... time as shown in the examples further below The data transfer can generate one of the following status information Register Value Direction Description SPC_MEMTEST 200700 read write Writing a 1 activates the memory test mode no commands are then processed Writing a 0 deactivates the memory test mode again uint32 _stdcall spcm_dwInvalidateBuf invalidate the transfer buffer drv_handle hDevice handl...

Page 84: ... pre trigger size and a slow sample rate it can take some time after starting the board before a trigger event will be detected Card mode The card mode has to be set to the correct mode SPC_REC_STD_SINGLE 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 trigger event has been detected You can access ...

Page 85: ... Compared to this the pre trigger in FIFO mode is limited by a special pre trigger FIFO and hence considerably shorter Length of acquisition In standard mode the acquisition length is defined before the start and is limited to the installed on board memory whilst in FIFO mode the acquisition length can either be defined or it can run continuously until user stops it int32 lMemsize 16384 recording ...

Page 86: ...WAITDMA we acquire data in a loop As we defined a notify size of 4k we ll get the data in 4k chuncks llTotalBytes 0 while dwError spcm_dwGetParam_i64 hDrv SPC_DATA_AVAIL_USER_LEN llAvailBytes read out the available bytes llTotalBytes llAvailBytes here is the right position to do something with the data printf is limited to 32 bit variables printf Currently Available lld total lld n llAvailBytes ll...

Page 87: ... and post Limited by max pretrigger Standard Gate 16 Mem 4 8 8 8k 8 8 Mem 4 8 8 not used not used FIFO Single not used 8 8k 8 not used 16 8G 16 8 0 4G 1 1 FIFO Multi ABA not used 8 8k 8 8 8G 16 8 16 pre post 8 0 4G 1 1 defined by segment and post Limited by max pretrigger FIFO Gate not used 8 8k 8 8 8G 16 8 not used 0 4G 1 1 8 Ch Standard Single 16 Mem 8 8 8 Mem 8 8 8 8 8G 8 8 not used not used de...

Page 88: ... data transfer is stopped However in case of transfer from card to PC there is still a lot of data in the on board memory Therefore the data transfer will continue until all data has been trans ferred although the status information already shows an overrun For very small notify sizes getting best bus transfer performance could be improved by using a continuous buffer This mode is explained in the...

Page 89: ...e next step Step 4 next data available After reaching the next border of the notify size we get the next part of the data buffer to be available In our example at the time when reading the USER_LEN even some more data is already available The user position will now be at the position of the previous set CARD_LEN Step 5 set data available again Again after processing the data we set it free for the...

Page 90: ...o the start of the available data section and the length vDoSomething pcData llBytesPos llAvailBytes the buffer section is now immediately set available for the card spcm_dwSetParam_i64 hDrv SPC_DATA_AVAIL_CARD_LEN llAvailBytes while dwError we loop forever if no error occurs int8 pcData int8 pvAllocMemPageAligned llBufferSizeInBytes before starting transfer we first need to fill complete buffer m...

Page 91: ... B3 A4 B4 A5 B5 A6 Any allowed combination of two channels as mentioned in the Channel Selection section will lead multiplexed data stream over time with a linear channel ordering For each sam ple point in time the samples are multiplexed with the ascending channel number 2 channels X X C0 D0 C1 D1 C2 D2 C3 D3 C4 D4 C5 D5 C6 4 channels X X X X A0 B0 C0 D0 A1 B1 C1 D1 A2 B2 C2 D2 A3 Any allowed com...

Page 92: ...serving any bits the returned value would be 128 The the peak value for a 1 0 V input range would be 1 0 V or 1000 mv A returned sample value of for example 49 decimal two s complement signed representation would then convert to A returned sample value of for example 55 decimal would then convert to When converting samples that contain any additional data such as for example additional digital cha...

Page 93: ...l clock signal can be used to synchronize the board on a system clock or to feed in an exact matching sample rate The external clock is divided multiplied using a PLL allowing a wide range of external clock modes Synchronization Clock option Star Hub The Star Hub option allows the synchronization of up to 16 cards of the M2p series from Spectrum with a minimal phase delay between the different car...

Page 94: ...med slower sampling rate To calculate the output clock please just multiply the pro grammed sampling clock with the oversampling factor read with the above mentioned register Direct external clock An external clock can be fed in on the external clock connector of the board This can be any clock that matches the specification of the card The external clock signal can be used to synchronize the card...

Page 95: ...s some internal limits and not all desired sampling rates may be reached with every reference clock Example of reference clock The reference clock must be defined via the SPC_REFERENCECLOCK register prior to defining the sample rate via the SPC_SAMPLERATE register to allow the driver to calculate the proper clock settings correctly Table 49 Spectrum API clock termination software register Register...

Page 96: ...level to 0 mV The threshold levels for the external clock is to be programmed in mV Example for setting the external clock threshold level Register Value Direction Description SPC_CLOCK50OHM 20120 read write A 1 enables the 50 Ohm termination at the external clock connector Only possible when using the external connector as an input Table 53 Spectrum API clock threshold software registers and avai...

Page 97: ... On A D cards each analog input channel has two trigger level comparators to detect edges as well as windowed triggers All card types have also different external external trigger sources One main trigger source Ext0 with one analog level comparator Additionally three multi purpose inputs outputscan be used as additional logic TTL trigger sources as well These lines can also be software programmed...

Page 98: ... particular trigger must be used in the OR mask register respectively As an example a simple edge detection has been chosen for Ext1 input and a window edge detection has been chosen for Ext0 input The explanation and a detailed description of the different trigger modes for the external trigger inputs will be shown in the dedicated passage within this chapter Table 54 Spectrum API external trigge...

Page 99: ...so that they can be combined by one access to the driver with the help of a bitwise OR Table 55 Spectrum API channel trigger OR mask related software register and available settings Register Value Direction Description SPC_TRIG_CH_AVAILORMASK0 40450 read Bitmask in which all bits of the below mentioned sources channels 0 7 for the channel OR mask are set if available SPC_TRIG_CH_ORMASK0 40460 read...

Page 100: ...d condition for this input is valid SPC_TMASK_EXT2 8h Enables the X2 logic trigger for the AND mask The card will trigger if the programmed condition for this input is valid SPC_TMASK_EXT3 10h Enables the X3 logic trigger for the AND mask The card will trigger if the programmed condition for this input is valid spcm_dwSetParam_i32 hDrv SPC_TRIG_ORMASK SPC_TMASK_NONE disable default software trigge...

Page 101: ...med in samples The resulting time delay will therefore be Programmed Delay Sampling Rate The following table shows the related register and the possible val ues A value of 0 disables the trigger delay spcm_dwSetParam_i32 hDrv SPC_TRIG_ORMASK SPC_TMASK_SOFTWARE Internal software trigger mode is used Table 59 Spectrum API command register and force trigger command Register Value Direction Descriptio...

Page 102: ...og external trigger Ext0 The M2p series has one primary external trigger input consisting of an input stage with programmable either 5 kOhm or 50 Ohm input termination and one comparator that can be programmed in the range of 5000 mV Using a comparators offers a wide range of dif ferent logic levels for the available trigger modes that are support like edge level The external analog trigger can be...

Page 103: ...to be activated SPC_TM_NONE 00000000h Channel is not used for trigger detection This is as with the trigger masks another possibility for disabling channels SPC_TM_POS 00000001h Trigger detection for positive edges crossing level 0 from below to above SPC_TM_NEG 00000002h Trigger detection for negative edges crossing level 0 from above to below SPC_TM_BOTH 00000004h Trigger detection for positive ...

Page 104: ... The trigger input is continuously sampled with the selected sample rate If the programmed trigger level is crossed by the trigger signal from higher values to lower values falling edge then the trigger event will be detected This edge triggered external trigger mode correspond to the trigger possibilities of usual oscilloscopes SPC_TMASK_EXT0 2h Enables the main external analog trigger 0 for the ...

Page 105: ...tected if the trigger input is above the programmed trigger level Low level trigger This trigger mode will generate an internal gate signal that can be useful in conjunction with a second trigger mode to gate that second trigger If using this mode as a single trigger source the card will detect a trigger event at the time when entering the low level acting like negative edge trigger or if the trig...

Page 106: ...nt will be de tected The pulsewidth trigger modes for long pulses can be used to prevent the board from triggering on wrong short edges in noisy signals Pulsewidth trigger for short positive pulses The analog input is continuously sampled with the selected sample rate If the programmed trigger level is crossed by the channel s signal from lower to higher values rising edge the pulsewidth counter i...

Page 107: ...up the card for using pulse width trigger on EXT0 trigger input Register Value Direction set to Value SPC_TRIG_EXT0_MODE 40510 read write SPC_TM_NEG SPC_TM_PW_SMALLER 02000002h SPC_TRIG_EXT0_LEVEL0 42320 read write Set it to the desired trigger level in mV mV SPC_TRIG_EXT0_PULSEWIDTH 44210 read write Sets the pulsewidth in samples Values from 2 to 4G 1 are allowed 2 to 4G 1 Register Value Directio...

Page 108: ...rigger input The trigger need to be added to either OR or AND mask input to be activated SPC_TM_NONE 00000000h Channel is not used for trigger detection This is as with the trigger masks another possibility for disabling channels SPC_TM_POS 00000001h Sets the trigger mode for external logic TTL trigger to detect positive edges SPC_TM_NEG 00000002h Sets the trigger mode for external logic TTL trigg...

Page 109: ... trigger on the first falling edge that is detected after starting the board The next trigger event will then be detected if the actual record ing replay has finished and the board is armed and waiting for a trigger again LOW level TTL trigger This mode is for detecting the LOW levels of an external TTL sig nal The board will trigger on the first LOW level that is detected after starting the board...

Page 110: ...HIGH pulses This mode is for detecting HIGH pulses of an external TTL signal that are shorter than a programmed pulsewidth If the pulse is longer than the programmed pulsewidth no trigger will be detect ed The board will trigger on the first pulse matching the trigger condition after starting the board The next trigger event will then be detected if the actual record ing replay has finished and th...

Page 111: ...up the card for using external TTL pulse width trigger on EXT1 X1 input To find out what maximum pulsewidth in samples is available please read out the register shown in the table below Register Value Direction set to Value SPC_TRIG_EXT1_PULSEWIDTH SPC_TRIG_EXT2_PULSEWIDTH SPC_TRIG_EXT3_PULSEWIDTH 44211 44212 44213 read write Sets the pulsewidth in samples 2 up to 4G 1 SPC_TRIG_EXT1_MODE SPC_TRIG_...

Page 112: ...mask SPC_TRIG_CH6_MODE 40616 read write Sets the trigger mode for channel 6 Channel 6 must be enabled in the channel OR AND mask SPC_TRIG_CH7_MODE 40617 read write Sets the trigger mode for channel 7 Channel 7 must be enabled in the channel OR AND mask SPC_TM_NONE 00000000h Channel is not used for trigger detection This is as with the trigger masks another possibility for disabling channels SPC_TM...

Page 113: ...SPC_TRIG_ORMASK SPC_TMASK_NONE disable software trigger spcm_dwSetParam_i32 hDrv SPC_TRIG_CH_ORMASK0 SPC_TMASK0_CH0 SPC_TMASK0_CH1 Enable channel 0 1 spcm_dwSetParam_i32 hDrv SPC_TRIG_CH0_MODE SPC_TM_POS Set triggermode of channel 0 to positive edge spcm_dwSetParam_i32 hDrv SPC_TRIG_CH1_MODE SPC_TM_NEG Set triggermode of channel 1 to negative edge Table 70 Spectrum API channel trigger level regist...

Page 114: ...width for your type of board within the actually chosen input range Table 71 Spectrum API standard input ranges and representation of trigger level settings in voltage Input ranges Triggerlevel 200 mV 500 mV 1 V 2 V 5 V 10 V 32767 199 994 mV 499 985 mV 999 969 mV 1999 939 mV 4999 847 mV 9999 695 mV 32766 199 988 mV 499 969 mV 999 939 mV 1999 878 mV 4998 695 mV 9999 390 mV 16384 100 000 mV 250 000 ...

Page 115: ...annel trigger on positive and negative edge The analog input is continuously sampled with the selected sample rate If the programmed trigger level is crossed by the channel s signal either rising or falling edge the trig gerevent will be detected These edge triggered channel trigger modes correspond to the trigger possibilities of usual oscilloscopes Register Value Direction Description SPC_TRIG_C...

Page 116: ...med trigger level is crossed by the channel s signal from lower to higher values rising edge the pulsewidth counter is started If the signal crosses the trigger level again in the opposite direction within the the programmed pulsewidth time no trigger will be detect ed If the pulsewidth counter reaches the programmed amount of samples without the signal crossing the trigger level in the opposite d...

Page 117: ...ort negative pulses The analog input is continuously sampled with the selected sample rate If the programmed trigger level is crossed by the channel s signal from 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 trigger level again within the the programm...

Page 118: ...the triggerevent will be detected Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read write SPC_TM_WINENTER 00000020h SPC_TRIG_CH0_LEVEL0 42200 read write Set it to the upper trigger level relatively to the channel s input range board dependant SPC_TRIG_CH0_LEVEL1 42300 read write Set it to the lower trigger level relatively to the channel s input range board dependant Register Valu...

Page 119: ... detected If the signal enters the window before the pulsewidth coun ter has stopped the trigger event will be detected Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read write SPC_TM_WINLEAVE SPC_TM_PW_GREATER 04000040h SPC_TRIG_CH0_LEVEL0 42200 read write Set it to the upper trigger level relatively to the channel s input range board dependant SPC_TRIG_CH0_LEVEL1 42300 read write...

Page 120: ... selected sample rate If the programmed re arm hysteresis level is crossed from lower to higher values the trigger engine is armed and waiting for trigger If the programmed trigger level is crossed by the channel s signal from lower values to higher values rising edge then the gate starts and the trigger en gine will be disarmed If the programmed re arm hysteresis level is crossed by the channel s...

Page 121: ... cards start time does trigger the board Low level hysteresis trigger This trigger mode will generate an internal gate signal that can be useful for masking a second trigger event generated by a different mode The analog input is continuously sam pled with the selected sample rate If the signal is equal or lower than the programmed trigger level the gate starts When the signal is higher than the p...

Page 122: ...be detected This slope triggered channel trigger mode is ideally suited for monitoring of power supply lines and triggering on noise or spikes Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read write SPC_TM_SPIKE 200h SPC_TRIG_CH0_LEVEL0 42200 read write Set the difference between two samples relatively to the channel s input range for positive slopes board dependant SPC_TRIG_CH0_L...

Page 123: ...et at a time SPCM_X3_MODE 600203 read write Defines the mode for X3 Only one mode selection is possible to be set at a time SPCM_XMODE_DISABLE 00000000h No mode selected Output is tristate default setup SPCM_XMODE_ASYNCIN 00000001h Connector is programmed for asynchronous input Use SPCM_XX_ASYNCIO to read data asynchronous as shown in the passage below SPCM_XMODE_ASYNCOUT 00000002h Connector is pr...

Page 124: ...rrent ARM state of all cards currently connected Star Hub and enabled for synchronization If all cards are armed and ready to receive a trigger the signal is HIGH If all cards are ready or one running card is still acquiring pretrigger data or the trigger has been detected the signal is LOW A card that has reached the end of it s acquisition will remove itself from the equation and not contribute ...

Page 125: ...PC_DIGMODE4 47254 read write Set the digital input sources for channel 4 SPC_DIGMODE5 47255 read write Set the digital input sources for channel 5 SPC_DIGMODE6 47256 read write Set the digital input sources for channel 6 SPC_DIGMODE7 47257 read write Set the digital input sources for channel 7 SPCM_DIGMODE_OFF 00000000h Disable acquisition of digital data for the masked analog bit see masks below ...

Page 126: ...dwValue DIGMODEMASK_BIT15 SPCM_DIGMODE_X1 spcm_dwSetParam_i32 hDrv SPCM_DIGMODE0 dwValue Enable acquisition of X2 input into bit15 and X3 input into bit14 of analog channel 1 Resulting Ch1 A D samples will be 14bit dwValue DIGMODEMASK_BIT15 SPCM_DIGMODE_X2 DIGMODEMASK_BIT14 SPCM_DIGMODE_X3 spcm_dwSetParam_i32 hDrv SPCM_DIGMODE1 dwValue spcm_dwSetParam_i32 hDrv SPCM_X1_MODE SPCM_XMODE_DIGIN X1 set ...

Page 127: ...to read data asynchronous as shown in the passage below SPCM_XMODE_ASYNCOUT 00000002h Connector is programmed for asynchronous output Use SPCM_XX_ASYNCIO to write data asynchronous as shown in the passage below SPCM_XMODE_DIGIN 00000004h A D cards only Connector is programmed for synchronous digital input For each analog channel one digital channel X1 X2 X3 is integrated into the ADC data stream D...

Page 128: ...r the masked analog bit see masks below SPCM_DIGMODE_CHREPLACE FFBBCFFFh Convenient AND OR combination of all the below SPCM_DIGMODEx and DIGMODEMASK_BITx bits to completely replace all the Bits of an analog channel with the sixteen bits X19 X4 provided by the DigDMB or DigFX2 option SPCM_DIGMODE_X4 84210001h Enable acquisition of multi purpose input X4 for the masked analog bit see masks below SP...

Page 129: ...002h Enable acquisition of X5 into bit1 of the analog sample DIGMODEMASK_BIT0 00000001h Enable acquisition of X4 into bit0 of the analog sample define SPCM_DIGMODE_CHREPLACE 0xFFBBCFFF this is functional equivalent to define SPCM_DIGMODE_CHREPLACE DIGMODEMASK_BIT15 SPCM_DIGMODE_X19 DIGMODEMASK_BIT14 SPCM_DIGMODE_X18 DIGMODEMASK_BIT13 SPCM_DIGMODE_X17 DIGMODEMASK_BIT12 SPCM_DIGMODE_X16 DIGMODEMASK_...

Page 130: ...it 2 any X input D12 ADx Bit 12 Digital bit 3 any X input Digital bit 3 any X input Digital bit 3 any X input Digital bit 3 any X input D11 ADx Bit 11 ADx Bit 15 MSB Digital bit 4 X15 Digital bit 4 X15 Digital bit 4 X15 D10 ADx Bit 10 ADx Bit 14 ADx Bit 15 MSB Digital bit 5 X14 Digital bit 5 X14 D9 ADx Bit 9 ADx Bit 13 ADx Bit 14 Digital bit 6 X13 Digital bit 6 X13 D8 ADx Bit 8 ADx Bit 12 ADx Bit ...

Page 131: ...he Multiple Recording in Standard Mode In contrast to the standard mode it is not nec essary to program the number of samples to be recorded The acquisition is running until the user stops it The data is read block by block by the driver as described under FIFO single mode example earlier in this manual These blocks are online available for further data process ing by the user program This mode si...

Page 132: ...efined by segment and post Limited by max pretrigger Standard Gate 16 Mem 8 8 32k 8 8 Mem 8 8 not used not used FIFO Single not used 8 32k 8 not used 16 8G 16 8 0 4G 1 1 FIFO Multi ABA not used 8 32k 8 8 8G 8 8 16 pre post 8 0 4G 1 1 defined by segment and post Limited by max pretrigger FIFO Gate not used 8 32k 8 8 8G 8 8 not used 0 4G 1 1 2 Ch Standard Single 16 Mem 2 8 8 Mem 2 8 8 8 8G 8 8 not u...

Page 133: ...e version V20 M2i series V10 M3i series V6 M4i M4x series or V1 M2p series Please update the driver and the card firmware to these versions to use this feature Trying to use this feature without the proper firmware version will issue a driver error Using the trigger counter information one can determine how many Multiple Recording segments have been acquired and can perform a memory flush by issui...

Page 134: ...ize for recording to 4096 samples so that actually four segments will be recorded spcm_dwSetParam_i32 hDrv SPC_TRIG_EXT0_MODE SPC_TM_POS Set triggermode to ext TTL mode rising edge spcm_dwSetParam_i32 hDrv SPC_TRIG_ORMASK SPC_TMASK_EXT0 and enable it within the trigger OR mask spcm_dwSetParam_i32 hDrv SPC_CARDMODE SPC_REC_FIFO_MULTI Enables FIFO Multiple Recording spcm_dwSetParam_i64 hDrv SPC_SEGM...

Page 135: ...the Standard Mode you cannot program a certain total amount of samples to be recorded but two other end conditions can be set instead The acquisition can either run until the user stops it by software infinite recording or until a programmed number of gates has been recorded The data is read continuously by the driver This data is online available for further data processing by the user program Th...

Page 136: ... Standard Gate 16 Mem 8 8 32k 8 8 Mem 8 8 not used not used FIFO Single not used 8 32k 8 not used 16 8G 16 8 0 4G 1 1 FIFO Multi ABA not used 8 32k 8 8 8G 8 8 16 pre post 8 0 4G 1 1 defined by segment and post Limited by max pretrigger FIFO Gate not used 8 32k 8 8 8G 8 8 not used 0 4G 1 1 2 Ch Standard Single 16 Mem 2 8 8 Mem 2 8 8 8 8G 8 8 not used not used defined by mem and post Standard Multi ...

Page 137: ...By taking both timestamps into account one can read out the time position of each gate as well as the length in samples There is no other way to examine the length of each gate segment than reading out the times tamps Please keep in mind that the gate signals are timestamped not the beginning and end of the acquisition The first sample that is available is at the time po sition of Timestamp1 Pretr...

Page 138: ...igger signal from higher values to lower values falling edge then the gate starts When the signal crosses the programmed trigger from low er values to higher values rising edge then the gate will stop As this mode is purely edge triggered the low level at the cards start time does not trigger the board High level trigger The external input is continuously sampled with the selected sample rate If t...

Page 139: ... with the selected sample rate If the programmed trigger level is crossed by the channel s signal from higher to lower values falling edge the pulsewidth counter is started If the signal crosses the trigger level again in the opposite direction within the the programmed pulsewidth time no trigger will be detect ed If the pulsewidth counter reaches the programmed amount of samples without the signa...

Page 140: ...opped Negative TTL edge trigger This mode is for detecting the falling edges of an external TTL sig nal The gate will start on falling edges that are detected after starting the board As this mode is purely edge triggered the low level at the cards start time does not trigger the board With the next rising edge the gate will be stopped SPC_TRIG_CH0_LEVEL0 42200 read write Set it to the desired tri...

Page 141: ...e first pulse matching the trigger condition after starting the board The gate will stop with the next rising edge The following example shows how to setup the card for using external TTL pulse width trigger on EXT1 X1 input Register Value Direction set to Value SPC_TRIG_EXT1_MODE SPC_TRIG_EXT2_MODE SPC_TRIG_EXT3_MODE 40511 40512 40513 read write SPC_TM_LOW 10h Register Value Direction set to Valu...

Page 142: ... The analog input is continuously sampled with the selected sample rate If the programmed trigger level is crossed by the channel s signal higher values to lower values falling edge the gate starts When the signal crosses the programmed trigger from low er values to higher values rising edge then the gate will stop As this mode is purely edge triggered the low level at the cards start time does no...

Page 143: ...ssed from higher to lower values the trigger engine is armed and waiting for trigger If the programmed trigger level is crossed by the channel s signal from higher values to lower values falling edge then the gate starts and the trigger engine will be disarmed If the programmed trigger level is crossed by the channel s signal from lower values to higher values rising edge the gate stops A new trig...

Page 144: ...s signal from lower to higher values rising edge the gate will stop The pulsewidth trigger modes for long pulses can be used to prevent the board from triggering on wrong short edges in noisy signals 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 When the signal enters the window from...

Page 145: ...l leaves the window from the inside to the outside the gate will start When the signal enters the window from the outside to the inside the gate will stop As this mode is level triggered the signal outside the win dow at the cards start time does trigger the board Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read write SPC_TM_WINLEAVE 00000040h SPC_TRIG_CH0_LEVEL0 42200 read write...

Page 146: ...e channel s signal from lower values to higher values rising edge the gate starts When the signal crosses the programmed hysteresis level from higher values to lower values falling edge then the gate will stop As this mode is purely edge triggered the high level at the cards start time does not trigger the board Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read write SPC_TM_WINENT...

Page 147: ...l for masking a second trigger event generated by a different mode The analog input is continuously sam pled with the selected sample rate If the programmed re arm hysteresis level is crossed from higher to lower values the trigger engine is armed and waiting for trigger If the programmed trigger level is crossed by the channel s signal from higher values to lower values falling edge then the gate...

Page 148: ..._TRIG_CH0_LEVEL1 42300 read write Defines the hysteresis level relatively to the channel s input range board dependant Register Value Direction set to Value SPC_TRIG_CH0_MODE 40610 read write SPC_TM_LOW SPC_TM_HYSTERESIS 20000010h SPC_TRIG_CH0_LEVEL0 42200 read write Set it to the desired trigger level relatively to the channel s input range board dependant SPC_TRIG_CH0_LEVEL1 42300 read write Def...

Page 149: ...uts while waiting for an acquisition In that case one wouldn t record the timestamps but simply monitor the current values by acquiring ABA data The ABA mode needs a second clock base As explained above the acquisition is not changing the sampling clock but runs the slower ac quisition with a divided clock The ABA memory setup including the divider value can be programmed with the following regist...

Page 150: ...installed memory Register Value Direction Description SPC_CARDMODE 9500 read write Defines the used operating mode SPC_REC_STD_ABA 8h Data acquisition to on board memory for multiple trigger events While the multiple trigger events are stored with pro grammed sampling rate the inputs are sampled continuously with a slower sampling speed Register Value Direction Description SPC_MEMSIZE 10000 read w...

Page 151: ...ed 8 8k 8 8 8G 16 8 not used 0 4G 1 1 8 Ch Standard Single 16 Mem 8 8 8 Mem 8 8 8 8 8G 8 8 not used not used defined by mem and post Standard Multi ABA 16 Mem 8 8 8 4k 8 8 Mem 8 8 8 16 Mem 8 8 not used defined by segment and post Limited by max pretrigger Standard Gate 16 Mem 8 8 8 4k 8 8 Mem 8 8 8 not used not used FIFO Single not used 8 4k 8 not used 16 8G 16 8 0 4G 1 1 FIFO Multi ABA not used 8...

Page 152: ... register with the card control data transfer commands and status information The DMA based data transfer mode is activated as soon as the M2CMD_EXTRA_STARTDMA is given Please see next chapter to see how the polling mode works Table 87 Spectrum API extra DMA commands ABA and Timestamp Register Value Direction Description SPC_M2CMD 100 write only Executes a command for the card or data transfer M2C...

Page 153: ...e PC is busy with other jobs data is still transferred until the application buffer is completely used As shown in the drawing above the DMA control will announce new data to the application by sending an event Waiting for an event is done internally inside the driver if the application calls one of the wait functions Waiting for an event does not consume any CPU time and is therefore highly reque...

Page 154: ...ling is also similar to the DMA transfer As soon as one of the registers SPC_TS_AVAIL_USER_LEN or SPC_ABA_AVAIL_US ER_LEN is read the driver will read out all available data from the hardware and will return the number of bytes that has been read In min imum this will be one DWORD 4 bytes int8 pcData int8 pvAllocMemPageAligned lBufSizeInBytes we now define the transfer buffer with the minimum noti...

Page 155: ...AvailBytes printf The available data starts at position d n lBytesPos we take care not to go across the end of the buffer if lBytePos lAvailBytes lBufSizeInBytes lAvailBytes lBufSizeInBytes lBytePos our do function get s a pointer to the start of the available data section and the length vProcessTimestamps pcData lBytesPos lAvailBytes the buffer section is now immediately set available for the car...

Page 156: ...ase The programming details of the ABA mode and timestamp modes are each explained in an dedicated chapter in this manual normal timestamp setup e g setting timestamp mode to standard using internal clocking uint32 dwTimestampMode SPC_TSMODE_STANDARD SPC_TSMODE_DISABLE additionally enable index of the first A area sample dwTimestampMode SPC_TSFEAT_STORE1STABA spcm_dwSetParam_i32 hDrv SPC_TIMESTAMP...

Page 157: ... 16 to 31 the month is placed in bit 8 to 15 and the day of month is placed in bit 0 to 7 SPC_TIMESTAMP_TIMEOUT 47045 read write Set s a timeout in milli seconds for waiting of an reference clock edge SPC_TIMESTAMP_AVAILMODES 47001 read Returns all available modes as a bitmap Modes are listed below SPC_TIMESTAMP_CMD 47000 read write Programs a timestamp mode and performs commands as listed below S...

Page 158: ... referenced to the start of the recording This mode is very useful for Multiple Recording and Gated Sampling see according chapters for detailed information on these two optional modes setting timestamp mode to standard using internal clocking spcm_dwSetParam_i32 hDrv SPC_TIMESTAMP_CMD SPC_TSMODE_STANDARD SPC_TSCNT_INTERNAL SPC_TSFEAT_NONE setting timestamp mode to start reset mode using internal ...

Page 159: ...commands for star reset mode Register Value Direction Description SPC_TIMESTAMP_CMD 47000 read write Programs a timestamp mode and performs commands as listed below SPC_TSMODE_DISABLE 0 Timestamp is disabled SPC_TSMODE_STARTRESET 4h Counter is reset on every card start all timestamps are in relation to card start SPC_TSCNT_INTERNAL 100h Counter is running with complete width on sampling clock Tabl...

Page 160: ...OS spcm_dwSetParam_i32 hDrv SPC_TIMESTAMP_TIMEOUT 1500 if ERR_TIMESTAMP_SYNC spcm_dwSetParam_i32 hDrv SPC_TIMESTAMP_CMD SPC_TS_RESET_WAITREFCLK printf Synchronization with external clock signal failed n now we read out the stored synchronization clock and date int32 lSyncDate lSyncTime spcm_dwGetParam_i32 hDrv SPC_TIMESTAMP_STARTDATE lSyncDate spcm_dwGetParam_i32 hDrv SPC_TIMESTAMP_STARTTIME lSync...

Page 161: ...n buffer is completely used As shown in the drawing above the DMA control will announce new data to the application by sending an event Waiting for an event is done internally inside the driver if the application calls one of the wait functions Waiting for an event does not consume any CPU time and is therefore highly requested if other threads do lot of calculation work However it is not necessar...

Page 162: ...g is also similar to the DMA transfer As soon as one of the registers SPC_TS_AVAIL_USER_LEN or SPC_ABA_AVAIL_US ER_LEN is read the driver will read out all available data from the hardware and will return the number of bytes that has been read In min imum this will be one DWORD 4 bytes int8 pcData int8 pvAllocMemPageAligned lBufSizeInBytes we now define the transfer buffer with the minimum notify ...

Page 163: ...olling mode dwError spcm_dwSetParam_i32 hDrv SPC_M2CMD M2CMD_EXTRA_POLL this is pure polling loop do spcm_dwGetParam_i32 hDrv SPC_TS_AVAIL_USER_LEN lAvailBytes spcm_dwGetParam_i32 hDrv SPC_TS_AVAIL_USER_POS lBytePos if lAvailBytes 0 printf We now have d new bytes available n lAvailBytes printf The available data starts at position d n lBytesPos we take care not to go across the end of the buffer i...

Page 164: ...nal trigger event SPC_TRGSRC_MASK_CH2 4h Set when a trigger event occurring on channel 2 was leading to final trigger event SPC_TRGSRC_MASK_CH3 8h Set when a trigger event occurring on channel 3 was leading to final trigger event SPC_TRGSRC_MASK_CH4 10h Set when a trigger event occurring on channel 4 was leading to final trigger event SPC_TRGSRC_MASK_CH5 20h Set when a trigger event occurring on c...

Page 165: ...SEGMENTSIZE 1024 Segment size is 1 kSamples Posttrigger is 768 spcm_dwSetParam_i64 hDrv SPC_POSTTRIGGER 768 samples and pretrigger therefore 256 samples spcm_dwSetParam_i64 hDrv SPC_MEMSIZE 4096 4 kSamples in total acquired 4 segments setup the Timestamp mode and make a reset of the timestamp counter spcm_dwSetParam_i32 hDrv SPC_TIMESTAMP_CMD SPC_TSMODE_STANDARD SPC_TSCNT_INTERNAL spcm_dwSetParam_...

Page 166: ...ram_i64 hDrv SPC_PRETRIGGER 32 32 samples to acquire before gate start spcm_dwSetParam_i64 hDrv SPC_POSTTRIGGER 32 32 samples to acquire before gate end spcm_dwSetParam_i64 hDrv SPC_MEMSIZE 4096 4 kSamples in total acquired setup the Timestamp mode and make a reset of the timestamp counter spcm_dwSetParam_i32 hDrv SPC_TIMESTAMP_CMD SPC_TSMODE_STANDARD SPC_TSCNT_INTERNAL spcm_dwSetParam_i32 hDrv SP...

Page 167: ...his mode is compatible with all existing timestamp modes Please keep in mind that the timestamp counter is running with the B area time base The programming details of the ABA mode and timestamp modes are each explained in an dedicated chapter in this manual Table 99 Spectrum API timestamp command register and ABA mode settings Register Value Direction Description SPC_TIMESTAMP_CMD 47000 read writ...

Page 168: ...ar Hub While the returned trigger is identical for all synchronized cards the sent out trigger of every single card depends on their respective trigger settings Star Hub clock engine The card holding the Star Hub is the clock master for the com plete system If you need to feed in an external clock to a syn chronized system the clock has to be connected to the master card Slave cards cannot generat...

Page 169: ... hub mask being 1 when doing the setup for card 0 bit 1 in star hub mask being 1 when setting up card 1 drv_handle hSync drv_handle hCard 4 for i 0 i 4 i sprintf s dev spcm d i hCard i spcm_hOpen s hSync spcm_hOpen sync0 spcm_vClose hSync for i 0 i 4 i spcm_vClose hCard i drv_handle hSync drv_handle hCard 2 for i 0 i 2 i sprintf s TCPIP 192 168 169 14 INST d INSTR i hCard i spcm_hOpen s hSync spcm...

Page 170: ...a must for the synchronization spcm_dwGetParam_i32 hSync SPC_SYNC_READ_SYNCCOUNT lSyncCount for i 0 i lSyncCount i spcm_dwGetParam_i32 hSync SPC_SYNC_READ_CARDIDX0 i lCardIdx printf star hub logical index d is connected with card d n i lCardIdx star hub logical index 0 is connected with card 0 star hub logical index 1 is connected with card 1 star hub logical index 2 is connected with card 2 star ...

Page 171: ...30 MSps Samplerate card2 10 MSps This is setup is not valid although now the second condition is met since a integer works 3 10 MSps 30 MSps but the first requirement is now violated since 100MSps 30 MSps 3 33 which is not an integer Example 4 Valid setup Samplerate card0 100 MSps Samplerate card1 20 MSps Samplerate card2 10 MSps This is setup is perfectly valid again as 100 MSps 20 MSps 5 and 100...

Page 172: ...ly Executes a command for the card or data transfer M2CMD_CARD_RESET 1h Performs a hard and software reset of the card as explained further above M2CMD_CARD_WRITESETUP 2h Writes the current setup to the card without starting the hardware This command may be useful if changing some internal settings like clock frequency and enabling outputs M2CMD_CARD_START 4h Starts the card with all selected sett...

Page 173: ... to start the Remote Server To start the Remote Server automatically after login just copy this shortcut to the Autostart directory Linux Linux users find the versions of the installer for the different StdC libraries under under Install linux spcm_control_center as RPM packages To start the Remote Server type spcm_remote_server without quotation marks To start the Remote Server automatically afte...

Page 174: ...ws 8 and Windows 10 the digitizerNETBOX and generatorNETBOX devices are listed under the other devices tree with their given host name A right click on the digitizerNETBOX or generatorNETBOX device opens the properties window where you find further information on the device including the IP address From here it is possible to go the website of the device where all necessary information are found t...

Page 175: ...o detect remote card s from the client PC start the Spectrum Control Center on the client and click Netbox Discovery All discovered cards will be listed under the Remote node Using remote cards instead of using local ones is as easy as using a digitizerNETBOX and only requires a few lines of code to be changed compared to using local cards Instead of opening two locally installed cards like this o...

Page 176: ...NETWORKTRANSFER 41h 65 The network data transfer from to a digitizerNETBOX has failed ERR_FWPOWERCYCLE 42h 66 Power cycle PC off on is needed to update the card s firmware a simple OS reboot is not sufficient ERR_NETWORKTIMEOUT 43h 67 A network timeout has occurred ERR_BUFFERSIZE 44h 68 The buffer size is not sufficient too small ERR_RESTRICTEDACCESS 45h 69 The access to the card has been intentio...

Page 177: ...a level trigger The OR mask can only work together with edge trigger modes ERR_EDGEPERMOD 149h 329 This card is only capable to have one programmed trigger edge for each module that is installed It is not possible to mix different trigger edges on one module ERR_DOLEVELMINDIFF 14Ah 330 The minimum difference between low output level and high output level is not reached ERR_STARHUBENABLE 14Bh 331 T...

Page 178: ...in cable is used for the additional digital I O option DigFX2 The flat ribbon cable is shipped with the board that is equipped with this option The cable ends are assembled with two standard 20 pole IDC socket connector so you can easily make connections to your type of equipment or DUT device under test The required two 20 pin flat ribbon cables each provide the signals of either the A or the B l...

Page 179: ...r X19 is jumper selected to be routed to one of the SMB connectors Table 103 digital connector and cable relation between the card connector pin and the IDC pin and the signal Cable IDC A Cable IDC B Signal IDC pin Card pin Card pin IDC pin Signal Signal IDC pin Card pin Card pin IDC pin Signal X4 1 A1 A2 2 GND X12 1 B1 B2 2 GND X5 3 A3 A4 4 GND X13 3 B3 B4 4 GND X6 5 A5 A6 6 GND X14 5 B5 B6 6 GND...

Page 180: ... either damage the source or the output buffer of your M2p card Additional I O Lines Option DigFX2 The additional Multi Purpose I O connectors of the M2p cards DigFX2 option from Spectrum does provide sixteen additional Multi Purpose I O lines X4 to X19 which are protected against input over voltage conditions Four of these lines can be jumper selected to be routed to either the main multi pin FX2...

Page 181: ...ith a series resistor All I O lines are in ternally clamped to signal ground and to 3 3V clamping voltage So when con necting sources with a higher level than the clamping voltage plus the forward voltage of typically 0 6 0 7 V will be the resulting maximum high level level The maximum forward current limit for the used BAS516 diodes is 100 mA which is effectively limited by the used series resist...

Page 182: ...p card the M4i M4x clock output can be directly connected to the M2p DC coupled clock input when setting the threshhold to zero Volt For best signal integrity and minimizing reflections due to the very fast edge rates of the M4i M4x LVPECL output activating the 50 Ohm termination on the M2p card is highly recommended ...

Page 183: ...The temperature sensors can be used to optimize the system cooling 59xx temperatures and limits The following description shows the meaning of each temperature figure on the M2p 59xx series and also gives maximum ratings that should not be exceeded All figures given in degrees Celsius Table 104 Spectrum API temperature sensor registers Register Value Direction Description SPC_MON_TK_BASE_CTRL 5000...

Page 184: ...other PCI Express slot maybe the currently used one is not properly working 3 In case that this error is occurring after a firmware update or of the above steps did not help please contact Spectrum support for assistance on how to boot the card s golden recovery image Strobed fast blinking approx 8 Hz strobes every half second green off off green off off Internal PCIe error O K Static green Card i...

Page 185: ...kHz GHz Giga Hertz 1000000000 Hertz or 1000 MHz kS s kilo Samples per Second 1000 samples per second MS s Mega Samples per Second 1000 kilo samples 1000000 samples per second GS s Giga Samples per Second 1000 Mega samples 1000000000 samples per second PCIe PCI Express The PCI Express bus is a point to point connection allowing full speed for every single slot The Express bus is freely scaling and ...

Page 186: ...1 Image 31 Spectrum Control Center adding a demo card to the sysstem 42 Image 32 Spectrum Control Center feature update code entry 42 Image 33 Spectrum Control Center software license installe 42 Image 34 Spectrum Control Center running an on board calibration 42 Image 35 Spectrum Control Center performing memory test 43 Image 36 Spectrum Control Center running a transfer speed test of one card 43...

Page 187: ... mode 167 Image 79 Drawing of star hub clock engine location and interaction with card clock 168 Image 80 Overview of remote server option interaction in comparison to NETBOX devices 173 Image 81 Windows screenshot finding a remote Spectrum device like digitizerNETBOX 174 Image 82 The standard 40 pole flat ribbon cable used tor digital connection 178 Image 83 location of pin1 on the standard 40 po...

Page 188: ...m API card status register and possible status values with descriptions of the status 81 Table 37 Spectrum API Command register and commands for DMA transfers 83 Table 38 Spectrum API status register and status codes for DMA data transfer 83 Table 39 Overview of all limits of pre trigger post trigger and memory size for the different channel activations and acquisition modes 86 Table 40 Spectrum A...

Page 189: ...and memory size for the different channel activations and acquisition modes150 Table 87 Spectrum API extra DMA commands ABA and Timestamp 152 Table 88 Spectrum APUI extra DMA status ABA and Timestamp 152 Table 89 Spectrum API ABA and Timestamp DMA buffer handling registers 153 Table 90 Spectrum API timestamp command register and ABA mode settings 155 Table 91 Spectrum API timestamp related registe...

Page 190: ......

Reviews: