• English
  • German
  • Chinese
Drivers & examples
C/C#/C++, .NET, Python, JAVA examples
Parameter Search Sales Contact Support

Spectrum Driver ExamplesThe Spectrum standard API allows the access from various programming languages. The complete API is simple to use yet powerful in the functionality. All programming is done using software registers therefore only a handful of functions is needed. Including the API into a programming environment is a simple task.

Available Examples

Included in the delivery are examples fir different measurement tasks for different programming environments. A huge number of setups is supported as a standard. This gives an easy and fast start with the porgramming:

Programming Example

Programming the cards is easily done with a few functions and comfortable software registers:

hCard = spcm_hOpen ("/dev/spcm0");

// setup 1 channel, single acquisition, softwaretrigger, 20 MHz clock
spcm_dwSetParam_i32 (hCard, SPC_CHENABLE, 1);
spcm_dwSetParam_i32 (hCard, SPC_CARDMODE, SPC_REC_STD_SINGLE);
spcm_dwSetParam_i32 (hCard, SPC_TRIG_ORMASK, SPC_TMASK_SOFTWARE);
spcm_dwSetParam_i32 (hCard, SPC_CLOCKMODE, SPC_CM_INTPLL);
spcm_dwSetParam_i32 (hCard, SPC_SAMPLERATE, MEGA(20));

// setup transfer and start and wait for acquisition and data transfer
spcm_dwDefTransfer_i64 (hCard, SPCM_BUF_DATA, SPCM_DIR_CARDTOPC, lNotifySize, pnData, 0, lBufferSize);

// ... do something with the acquired data and close
spcm_vClose (hCard);



On location for you. Choose your region.

Europe USA Asia
Contact Europe
Phone +49 (0)4102 6956-0
Fax +49 (0)4102 6956-66
E-Mail info@spec.de
Contact USA
Phone +1 (201) 562-1999
Fax +1 (201) 820-2691
E-Mail sales@spectrum-instrumentation.com
Contact Asia
Phone +61 402 130 414
E-Mail greg.tate@spectrum-instrumentation.com

Request support. We are happy to help.