
Analog Inputs
Channel Selection
(c) Spectrum Instrumentation GmbH
73
Example showing how to activate 4 single-ended channels:
To help user programs it is also possible to read out the number of activated channels that correspond to the currently programmed bitmap.
Reading out the channel enable information can be done directly after setting it or later like this:
Assuming that the two channels are available on your card the program will have the following output:
Differential Inputs
In addition to the normal single-ended inputs this board is also equipped with true differential inputs.
On card models, that offer more single-ended channels than differential channels (M2p.59x2 and M2p.59x3) the card will, when using chan
-
nels in differential mode, use two adjacent single-ended inputs and combine them to one true-differential channel. The channel with the even
number (Ch0, Ch2, Ch4 or Ch6) will be the input for the positive phase (+) and the channel with the next higher odd number (Ch1, Ch3,
Ch5 or Ch7) will be used for the negative phase (–).
On card models that offer the same number of differential as single-ended channels (M2p.59x0, M2p.59x2 and M2p.59x6) each channel
has two dedicated inputs one for the positive phase (+) and one for the negative phase (–) of the true-differential channel.
When the inputs are used in differential mode the A/D converter measures the difference between the two lines with regards to system ground.
The connector for the positive signal (channel x) is used in single-ended and in differential mode, while the connector for the negative input
(channel (x+1)) is used in differential mode for the negative phase.
Even in differential mode the inputs relate to system ground. The inputs are not isolated, so no connection to
levels above the maximum input voltage is allowed !
The following drawing shows the difference (also in the meaning of the maximum amplitude) between single-ended and differential input:
As you can see in the block diagram mentioned earlier in this manual, the internal conversion from differen
-
tial to single ended is done after the offset correction stage. As a result all the offset settings mentioned before
can only be used with single-ended inputs.
You can change between single-ended and differential mode separately for every even input channel by setting the relating register shown
in one of the following tables:
spcm_dwSetParam_i32 (hDrv, SPC_CHENABLE, CHANNEL0 | CHANNEL1 | CHANNEL2 | CHANNEL3);
Register
Value
Direction
Description
SPC_CHCOUNT
11001
read
Reads back the number of currently activated channels.
spcm_dwSetParam_i32 (hDrv, SPC_CHENABLE, CHANNEL0 | CHANNEL1);
spcm_dwGetParam_i32 (hDrv, SPC_CHENABLE, &lActivatedChannels);
spcm_dwGetParam_i32 (hDrv, SPC_CHCOUNT, &lChCount);
printf ("Activated channels bitmask is: 0x%08x\n", lActivatedChannels);
printf ("Number of activated channels with this bitmask: %d\n", lChCount);
Activated channels bitmask is: 0x00000003
Number of activated channels with this bitmask: 2
Image 45: Levels of differential signals in comparison to single-ended signals
Summary of Contents for M2p.59 Series
Page 190: ......