Hello,
I too am seeing low output rate on the 6501 using NIDAQmxBase.
I started with writeDigPort.c and only saw about 10Hz output so I
thought after StartTask I could do multiple writes via the loop below.
I now get the error
DAQmxBase Error -200170: Physical channel specified does not exist on this device.
Refer to the documentation for channels available on this device.
So I guess it is looking for 256 channels which of course I don't have.
What is the correct way of doing multiple writes within one task(is this possible?)
Thanks much,
Doug Taylor
// Create Digital Output (DO) Task and Channel
DAQmxErrChk (DAQmxBaseCreateTask ("", &taskHandle));
DAQmxErrChk (DAQmxBaseCreateDOChan(taskHandle,chan,"",DAQmx_Val_ChanForAllLines));
handle = taskHandle;
// Start Task (configure port)
DAQmxErrChk (DAQmxBaseStartTask (taskHandle));
// Write 0x55 to port(s)
// Only 1 sample per channel supported for static DIO
// Autostart ON
for(i=0;i<255;i++) w_data[i] = i;
w_data[255] = (uInt8)input1;
//printf("Data to write: 0x%X\n", w_data[0]);
//getchar();
for(i=0;i<256;i++) {
wr_data[0] = w_data[i];
DAQmxErrChk
(DAQmxBaseWriteDigitalU8(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,wr_data,&written,NULL));
}