Analog Inputs
Setting up the inputs
(c) Spectrum GmbH
65
The following example reads out the number of available input ranges and reads and prints the minimum and maximum value of all input
ranges.
The input range is selected individually for each channel. Please note that the correct input path needs to be set
Standard Input ranges of path 0 (Buffered):
Standard Input ranges of path 1 (HF, 50 ohm terminated):
Read out of input features
Each input path has different features that can be read out to make the software more general. If you only operate one single card type in
your software it is not necessary to read out these features.
Please note that the input features are read out for the currently selected read AI path done by register SPC_READAIPATH. Please also note
that the following table shows all input features settings that are available throughout all Spectrum acquisition cards. Some of these features
are not installed on your specific hardware. The columns for the input paths show which settings are available for which input path on a
standard card:
spcm_dwGetParan_i32 (hDrv, SPC_READAIPATHCOUNT, &lNumOfPaths);
for (lPath = 0; lPath < lNumOfPaths; lPath++)
{
spcm_dwSetParan_i32 (hDrv, SPC_READAIPATH, lPath)
spcm_dwGetParam_i32 (hDrv, READIRCOUNT, &lNumberOfRanges);
for (i = 0; i < lNumberOfRanges; i++)
{
spcm_dwGetParam_i32 (hDrv, SPC_READRAN i, &lMinimumInputRage);
spcm_dwGetParam_i32 (hDrv, SPC_READRAN i, &lMaximumInputRange);
printf („Path %d Range %d: %d mV to %d mV\n“, lPath, i, lMinimumInputRange, lMaximumInputRange);
}
}
Register
Value
Direction
Description
SPC_AMP0
30010
read/write
Defines the input range of channel0.
SPC_AMP1
30110
read/write
Defines the input range of channel1.
200
± 200 mV calibrated input range for the appropriate channel.
500
± 500 mV calibrated input range for the appropriate channel.
1000
± 1 V calibrated input range for the appropriate channel.
2000
± 2 V calibrated input range for the appropriate channel.
5000
± 5 V calibrated input range for the appropriate channel.
10000
± 10 V calibrated input range for the appropriate channel.
500
± 500 mV calibrated input range for the appropriate channel.
1000
± 1 V calibrated input range for the appropriate channel.
2500
± 2.5 V calibrated input range for the appropriate channel.
5000
± 5 V calibrated input range for the appropriate channel.
Register
Value
Direction
Description
SPC_READAIPATH
3121
read/write
Selects the input path which is used to read out the features. Please note that this settings does not
change the current path selection.
SPC_READAIFEATURES
3101
read
Returns a bit map with the available features of that input path. The possible return values are listed
below.
Value
Path 0
Path 1
Description
SPCM_AI_TERM
00000001h
x
fixed
Programmable input termination available
SPCM_AI_SE
00000002h
fixed
fixed
Input is single-ended. If available together with SPC_AI_DIFF: input type is software selectable
SPCM_AI_DIFF
00000004h
Input is differential. If available together with SPC_AI_SE: input type is software selectable
SPCM_AI_OFFSPERCENT
00000008h
x
x
Input offset programmable in per cent of input range
SPCM_AI_OFFSMV
00000010h
Input offset programmable in mV
SPCM_AI_OVERRANGEDETECT
00000020h
Programmable overrange detection available
SPCM_AI_DCCOUPLING
00000040h
x
x
Input is DC coupled. If available together with AC coupling: coupling is software selectable
SPCM_AI_ACCOUPLING
00000080h
x
x
Input is AC coupled. If available together with DC coupling: coupling is software selectable
SPCM_AI_LOWPASS
00000100h
x
x
Input has a selectable low pass filter (bandwidth limit)
SPCM_AI_ACDC_OFFS_COMP
00000200h
Input has a selectable offset compensation for HF-Path with AC/DC coupling/source missmatch.
SPCM_AI_AUTOCALOFFS
00001000h
x
x
Input offset can be auto calibrated on the card
SPCM_AI_AUTOCALGAIN
00002000h
x
Input gain can be auto calibrated on the card
SPCM_AI_AUTOCALOFFSNOIN
00004000h
Input offset can auto calibrated on the card if inputs are left open
SPCM_AI_INDIVPULSEWIDTH
00010000h
Trigger pulsewidth is individually per channel programmable