Ken, thanks for the response, but I still seem to be having problems. I should have done this in my first post, but I'll walk through what I am doing.
I initalize my task like this:
TaskHandle myTask;
char chan[] = "Dev1/port0, Dev1/port1, Dev1/port2";
DAQmxBaseCreateTask("", &myTask);
DAQmxBaseCreateDOChan(myTask, chan, "", DAQmx_Val_ChanForAllLines);
Then I generate the data I want to output to the digital ports, lets just say I want to write 5 values to each port. In this example I want port 0 to get 0, 3, 6, 9, 12, port 1 to get 1, 4, 7, 10, 13, and port 2 to get 2, 5, 8, 11, 14.
uInt8 dataOut[15];
for ( ii = 0; ii < 15; ii++ ) {
dataOut[ii] = ii;
}
DAQmxBaseWriteDigitalU8(myTask, 5, 1, 10.0, DAQmx_Val_GroupByScanNumber, dataOut, NULL, NULL);
So this code should write the 5 values in sequence to each of the three ports, correct? I keep getting an error message that says, "Write cannot be performed, because the data does not contain data for all the channels in the task." I don't understand what this means. I tried turning the autostart off and using DAQmxBaseStartTask, but that doesn't help either.