LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error message - 200284 in counting edge labview code

Solved!
Go to solution

Hi 

 

I am using cDAQ-9188 and NI9402 to count a TTL signal from a tachometer. 

I tried to use an example in the labview: Counter - Count Edges (Continuous Clock).vi as shown below. 

However, I got the error message 200284, so I adjusted the sample rate but it did work. 

How can I fix this problem? any idea? 

jeyugbokkeum_0-1653911558060.png

jeyugbokkeum_1-1653911604606.png

 

 

0 Kudos
Message 1 of 4
(236 Views)
Solution
Accepted by topic author jeyugbokkeum

Counters are a little tricky when it comes to sample clocks.  Most NI devices with counters (possibly all -- I don't know for sure of any exceptions), do not allow you to derive a sample clock internally.  You have to "borrow" it from another task or an external signal.

 

(Note: there are also several counter task types that use "Implicit Timing" where the signal itself defines sample timing and no regular clock is needed.)

 

Since you're starting with the shipping examples, I'll suggest you open a 2nd example for using a counter to generate a continuous pulse train.  Specify a different counter and start generating a pulse train at your desired sample rate of 1000 Hz.   Then come back to the example you posted and identify the sample clock source to be the internal output of that other counter.   You may first need to first right-click the control, choose "I/O Filtering" and check the box to "include advanced terminals".

 

There's a different error that may arise if your tach is slower than the sample clock (or there's no motion at all).  Or maybe not -- DAQmx has improved some of its config defaults over the years to make such an error much less common.  If you *do* get new errors, post back.

 

 

-Kevin P

 

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?

(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).



Message 2 of 4
(195 Views)

I would suggest that you could "put your finger right on the problem " by putting your finger on the problem. Digitally stimulate your shaft. 😱


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(186 Views)

According to your comments, I add one more task to borrow the sample clock, and it works now! 

 

Thanks a lot!!!

 

 

0 Kudos
Message 4 of 4
(180 Views)