1

I am running a Windows 7 guest system with an Ubuntu 14 host, using VirtualBox, and have run into a problem running even the simplest examples provided by National Instruments, using the ANSI C API for NI-DAQmx.

The first time the DAQ Device is powered on, I can run a single measurement, and after that, any other measurement displays the following error message:

Attempted to read samples that are no longer available. 
The requested sample was previously available, but has since been overwritten. 
Increasing the buffer size, reading the data more frequently, or specifying 
a fixed number of samples to read instead of reading all available samples 
might correct the problem.

Property: DAQmx_Read_RelativeTo
Corresponding Value: DAQmx_Val_CurrReadPos
Property: DAQmx_Read_Offset
Corresponding Value: 0

Task Name: _unamedTask(0)
Status Code: -200279

In order to be able to start a new measurement, I have to restart the DAQ device, probably in order to clear any internal buffers that are being overridden.

I am interested in running a basic continuous voltage measurement using a callback function. (The ContAcq_IntClk example provided by NI)

The exact same configuration, same version of NI-DAQmx(9.7.5), and running on Visual Studio 2012, runs smoothly on a machine running Windows 7 directly.

I suspect the problem is with the internal buffer being somehow messed up because of the connection with the Virtual Machine, but can't figure out an elegant solution to fix it.

The device I am using is NI USB-6289.


FIXED:

VirtualBox seems to have compatibility issues with NI USB devices. It appears to work, but it's unpredictable. VMWare works much better. Switched to VMWare Player and now works flawless.

RazvanC
  • 11
  • 2

0 Answers0