Programming the Board
Gathering information from the card
(c) Spectrum GmbH
59
Maximum possible sampling rate
This register gives you the maximum possible sampling rate the board can run. The information provided here does not consider any restric-
tions in the maximum speed caused by special channel settings. For detailed information about the correlation between the maximum sam-
pling rate and the number of activated channels please refer to the according chapter.
Installed memory
This register returns the size of the installed on-board memory in bytes as a 64 bit integer value. If you want to know the amount of samples
you can store, you must regard the size of one sample of your card. All 8 bit A/D and D/A cards use only one byte per sample, while all
other A/D and D/A cards with 12, 14 and 16 bit resolution use two bytes to store one sample. All digital cards need one byte to store 8
data bits.
The following example is written for a „two bytes“ per sample card (12, 14 or 16 bit board), on any 8 bit card memory in MSamples is
similar to memory in MBytes.
Installed features and options
The SPC_PCIFEATURES register informs you about the features, 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. In the table below you will find every feature that may be
installed on a M2i/M3i/M4i card. Please refer to the ordering information to see which of these features are available for your card series.
The following example demonstrates how to read out the information about one feature.
Register
Value
Direction
Description
SPC_PCISAMPLERATE
2100
read
Maximum sampling rate in Hz as a 32 bit integer value
Register
Value
Direction
Description
SPC_PCIMEMSIZE
2110
read _i32
Installed memory in bytes as a 32 bit integer value. Maximum return value will 1 GByte. If more mem-
ory is installed this function will return the error code ERR_EXCEEDINT32.
SPC_PCIMEMSIZE
2110
read _i64
Installed memory in bytes as a 64 bit integer value
spcm_dwGetParam_i64 (hDrv, SPC_PCIMEMSIZE, &llInstMemsize);
printf ("Memory on card: %d MBytes\n", (int32) (llInstMemsize /1024/1024));
printf (" : %d MSamples\n", (int32) (llInstMemsize /1024/1024/2));
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 available.
SPCM_FEAT_GATE
2h
Is set if the feature Gated Sampling / Gated Replay is available.
SPCM_FEAT_DIGITAL
4h
Is set if the feature Digital Inputs / Digital Outputs is available.
SPCM_FEAT_TIMESTAMP
8h
Is set if the feature Timestamp is available.
SPCM_FEAT_STARHUB8_EXTM
20h
Is set on the card, that carries the star-hub extension or piggy-back module for synchronizing up to 8 cards (M4i)
SPCM_FEAT_STARHUB4
20h
Is set on the card, that carries the star-hub piggy-back module for synchronizing up to 4 cards (M3i)
SPCM_FEAT_STARHUB5
20h
Is set on the card, that carries the star-hub piggy-back module for synchronizing up to 5 cards (M2i)
SPCM_FEAT_STARHUB8
40h
Is set on the card, that carries the star-hub piggy-back module for synchronizing up to 8 cards (M3i)
SPCM_FEAT_STARHUB16
40h
Is set on the card, that carries the star-hub piggy-back module for synchronizing up to 16 cards (M2i)
SPCM_FEAT_ABA
80h
Is set if the feature ABA mode is available.
SPCM_FEAT_BASEXIO
100h
Is set if the extra BaseXIO option is installed. The lines can be used for asynchronous digital I/O, extra trigger or
timestamp reference signal input
SPCM_FEAT_AMPLIFIER_10V
200h
Arbitrary Waveform Generators only: card has additional set of calibration values for amplifier card
SPCM_FEAT_STARHUBSYSMASTER
400h
Is set in the card that carries a System Star-Hub Master card to connect multiple systems (M2i)
SPCM_FEAT_DIFFMODE
800h
M2i.30xx series only: card has option -diff installed for combining two SE channels to one differential channel
SPCM_FEAT_SEQUENCE
1000h
Only available for output cards or I/O cards: Replay sequence mode available.
SPCM_FEAT_AMPMODULE_10V
2000h
Is set on the card that has a special amplifier module for mounted (M2i.60xx/61xx only)
SPCM_FEAT_STARHUBSYSSLAVE
4000h
Is set in the card that carries a System Star-Hub Slave module to connect with System Star-Hub master systems (M2i)
SPCM_FEAT_NETBOX
8000h
The card is physically mounted within a digitizerNETBOX.
SPCM_FEAT_REMOTESERVER
10000h
Support for the Spectrum Remote Server option is installed on this card.
SPCM_FEAT_CUSTOMMOD_MASK
F0000000h
The upper 4 bit of the feature register is used to mark special custom modifications. This is only used if the card has
been specially customized. Please refer to the extra documentation for the meaning of the custom modification mark.
spcm_dwGetParam_i32 (hDrv, SPC_PCIFEATURES, &lFeatures);
if (lFeatures & SPCM_FEAT_DIGITAL)
printf("Option digital inputs/outputs is installed on your card");