Programming the Board
SPCM_FEAT_SCAPP
SPCM_FEAT_DIG16_SMB
SPCM_FEAT_DIG16_FX2
SPCM_FEAT_DIGITALBWFILTER
SPCM_FEAT_CUSTOMMOD_MASK
The following example demonstrates how to read out the information about one feature.
spcm_dwGetParam_i32 (hDrv, SPC_PCIFEATURES, &lFeatures);
if (lFeatures & SPCM_FEAT_DIGITAL)
printf("Option digital inputs/outputs is installed on your card");
The following example demonstrates how to read out the custom modification code.
spcm_dwGetParam_i32 (hDrv, SPC_PCIFEATURES, &lFeatures);
lCustomMod = (lFeatures >> 28) & 0xF;
if (lCustomMod != 0)
printf("Custom modification no. %d is installed.", lCustomMod);
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:
Table 17: Spectrum API: Extended feature register and available extended feature flags
Register
SPC_PCIEXTFEATURES
SPCM_FEAT_EXTFW_SEGSTAT
SPCM_FEAT_EXTFW_SEGAVERAGE
SPCM_FEAT_EXTFW_BOXCAR
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:
Table 18: Spectrum API: register overview of miscellaneous cards information
Register
SPC_MIINST_MODULES
SPC_MIINST_CHPERMODULE
SPC_MIINST_BYTESPERSAMPLE
SPC_MIINST_BITSPERSAMPLE
SPC_MIINST_MAXADCVALUE
SPC_MIINST_MINEXTCLOCK
SPC_MIINST_MAXEXTCLOCK
SPC_MIINST_MINEXTREFCLOCK
SPC_MIINST_MAXEXTREFCLOCK
SPC_MIINST_ISDEMOCARD
Function type of the card
This register register returns the basic type of the card:
Table 19: Spectrum API: register card function type and possible types
Register
SPC_FNCTYPE
SPCM_TYPE_AI
SPCM_TYPE_AO
SPCM_TYPE_DI
SPCM_TYPE_DO
SPCM_TYPE_DIO
20000h
Support for the SCAPP option allowing CUDA RDMA access to supported graphics cards for GPU calculations
(M4i and M2p)
40000h
M2p: Set if option M2p.xxxx-DigSMB is installed, adding16 additional digital I/Os via SMB connectors.
80000h
M2p: Set if option M2p.xxxx-DigFX2 is installed, adding16 additional digital I/Os via FX2 multipin connectors.
100000h
A digital (boxcar) bandwidth filter is available that can be globally enabled/disabled for all channels.
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.
Value
Direction
Description
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.
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.
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.
4h
Is set if the firmware mode „Boxcar Average" is supported in the installed firmware version.
Value
Direction
Description
1100
read
Number of the installed front-end modules on the card.
1110
read
Number of channels installed on one front-end module.
1120
read
Number of bytes used in memory by one sample.
1125
read
Resolution of the samples in bits.
1126
read
Decimal code of the full scale value.
1145
read
Minimum external clock that can be fed in for direct external clock (if available for card model).
1146
read
Maximum external clock that can be fed in for direct external clock (if available for card model).
1148
read
Minimum external clock that can be fed in as a reference clock.
1149
read
Maximum external clock that can be fed in as a reference clock.
1175
read
Returns a value other than zero, if the card is a demo card.
Value
Direction
Description
2001
read
Gives information about what type of card it is.
1h
Analog input card (analog acquisition; the M2i.4028 and M2i.4038 also return this value)
2h
Analog output card (arbitrary waveform generators)
4h
Digital input card (logic analyzer card)
8h
Digital output card (pattern generators)
10h
Digital I/O (input/output) card, where the direction is software selectable.
(c) Spectrum Instrumentation GmbH
Gathering information from the card
69
Need help?
Do you have a question about the M2p.59 Series and is the answer not in the manual?