Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

200010 warning at DAQmxStopTask.vi

Solved!
Go to solution

Hello!

 

My task is to measure some random TTL pulses of 50ns smallest period from the photodetector (PD) while it's gate is opened for a particular time only when a motor, on which a head of the PD is mounted, is at angles that are multiple of fives. Motor is supported with an ActiveX lib, and I use event programming through RegEventCallback to catch when the motor reaches angles 0, 5, 10, 15 and so on. In the loop, iterating every time the callback was called (I use notifiers here to communicate between the loop and the callback) I use for the data acqusition the following VI: undefined

which is in the "Scan" section of the case structure in the loop. The initialization section of the case structure in the loop contains the following code:undefined

Here I have to explain that without a "gate task" there would be no counts at all (PD's feature).

 

I continiously get the warning (not the error) 200010 form the DAQmxStopTask.vi, although I have measurements done (non-zero values). I think, there should be something either with the acqusition rate or with the buffer size, but I actually can't get exactly what to change: 20M is plenty enough, 2 samples is twice more than enough (requested by LabView, however)...

 

Please, recommend me something!

0 Kudos
Message 1 of 6
(7,564 Views)

Hi!

 

My guess is here: you configure the Read Task for 2 Values, but DAQmxREad is set to give you one value back. So, 2 value in the RAM, DAQmxRead gives you one (DAQmxREad is set to 1 sample) then you end the task. One value is still in the read buffer, but the task is stopped.

 

Daqmx warns you, that you did not get all the values you requested initially.

 

When you want to aquire just one value, set "Samples per channel" to one.

 

Regards

René

0 Kudos
Message 2 of 6
(7,528 Views)

Dear reschri,

 

thank you for your answer. It's clear now, that the problem is here, but if I try to set the amount of samples to 1, the LabView tells me that this is not enough and asks to set at least 2. I think, that, probably, my approach in general is not correct: configuring "gate" channel in terms of CO pulse time might be not the best solution here, but I can't imagine something better. In addition, "read" requests buffer volume of 2 at least as well, so "count edges" channel will also every time provide the same trouble.

 

Actually, the task is pretty simple: open the gate and count chaotic pulses while the gate is opened. Once. I am really frustrated that such a seemingly basic thing is not going fluently...

0 Kudos
Message 3 of 6
(7,522 Views)
Solution
Accepted by topic author _Basil_

 

This isn't particularly intuitive, though it's clear enough in the help and examples *after* you know to look for it.

 

When you want to generate a single gate pulse, you simply never make *any* call to DAQmx Timing.vi when configuring the gate task.  Same holds true for the measurement task when you want only a single measurement.

 

I took the liberty to rework your two snippets a bit.  Haven't been able to test it, so let me know if any questions or problems.

 

First, the new config which will use the gate pulse as a hardware signal that limits counting to occur only during the high time:

 

undefined

 

 

 

Next, the new callback function to generate a single pulse and take a single reading:

 

undefined

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 6
(7,514 Views)

Dear Kevin,

 

thank you so much, everything works fine now! What exactly should I search for in the help and examples to get more into ( I want to learn 🙂 )?

0 Kudos
Message 5 of 6
(7,493 Views)

 

Glad to hear that the code worked for you.  How & where to learn stuff is a pretty big question to try to answer, so here's just a couple quick tips off the top of my head:

 

The main DAQmx Help is a great resource, though probably more as a reference than a tutorial.  You can get at it from the Help menu in MAX.

 

The shipping examples often act as  a good starting point.  They don't exhaustively demonstrate all features, but that's not their purpose.

 

Search the forums here for keywords related to what you're working on -- there's quite a bit of good info here too.  Just be careful to pay attention to the posting dates -- not everything that *used* to be true still is.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 6
(7,486 Views)