08-01-2018 08:06 PM
I am trying to use an analog input to measure a voltage. It doesn't need to be synchronized with anything. I just want to use it like a voltmeter. I tried to set up a measurement task using NI MAX and I got the same result (as in .NET): The first time after connecting the module (plugging in USB) I can take one set of readings. The next time I press "Run", it blocks until the timeout expires, then gives the error as shown.
It acts as though it needs to be triggered, but I can't find a setting for "just go do it".
Can anyone set this up so it will take a measurement each time I run it?
Windows 10 (VirtualBox)
VS Express 2013
NI-MAX 17.5.0f0
NI-USB-6001
Error -200284 occurred at DAQ Assistant. "Some or all of the samples requested have not yet been acquired...."
Other settings (on other tabs):
Start Trigger Type = None
Reference Trigger Type = None
Sample Clock Type = Internal
Timeout = 5 s
Logging = not enabled
08-02-2018 01:28 PM - edited 08-02-2018 01:28 PM
The first recommendation I have is to click the "Details" button in MAX so we can see what error you're getting.
Beyond that, It looks like you're using Windows 10 in VirtualBox to communicate with hardware. Communicating between a virtual machine and hardware has all sorts of additional challenges (most notably, inconsistent USB pass-through), and isn't supported by NI.
Does this same behavior reproduce on a non-virtual PC?
08-02-2018 04:40 PM
So far the .NET code to work with Tasks and Channel Writers have been cooperating with the drivers. I will have to see if we have a native Win 10 PC to duplicate the error on.
I had posted the relevant part of the error from MAX, thinking it was well-known. It basically says I either didn't wait long enough, or that there was no data being produced due to...a triggering issue. Here's the whole message:
Error -200284 occurred at DAQ Assistant
Possible Reason(s):
Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0