Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-USB 4431 Analog Output not working

Hi,

 

I am trying to use the NI example code from ContGen-IntClk.c to generate an analog output waveform on the NI-USB 4431.

I updated the code based on the NI-USB 4431 min/max voltage range, and set the sample rate to a supported rate of 1250 Hz.

 

I am using the NIDAQmx Driver version 9.1.0f0

 

The code works with the NI-USB 6218 but gives me the following error when I try running it with the NI-USB 4431

 

I am getting the following error:

 

DAQmx Error: Specified property is not supported by the device or is not applica
ble to the task.
Property: DAQmx_Write_TotalSampPerChanGenerated

Task Name: _unnamedTask<0>


Status Code: -200452

 

Please find the code to reproduce this problem attached.

 

Thanks,

   whemdan, The MathWorks

0 Kudos
Message 1 of 8
(4,887 Views)

Hi whemdan,

 

This is an unexpected error because according to the Supported Properties by Device section in the DAQmx C Reference Help, the USB 4431 supports this property.  The property is not used in the example, try running the example as is to remove any other function calls that could be affecting this behavior.  If you are successful with the example, then only add this property and see if the error is still generated.  I had no issues with this call in LabVIEW and DAQmx 9.1.1.  Let me know how this goes!

 

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(4,829 Views)

Hi,

 

Thank you for your response.

I believe the error is coming from the following piece of code as a result to the call to DAQmxGetWriteTotalSampPerChanGenerated. For some reason this method call seems to error with the NI-USB 4431 but works with other AO devices like the NI-USB 6218.

 

while(scansGenerated < 1000)
{
DAQmxErrChk (DAQmxGetWriteTotalSampPerChanGenerated(taskHandle, &scansGenerated));
printf("Scans Generated: %I64d\n", scansGenerated);
Sleep(0);
}
0 Kudos
Message 3 of 8
(4,825 Views)

The USB-6218 and USB-4431 are very different as one is a member of the multifunction data acquistion M series family and the other is of the dynamic signal acquisition (DSA) family and cannot be really compared as equal.  I always recommend checking the DAQmx C Reference Help( Start>>Programs>>National Instruments>>NI DAQ>>Text Based Code Support) for the Device Supported Properties.  However I verified in the manual that this is a supported property for both devices.  As previously mentioned, I was able to read this property in LabVIEW with DAQmx 9.1.1 without any issue.  Try upgrading to the latest version of DAQmx to see if it helps.  See if there is a different behavior if you reference a simulated device rather than the actual device.  Keep me posted as we may need to look toward a corrective action request if the issue persists.

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(4,797 Views)

Hi,

 

Thank you very much for your response.

I upgraded to NIDAQmx 9.1.1 and the problem still happens with the NI-USB 4431 when running with the actual device.

I also tried running the attached code with a simulated NI-USB 4431, the problem does not happen with simulated devices.

 

Regards,

   whemdan, The MathWorks

0 Kudos
Message 5 of 8
(4,759 Views)

Thank you for the information Whemdan.  We have verified this behavior in DAQmx 9.1.1 with C support and have filed Corrective Action Request (CAR) 245504 to R&D so they can further investigate and address the issue in a future release of the DAQmx driver.  Upon new releases of the driver, any CARs fixed will be documented in the readme.

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 6 of 8
(4,651 Views)

Any news on this problem?

I got the same problem (error code, and message) using the NI USB-4431 in matlab with driver version 9.2.3f1.

 

Right now we have this device on loan to integrate in to a software application, and we cannot use it.

 

Regards,

 

Steven

0 Kudos
Message 7 of 8
(4,177 Views)

Hey everybody,

 

This CAR was identified by the R&D team as a defect, and it should be fixed in NI-DAQmx 9.3.

 

Thanks!

------
Zach Hindes
NI R&D
0 Kudos
Message 8 of 8
(4,161 Views)