Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

speed of USB6501 ~300HZ with NIDAQmxBase

Hello,

I'm trying to see how fast I can write to the USB6501 so I started with
the writeDigPort.c example and after starting the task I write a number
of bytes using this loop

    s1 = Seconds();
    for(i=0;i<256;i++){
        wr_data[0] = w_data[i];
        DAQmxErrChk (DAQmxBaseWriteDigitalU8(taskHandle,1,0,10.0,DAQmx_Val_GroupByChannel,wr_data,&written,NULL));
    }
    s1 = Seconds() - s1;

Static IO can only write 1 sample at a time.
Seconds() is my own microsecond clock. So on a 1.2 Ghz Mac G4
the max. rate I get is ~300 bytes per second. I need to use NIDAQmxBase
because this is for a Mac. I have 2 questions.

1) Can I speed this up at all code wise or is this a known limitation?

2) If I use a DIO96 instead will performance increase? I need to be up about 2000Hz

Thanks for any help or suggestions.

Doug Taylor

0 Kudos
Message 1 of 2
(2,896 Views)

Hi Doug,

In general, even with NI-DAQmx, you cannot get software-timed digital output faster than 1000 Hz, so a DIO96 will not be able to get you up to 2000 Hz.  The only recommendation that I have is to use an M Series device which has hardware-timed digital I/O on an NI-DAQmx supported OS such as Linux or Windows.  I apologize that I cannot be of more help.

Regards,

Laura

0 Kudos
Message 2 of 2
(2,886 Views)