Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

VB DAQ anomolies...can anyone explain?

Problem #1:
I'm using VB to generate waveforms of varying length and get a run-time error 10010 if the value of NUpdates is not an even value. Why is this?

Problem #2:
Also, if I set the ProgressInterval equal to NUpdates...then the last part of my waveform is not sent out. If I disable the ProgressEnabled then the waveform is sent out just fine.

Can anyone explain these two problems I am seeing?
I'm using the NI PXI-6711 DAQ and Measurement Studio Version 6.0.

Thanks!
0 Kudos
Message 1 of 5
(3,664 Views)
Greetings,

Your question #1 can best be answered by the Knowledge Base article that I have linked below.

-10010 Invalid Count Error and Odd Buffer Sizes
http://digital.ni.com/public.nsf/websearch/862567530005F09C8625672E001D9C6F?OpenDocument

The ProgressInterval is used to specify the interval for generating progress events. Usually this is set to a fraction, such as 1/4, of the NUpdates. In this case, if your NUpdates was 1000, then after every 250 points a progress event would be generated. There would be no need to set ProgressInterval equal to NUpdates as you could just call a sub routine after the waveform was generated.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,664 Views)
Thank you for your response...but how do I know when the waveform is completed? I have very long waveforms for example 30 seconds. The reason I set the progress interval equal to the NUpdates is so that I could tell when the DAQ was finished sending the waveform.

Thanks again!
Scott
0 Kudos
Message 3 of 5
(3,664 Views)
Scott,

Okay ... I see what you are saying now. Since your waveform is so long we will have to use the Progress feature to check on the status of the write. When you set the ProgressInterval equal to NUpdates how much of your waveform is not sent out? How much is the "last part" that you previously indicated was lost?

What if you use a ProgressInterval of 1/4 the NUpdates. Do you still lose any of your waveform? I realize you will have to add more code to check to see if the 1/4 progress is the last 1/4, but for now let's just see if you lose any of your waveform.

Regards,
Justin
0 Kudos
Message 4 of 5
(3,664 Views)
I did try the using 1/4 of the updates but the progress event on the last one still occured before the end of the actual waveform output.

So I disabled the progress event and instead used a timer and it fires when my waveform is finished since each of my voltage points that are sent out via the DAQ is 1 msec apart it was easy. Now all is well. I do not know why this progress event occurs too soon, but at least I have a work around.

Thanks for all your advice!

Scott
0 Kudos
Message 5 of 5
(3,664 Views)