
Programming the Board
Gathering information from the card
(c) Spectrum Instrumentation GmbH
69
The following example demonstrates how to read out the information about one feature.
The following example demonstrates how to read out the custom modification code.
Installed extended Options and Features
Some cards (such as M4i/M4x/M2p cards) can have advanced features and options installed. This can be read out with with the following
register:
Miscellaneous Card Information
Some more detailed card information, that might be useful for the application to know, can be read out with the following registers:
Function type of the card
This register register returns the basic type of the card:
SPCM_FEAT_SCAPP
20000h
Support for the SCAPP option allowing CUDA RDMA access to supported graphics cards for GPU calculations
(M4i and M2p)
SPCM_FEAT_DIG16_SMB
40000h
M2p: Set if option M2p.xxxx-DigSMB is installed, adding16 additional digital I/Os via SMB connectors.
SPCM_FEAT_DIG16_FX2
80000h
M2p: Set if option M2p.xxxx-DigFX2 is installed, adding16 additional digital I/Os via FX2 multipin connectors.
SPCM_FEAT_DIGITALBWFILTER
100000h
A digital (boxcar) bandwidth filter is available that can be globally enabled/disabled for all channels.
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 modifications.
(M2i/M3i). For M4i, M4x and M2p cards see „Custom modifications“ chapter instead.
spcm_dwGetParam_i32 (hDrv, SPC_PCIFEATURES, &lFeatures);
if (lFeatures & SPCM_FEAT_DIGITAL)
printf("Option digital inputs/outputs is installed on your card");
spcm_dwGetParam_i32 (hDrv, SPC_PCIFEATURES, &lFeatures);
lCustomMod = (lFeatures >> 28) & 0xF;
if (lCustomMod != 0)
printf("Custom modification no. %d is installed.", lCustomMod);
Table 17: Spectrum API: Extended feature register and available extended feature flags
Register
Value
Direction
Description
SPC_PCIEXTFEATURES
2121
read
PCI extended feature register. Holds the installed extended 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 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 the firmware option „Block Average“ is installed on the board, which allows on-board hardware averaging of
data being recorded in segmented memory modes, such as Multiple Recording or ABA.
SPCM_FEAT_EXTFW_BOXCAR
4h
Is set if the firmware mode „Boxcar Average“ is supported in the installed firmware version.
Table 18: Spectrum API: register overview of miscellaneous cards information
Register
Value
Direction
Description
SPC_MIINST_MODULES
1100
read
Number of the installed front-end modules on the card.
SPC_MIINST_CHPERMODULE
1110
read
Number of channels installed on one front-end module.
SPC_MIINST_BYTESPERSAMPLE
1120
read
Number of bytes used in memory by one sample.
SPC_MIINST_BITSPERSAMPLE
1125
read
Resolution of the samples in bits.
SPC_MIINST_MAXADCVALUE
1126
read
Decimal code of the full scale value.
SPC_MIINST_MINEXTCLOCK
1145
read
Minimum external clock that can be fed in for direct external clock (if available for card model).
SPC_MIINST_MAXEXTCLOCK
1146
read
Maximum external clock that can be fed in for direct external clock (if available for card model).
SPC_MIINST_MINEXTREFCLOCK
1148
read
Minimum external clock that can be fed in as a reference clock.
SPC_MIINST_MAXEXTREFCLOCK
1149
read
Maximum external clock that can be fed in as a reference clock.
SPC_MIINST_ISDEMOCARD
1175
read
Returns a value other than zero, if the card is a demo card.
Table 19: Spectrum API: register card function type and possible types
Register
Value
Direction
Description
SPC_FNCTYPE
2001
read
Gives information about what type of card it is.
SPCM_TYPE_AI
1h
Analog input card (analog acquisition; the M2i.4028 and M2i.4038 also return this value)
SPCM_TYPE_AO
2h
Analog output card (arbitrary waveform generators)
SPCM_TYPE_DI
4h
Digital input card (logic analyzer card)
SPCM_TYPE_DO
8h
Digital output card (pattern generators)
SPCM_TYPE_DIO
10h
Digital I/O (input/output) card, where the direction is software selectable.
Содержание M2p.59 Series
Страница 190: ......