I have written an application based on DAQmx Base that does various things, including DIO reads. I have compiled it on both Macintosh and Windows; on Macintosh I use it with E-series, M-series and USB devices. Clearly, on Windows I use it only with USB devices.
I first built it on Macintosh and tested with a PCI-6014 E-series device. Using that device, I could read DIO lines calling DAQmxBaseReadDigitalScalarU32() without first calling DAQmxBaseStartTask().
On Windows, using a USB-6008 if I omit the call to DAQmxBaseStartTask(), I get error -1073807346 returned from DAQmxBaseReadDigitalScalarU32() (or any other DIORead call). Naturally, I get no info using DAQmxBaseGetExtendedErrorInfo().
I cite the error number because...
On Macintosh I tried it with the USB-6008, and got the same behavior, right down to the exact same bogus error number!
I don't necessarily expect to be able to call the DIORead functions without first starting the task. I tried it because with DAQmx you don't have to call DAQmxStartTask() before a read operation. Checking the documentation for DAQmxBaseStartTask(), I find that this is not, in fact, allowed.
I *do* expect it to be consistent.
I *do* expect the error code to be meaningful.
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com