60
M3i.48xx / M3i.48xx-exp Manual
Gathering information from the card
Programming the Board
The following example demonstrates how to read out the custom modification code.
Installed extended Options and Features
Starting with the cards of the M4i series, some cards can optionally have advanced features 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:
Used type of driver
This register holds the information about the driver that is actually used to access the board. Although the driver interface doesn’t differ be-
tween Windows and Linux systems it may be of interest for a universal program to know on which platform it is working.
Driver version
This register holds information about the currently installed driver library. As the drivers are permanently improved and maintained and new
features are added user programs that rely on a new feature are requested to check the driver version whether this feature is installed.
spcm_dwGetParam_i32 (hDrv, SPC_PCIFEATURES, &lFeatures);
lCustomMod = (lFeatures >> 28) & 0xF;
if (lCustomMod != 0)
printf("Custom modification no. %d is installed.", lCustomMod);
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.
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.
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 4028 and 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.
Register
Value
Direction
Description
SPC_GETDRVTYPE
1220
read
Gives information about what type of driver is actually used
DRVTYP_LINUX32
1
Linux 32bit driver is used
DRVTYP_WDM32
4
Windows WDM 32bit driver is used (XP/Vista/Windows 7/Windows 8/Windows 10).
DRVTYP_WDM64
5
Windows WDM 64bit driver is used by 64bit application (XP64/Vista/Windows 7/Windows 8/Windows 10).
DRVTYP_WOW64
6
Windows WDM 64bit driver is used by 32bit application (XP64/Vista/Windows 7/Windows 8/ Windows 10).
DRVTYP_LINUX64
7
Linux 64bit driver is used
Register
Value
Direction
Description
SPC_GETDRVVERSION
1200
read
Gives information about the driver library version