Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when using DAQmxBaseReadBinaryI16 on Linux

Hi,

I am using DAQmx-base (C library) on Linux with a USB-6009 device. When I am acquiring data
using DAQmxBaseReadAnalogF64() (the code is based on the example contAcquireNChan.c)
everything works, but when I am using DAQmxBaseReadBinaryI16() the following error
happens:

DAQmxBase Error: Value passed to the Task/Channels In control is invalid.

Everything is the same just the ...AnalogF64 is replaced by the ...BinaryI16 function call
(of course the buffer used for storing the data was also changed from float64 to in16).

Does anyone know what settings (or missing settings) result in this error?
Every explanation or pointer to some documentation is welcome. I already checked the
C reference HTML documentation coming with DAQmx-base without success.

Thanks
Raphael
0 Kudos
Message 1 of 3
(3,288 Views)
I have the same problem with that function on windows and NIUSB 6008.
Some people say there's some bugs with NIDAQmxbase...

http://forums.ni.com/ni/board/message?board.id=250&message.id=11529&query.id=17263#M11529
or search
DaqmxbasereadanalogF64 to see some threads about reading datas with NIUSB.
0 Kudos
Message 2 of 3
(3,270 Views)


@rasch wrote:
Hi,

I am using DAQmx-base (C library) on Linux with a USB-6009 device. When I am acquiring data
using DAQmxBaseReadAnalogF64() (the code is based on the example contAcquireNChan.c)
everything works, but when I am using DAQmxBaseReadBinaryI16() the following error
happens:

DAQmxBase Error: Value passed to the Task/Channels In control is invalid.

Everything is the same just the ...AnalogF64 is replaced by the ...BinaryI16 function call
(of course the buffer used for storing the data was also changed from float64 to in16).

Does anyone know what settings (or missing settings) result in this error?
Every explanation or pointer to some documentation is welcome. I already checked the
C reference HTML documentation coming with DAQmx-base without success.

Thanks
Raphael




From the ReadMe file for DAQmx Base on Macintosh OS X:

NI USB-9211
*Analog Input
-Multi-channel, multi-sample read (scaled)
-Multi-channel, single sample read (scaled)
NI USB-9215
*Analog Input
-Multi-channel, multi-sample read (scaled)
-Multi-channel, single sample read (scaled)
NI USB-6008/9
*Analog Input
-Digital start triggering
-Multi-channel, multi-sample read (scaled)
-Multi-channel, single sample read (scaled)

Raw input simply isn't supported for the USB devices. I would guess that the situation for Linux is the same, since DAQmx Base is based on Labview code in order to achieve cross-platform portability. See the thread

http://forums.ni.com/ni/board/message?board.id=250&message.id=11873

and, for a slightly different problem:

http://forums.ni.com/ni/board/message?board.id=250&message.id=11963

Be sure to read down to where there is a message indicating that support for USB devices is planned for NI-DAQmx. Of course, that won't help on Macintosh and Linux.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 3 of 3
(3,262 Views)