From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 9239 returns -201087 when querying capabilities

I have general c++ code querying the capabilities of DAQmx devices. This works for 99% of the devices I have tested, but on the USB-9239 device the call to DAQmxGetAIResolution fails with error code -201087 (DAQmxErrorSampClkRateMustBeSpecd). From another thread in this forum I get the idea of specifying a dummy sample rate prior to this call e.g. DAQmxSetSampClkRate(1000.0f). This seems to cure the problem, but it can't be right? especially when querying the DAQmxGetDevAIMinRate also fails, so I don't know what to set the dummy value to?

I can see that the USB-9239 device does not support OnDemand sampling mode, but I just need Finite, which is specified in the DAQmxCfgSampClkTiming call.

 

It seems that calling DAQmxSetSampTimingType(taskHandle, DAQmx_Val_SampClk) also fixes the problem? Is the problem that is defaults to OnDemand which is not allowed for USB-9239?

 

Any idea how to fix this problem generally?

 

-cpede

0 Kudos
Message 1 of 4
(3,023 Views)

Hey cpede, 

 

From what I can see error code the lack of OnDemand capability for the NI 9239 is the most common culprit for error -201087. I think what you're referring to is DAQmx channel type returns error -201087 (although the LabVIEW version of!)


it might also be worth checking you are using the most recent download of DAQmx as we have had CAR 630663 reported and fixed (cDAQ\AI\AI-InternalSampClk fails with error -201087 for DSA modules including the 9239).

 

Let us know how you get on.

Rebecca

 

0 Kudos
Message 2 of 4
(2,988 Views)

I'm running NI-DAQmx Device Driver 17.1 and NI-DAQmx MAX Configuration 17.1.

 

-cpede

0 Kudos
Message 3 of 4
(2,982 Views)

Any progress?

For me it looks like an error that you cannot query the capabilities without setting up the device.

 

-cpede

0 Kudos
Message 4 of 4
(2,949 Views)