By having only one driver library for all boards and a common function set programming is simplified and made universal for all hardware. Whilst different boards may require different functions from this set, the overall common command structure remains essentially the same for different languages. This common format of programming also makes it possible to support the widest range of operating platforms. Here is a summary of that support showing the link between the common library and the individual operating system kernel drivers.:-

The power and flexibility of programming in code is its big advantage. This will be understood by experienced code programmers. Below is an example written in C++ for communication with a PCI acquisition board (no error checking implemented). It provides a simple set up of the hardware, a capture, then reading out of the data into an array.
int32 lMemsize = 16384; // recording length is set to 16 kSamples
spcm_dwSetParam_i32 (hDrv, SPC_CHENABLE, CHANNEL0); // only one channel activated
spcm_dwSetParam_i32 (hDrv, SPC_CARDMODE, SPC_REC_STD_SINGLE); // set the standard single recording mode
spcm_dwSetParam_i32 (hDrv, SPC_MEMSIZE, lMemsize); // recording length
spcm_dwSetParam_i32 (hDrv, SPC_POSTTRIGGER, 8192); // samples to acquire after trigger = 8k
// now we start the acquisition and wait for the interrupt that signalizes the end
spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_CARD_START | M2CMD_CARD_ENABLETRIGGER | M2CMD_CARD_WAITREADY);
void* pvData = new int16[lMemsize];
// read out the data
spcm_dwDefTransfer_i64 (hDrv, SPCM_BUF_DATA, SPCM_DIR_CARDTOPC , 0, pvData, 0, 2 * lMemsize);
spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_DATA_STARTDMA | M2CMD_DATA_WAITDMA)
MATLAB driver for Spectrum boardsSpectrum offers MATLAB 32 and 64 bit drivers. The drivers consist of:-
The drivers work with
Mathworks Inc. MATLAB 5.x onwards with
operating systems Windows 2000, XP and Vista The MATLAB package listed above should function normally on the 32 and
64-bit version of Windows Vista because of a Microsoft "abstraction" layer, |
For further details on code programming please contact Dataquest Solutions.