Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting "Error -200284" with DAQ Assistant voltage measurement >20sec in event structure

Hello all,

I am trying to take a voltage measurement through an analog input on an NI USB-6259 board.  I would like to measure for some specified period (e.g., 20-30seconds) each time I click a button on the front panel.  I have the DAQ Assistant which performs this read inside of an event structure that is triggered by a "mouse enter" event on a boolean switch.

This all works perfectly as long as I keep my measurement time at 10 seconds or less (e.g., 10000 samples at a 1kHz sampling rate).  Any more time than that, and I get the following:

Error -200284 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi

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:

Task Name: _unnamedTask<1A3>

I have tried things like manually setting the "event timeout" value (rather than leaving it at the default -1 value)...all with no luck.  This seems like an easy problem, but I haven't been able to find anything on the boards yet. 

Please let me know if I can provide you with any other information.  Thank you for your consideration.

John

0 Kudos
Message 1 of 8
(4,485 Views)
Hello John,

You were on the right track looking for a timeout property, however the timeout property you need to set is for the DAQ Assistant.  This property can be set inside the DAQ Assistant setup/express VI.  I have attached a screenshot of where this would be found with DAQmx 8.5.  If you are trying to perform a single acquisition of 30 seconds this timeout will need to be 30 seconds.  The problem with doing this is that your application will become unresponsive for those 30 seconds with no update on how much has been acquired. 

Instead, you could perform a finite task and read small subsets of your 30 seconds of data back.  Alternatively, you could perform a continuous acquisition (while reading in small subsets of data) and stop your application after you have acquired enough data.  To perform a finite task and read small subsets of your total data you would need to use lower level DAQmx VIs than the express DAQ Assistant.  There are examples in example finder under Hardware Input and Output >> DAQmx that show how to use the lower level VIs. 

To read in a smaller set of data than the entire 30 seconds of your finite task,  you would put a read inside of a loop and specify how many samples to acquire each loop iteration.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Message 2 of 8
(4,472 Views)
Hi Jesse,

Thanks.  That works.  The only thing is...I don't see where I set that timeout inside the DAQ Assistant setup interface with LV 7.1 (we don't have a nice new version here).  So I can set the timeout value by attaching a constant to that option on the block diagram, but I guess it would be nice to know where the option is inside the setup interface.  Is that possible with version 7.1?

I feel like I'm missing something obvious here.  Sorry if I am just being dumb!

Thanks again,
John
0 Kudos
Message 3 of 8
(4,469 Views)

Hello John,

If I open an older version of the DAQ Assistant, the timeout value is not available inside the assistant.  In this case, the best way to set the timeout is to do as you have already done.

On a side note, if you are using LabVIEW 7.1 you are able to use DAQmx 8.5.  There is an online document that describes the compatibility between DAQmx and LabVIEW.  If you would like to use the latest driver, you can find it here.

Regards,

Jesse O.
Applications Engineering
National Instruments

 
Jesse O. | National Instruments R&D
0 Kudos
Message 4 of 8
(4,450 Views)
I know that something like this has been mentioned, but I had the exact same problem and fixed it by doing this:

If you are using labview 7.1, right click the "timeout" terminal on the "DAQmx Read" icon in the block diagram and select "create ... constant".  The value should default to -1, which will make it never timeout.  Or, you can set this to whatever you want.  If you try to acquire data for more than the default timeout value of 10 seconds, you will get an error. 

Hope this works for you too.

Message Edited by paul_UW on 05-09-2007 03:10 PM

0 Kudos
Message 5 of 8
(4,437 Views)
I was able to overcome the same problem by explicitly wiring in a numeric constant to the timeout terminal outside DAQ Assistant. I am not sure if this a bug in the program, since the value of timeout entered inside DAQ assistant does not seem to be taken into consideration by the program. I have a feeling this is the same as the comment made in the previous posting.


Message Edited by Neela on 05-28-2008 07:39 PM
0 Kudos
Message 6 of 8
(4,147 Views)

Hi Neela,

This is a known issue with the DAQ Assistant that we are working on fixing. Currently when you set the timeout value inside the assistant it is not used. It will still use the default ten seconds. An easy workaround is to wire a constant to the timeout input of the DAQ Assistant. The value of the constant will be used for the timeout value.  I hope this helps. Please let me know if you have any questions.

Thanks,

Nathan
NI Chief Hardware Engineer
0 Kudos
Message 7 of 8
(4,131 Views)
Thank you very much for the clarification Nathan. I appreciate the quick response. That suggestion got my vi working.
Cheers
Neela
0 Kudos
Message 8 of 8
(4,129 Views)