Rolf,
You've given a good description of your system (hardware, NI-DAQ version, etc.). However, it's not clear how you are using the DAQ_VScale function. Also, I assume it is that one and not the AI_VScale function. DAQ_VScale takes its channel parameter as a 16-bit integer. So, I assume you mean that you are specifying "0, 1, 2, 3, 4, 5, 6, 7" for the SCAN_Op function only. You can use the NI-DAQ Help file to see the descriptions of these functions and verify those input parameters.
You seem to have a good understanding that if you are configured for differential mode, accessing any channel above 7 will give this particular error message. However, channels 0-7 should not give this error.
Just in case, there is a KnowledgeBase 23DF9ILS: "Error -10007 Wh
en Configuring a DAQ Board for Single-ended Mode Programmatically" that warns about how one could accidentally be changing from the differential mode in the program.
The best thing to do is to start with the SCANsingleBufSync example. This uses SCAN_Op, SCAN_Demux, and DAQ_VScale to scan 2 channels. Make the device number appropriate. Then, to be able to scan 8 channels, you only need to change the following parameters:
i16 iNumChans = 8;
i16 iChan = 0;
static i16 piChanVect[8] = {0, 1, 2, 3, 4, 5, 6, 7};
static i16 piGainVect[8] = {1, 1, 1, 1, 1, 1, 1, 1};
Later on, you can change the scan rate, buffer size, and gain settings, but for purposes of eliminating the error, that's all you really need to do.
Regards,
Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/support