Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Does DAQmxSetBufInputBufSize() work with Simulated Devices ?

Hi !

I am trying to find the optimum buffer size for my application and I am using the:
Visual Basic 6.0\Analog In\Measure Voltage\Acq-Int Clk example, with a Simulated Device (dev1: PCI-6143).

Now, I want to force the input buffer size to be small enough, so an error will occur.

So, first I change the DAQmxCfgSampClkTiming() function from FiniteSamps toContSamps.

Then, I set the NonOverWrite Buffer Mode and define a small buffer that cannot hold the requested samples.:

    DAQmxErrChk DAQmxSetReadOverWrite(taskHandle, DAQmx_Val_OverwriteMode1_DoNotOverwriteUnreadSamps)
    DAQmxErrChk DAQmxSetBufInputBufSize(taskHandle, numSampsPerChannel / 100)

Why do I not get an error, when running the example ?
Is it a limitation of the Simulated Device ?

Dimitri
0 Kudos
Message 1 of 2
(6,579 Views)

Hi Dimitri,

You are absolutely correct: this is a limitation of simulated devices. One thing that I would like to point out is that the DAQmx driver will automatically configure your buffer for you. More information about this is located in the DAQmx Help under NI-DAQmx Key Concepts >> Reading and Writing Data >> Buffering. The NI-DAQmx Help is located in Start >> All Programs >> National Instruments >> NI-DAQ >> NI-DAQmx Help.

Regards,

Hal L.

0 Kudos
Message 2 of 2
(6,559 Views)