Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter-Frequency - Error 200140

Hi Everyone:

I use DAQPad 6016 OEM with LabView 8.0 in order to measure the
frequency and duty clycle of analog signal (Pulse Width Modulation) which is
0-1KHz. I use the DAQ ASSIST to program and I use the Low frequency with
1 counter frequency measurement method. However, i got an error as
follows:
"Error-200140 occurred at DAQmx read" and "Two consecutive active edges
of the input signal occurred without a counter timebase edge"

Could you please help me out with these errors? Please consider me as a LabView beginner.

Thank you and have a good night.

NguaHoanUSA
0 Kudos
Message 1 of 7
(5,277 Views)

Hello NguaHoanUSA,

When doing this type of measurement you need to have your signal connected to the gate of the counter.  If you are missing your pulses and getting errors, can you confirm that your signal is a TTL signal?  The counters are designed to count only TTL pulses.  This type of error could be caused by a non TTL or noisy  signal.  To test your counters and your application you can generating a pulse train on counter 0 and read that pulse's frequency on counter 1.  You can generate the pulse train through the test panel for your device found in Measurement and Automation Explorer (MAX) or through the DAQ Assistant.  You can find test panels in MAX by expanding Devices and Interfaces >> NI-DAQmx Devices then selecting your device.


If you can get your application to work with the counter generated signal I would guess your signal is the source of your error.

 


Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 7
(5,261 Views)

hi Jesse:

I would like to thank you for your advice. I am lucky and i solved this problem. It is very interesting. Now, I try to measure the duty cycle of pulse width modulation (analog signal) with DAQ 6016 OEM and labview 8.0. Could you please help me out how to do it?

Thank you for your help and have a good night.

Hoang

0 Kudos
Message 3 of 7
(5,256 Views)
Like I said in another thread, the duty cycle can be determined very easily with an analog measurement. But it is not much more difficult to measure it by using a counter. Use a "CI Semi Period" task. LabVIEW (I'm using 8.0.1) ships with a well documented DAQmx example. See attached picture for its name and location. It will be listed if you search the LabVIEW examples for "duty cycle" (LabVIEW Menu >> Help... >> Find examples...).
 
There is also a traditional DAQ example for E Series counters (DAQ-STC) on ni.com.
0 Kudos
Message 4 of 7
(5,246 Views)
Here is the mentioned picture.
0 Kudos
Message 5 of 7
(5,244 Views)
hi Jesse:
 
I would like to thank you for your advice. Two problems, which i asked you before, was solved. I could measure the frequency and duty cycle of the analog pulse width modulation and it gave me the correct result compared with the scope. I am happy with these result. However, I still have a error of analog input signal (graph). The error is 200284.
 
Could you please help me out ?
 
Thank you so much for your help.
 
Hoang
0 Kudos
Message 6 of 7
(5,229 Views)

Hello Hoang,

I have taken a look at your code, cleaned some of it up and removed a lot of it.  From the code you attached, I do not know exactly where the error is coming from, but I assume that it came from the DAQmx Express VI that is reading your data.  To check this I have modified your code.  Can you please download it, and run it.  You may need to change the Express VI to meet your hardware setup.

This error typically means that your task has timed out before you were able to acquire all the samples you specified.  An online Knowledge Base found here discusses this.  If you are still having problems can you give more information about what is happening?  For example, what loop iteration do you receive the error and do you get the same error if you increase your time out or increase/decrease your sampling rate.  If the problem is not with your analog input can you explain where it is?

On a side note, you do not need to place a DAQmx Start Task and a DAQmx Stop Task after a DAQmx Express VI.  Placing these VIs in your code after an Express VI do not help since by the time that code is executed the task has already been ran and the data has been collected.


Regards,

Jesse O.
Applications Engineering
National Instruments

Message Edited by Jesse O on 06-23-2006 05:36 PM

Jesse O. | National Instruments R&D
0 Kudos
Message 7 of 7
(5,210 Views)