10-12-2009 02:55 PM
With the PCIe-6363, after writing to an Analog Output device’s buffer using DAQmxWriteAnalogF64, then reading back the space available using DAQmxGetWriteSpaceAvail, the returned value does not reflect the fact that data was written to the device.
The attached code gets the space available using DAQmxGetWriteSpaceAvail and writes to the AO buffer using DAQmxWriteAnalogF64. This sequence is repeated twice.
The 1st call gets the space available and is followed by a call that fills up the buffer (these 2 calls work as expected). The next call to DAQmxGetWriteSpaceAvail should get zero space available since we filled it up, but in the case of PCIe-6363 it returns the same value as the 1st call. This causes the 2nd call to DAQmxWriteAnalogF64 to fail.
The attached code demostrates this problem. It was tested with PCI-6251 and USB-6211 using actual hardware and works as expected. The error was observed with actual hardware when testing the same code with the PCIe-6363.
The output of the attached code for PCI-6251, USB-6211, and other M-Series devices is show below:
Write to AO Buffer before starting task.
Space Available = 1000
(Fill buffer using DAQmxWriteAnalogF64)
Space Available = 0
The output of the attached code for X-Series PCIe-6363 device is shown below for comparison:
Write to AO Buffer before starting task.
Space Available = 1000
(Fill buffer using DAQmxWriteAnalogF64)
Space Available = 1000 <--- ERROR
DAQmx Error: The generation is not yet started, and not enough space is available in the buffer.
Configure a larger buffer, or start the generation before writing more data than will fit in the buffer.
Property: DAQmx_Write_RelativeTo Requested Value: DAQmx_Val_CurrWritePos Property: DAQmx_Write_Offset Requested Value: 0
Task Name: MyTask
Status Code: -200293
Thank you for your help,
Wael Hemdan
Data Acquisition Engineer
The MathWorks
10-13-2009 02:16 PM
10-14-2009 08:57 AM
Wael,
I'm a little confused by your last comment. The 6363 was not supported in DAQmx 8.9. Did you mean that you saw the correct behavior of the 6259 in 8.9 and in 9.0.2, but the wrong behavior on the 6363 in 9.0.2?
10-14-2009 09:02 AM
10-14-2009 02:09 PM
Hi Wael,
I was able to reproduce your error and have a filed a corrective action request for it. It wasn't reproducible with a simulated device, but I definitely saw it with hardware. Thanks so much for bringing that to our attention!
10-14-2009 04:49 PM
11-02-2009 08:17 AM
Hi aNItaB,
Thank you very much for you help.
Can you provide me with any information as to when a fix for this bug (CAR #191661) will be available?
And if it's not soon, is it possible to get a patch in the meantime?
Thanks,
- Wael
11-02-2009 12:47 PM
Hi aNItaB,
Do you know if this problem happens with all X-Series boards or is it just with the PCIe-6363?
Thanks,
- Wael
11-03-2009 05:12 PM
I'm not sure when there will be a fix, or if there's a work around, but I'm looking into it and will let you know- have a good one!