03-29-2008 07:40 AM
Dear All,
I have a USB-6211 DAQ and Labview 8.5, and NIDAQmx version 8.71 (the latest one?), running on windows XP
The attached VI exits after about 4 seconds of execution with the overflow error: Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:1
The example is very simple, involving a single loop containing a single channel AI (continuous sampling at 40 samples at rate of 4000 samples/sec), in parallel with a single channel AO, writing a DC value at 10 samples at 1000 samples/sec.
Thus, both read and write should take about 100 mSec per iteration- still the AI buffer gets overflow after just 4 seconds. It is the same phenomenon even if I lower the AO write samples (from 10 to 5 for example)
Could the problem arise from the use of the DAQ assistants instead of the more primitive read/write functions? Shouldn't this also work with the DAQ assistants?
Any help would be greatly appreciated!
PS the problem persists when I changed the AO write rate to 4000 to equal the AI rate
PPS the problem disappears if I disconnect the wire between the simulate signal and the AO daq assistant - meaning the problem resides in the daq assistant or its workings
PPPS moving the read and write to different loops would probably work, but why doesn't this work with my single loop??
03-31-2008 01:49 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
04-02-2008 08:00 AM
Dear Joe,
I took your advice and am started using the DAQmx more low-level functions. I must be doing something wrong in the DAQmx Write function tho, because the attached VI takes about 3 seconds to complete, when the total time of the samples is supposed to be around 40 milliseconds.
Can you please see if you can find any problem here? I would like very much for it to finish when the samples are done, i.e. 40 seconds.
Thanks dearly,
WildCherry
04-03-2008 01:02 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
04-04-2008 06:42 AM
04-08-2008 01:24 AM
04-08-2008 01:48 PM
Dear Steven,
Thanks for the refrence to the Examples; I actually went over these, but when I tried executing an AO myself, using these same functions and Simulate Arbitrary Signal VI, I ran into some unexpected problems. The VI I attached two posts above (test_writing_onech.vi) shows this problem:
A waveform which is supposed to be of 40 mSec length is made with the Simulate Arbitrary Signal VI, but when I try to wire this to the DAQmx Write, two problems occur (which arrise from the same source I am sure)
1. The actual time spent on in the Write VI is around 3 seconds on my machine (it was around 1 sec on Joe's) [see "time mSec" indicator on the Front Panel]
2. The actual pulse generated lasted these whole 3 seconds! instead of the intended 40 mSec [as measured by a multimeter attached to the AO ports on the DAQ]
What could be causing this? I didn't use the DAQmx Timing VI, therefore Write should work using on-demand timing - but still, why doesn't this work?
Another note: when I try changing the number of Samples in the WFM, by changing the dX in the Timing window in the Define Signal part of Simulate Arbitrary Signal VI, then the total time changes about proportionally to the number of samples- i.e. there seems to be a more or less (not precise at all) constant rate of generation of around 1000 samples/sec, regardless of the actual time the WFM should have taken.
Could there be a problem using Simulate Arbitrary Signal VI with these DAQmx functions? (Write etc.)
Thanks dearly for your help,
WildCherry
04-10-2008 01:52 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
04-13-2008 10:36 AM
Dear Joe,
Thanks dearly for your reply. I finally changed my VI and utilized DAQmx Timing, using the "Use Waveform" configuration, and added DAQmx Start, and DAQmx Wait Until Done VIs, and it seems to work as expected finally 🙂 So the example I sent you is no longer relevant- although I DID try to implement the changes you suggested and it still takes 3 seconds on my machine and not the 5 milliSecs you encountered (The timing measurement sequence doesn't matter- I changed that also just to make sure- it also makes sense that it won't, as the clock VI (and all other no-input vis) in the same frame are supposed to start executing in parallel (at least up to the timing of the OS..), and so the time measurement should be the same even if it's in the same frame.
So it is still a mystery what happened in this example, but we shouldn't be concerned about it now.
Thanks again and have a great week,
WildCherry
04-14-2008 11:54 AM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)