I would like to measure a voltage and a current, but the two cannot be conbined in one task. Therefore, I had to use two DAQmx Read in the same program. But it did not run.
Multiple channel types can be combined in a single DAQmx Read. One way is to use multiple DAQ Create Channel fucntions. Look at the posting here and the second example at the link in the answer.