From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error code 20312 and 20315

Hello,

 

 

I'm planning on using a MCC DAQ for measuring frequency through an analog port. My input is in the form of pulses with varying amplitude, and I need to be able to measure their frequency. I am very new to this and don't really know what the problem really is.

I have tried two methods and am facing different problems with them. Please help.

 

---------

To simulate the signal, I'm using InstaCal (virtual board from Measurement computing) to generate a sine wave of amplitude 5V. I don't know what frequency the signal is at.

I made a sample program but it keeps showing the error:

Error -20315 occurred at Timing and Transition Measurements2->testflow.vi
" (waveform index 0 of 1)

Analysis:  The waveform dt parameter is <= 0.

I have attached the code below (capture.jpg).

 

----------

I also used the timing and transition VI with the sampling clock and start VIs in a separate code and in that case it doesn't work with a sine wave at all. (displays the message: Error -20312 occurred at Timing and Transition Measurements->UI_2.vi
" (waveform index 0 of 1)

The input waveform size is zero).

For a square wave, it keeps showing some the frequency at "2500", and after 2-3 times of running, throws up the same error (20312) with "2147483647" in the same frequency display.

I haven't put it in a while loop to figure out what happens when you run it once. If I do need to put it in a while loop, which elements should I put in the loop?

Attached the part of the code in capture2.jpg

 

Thanks!

Download All
0 Kudos
Message 1 of 3
(3,518 Views)
The problem is the same in both snippets: the express VI. Let's talk about the actual data that you are going to be measuring. According to what you said its a pulsed signal. So the first thing is that you need to.be testing with a pulsed signal, not a sinewave.

Second, how much noise is there going to be on the actual signal?

Third, how much does the pulse amplitudes change?

It sounds like all you really may need to measure the times between points where the signal crosses some arbitrary threshold that you pick.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 3
(3,463 Views)

Noise: My application is not very sensitive to noise, I need to measure RPM (0-2500):

Frequency: The sensor output will be in the range of 0-2500 pulses/sec

Amplitude: Will be in the range of 0-4V, proportional to RPM. Voltage is induced through a mag pickup with a reference of 1.5V at 1000 RPM. I can use a threshold of 0.15V (100 RPM) for low-high cutoff.

Noise, I am not sure, as far as I know the sensor is pretty accurate (<0.02% at all frequencies) which is sufficient for my application.

 

I'll be using a MCC DAQ with a capacity of 33-4000 S/sec in occasional scan (software paced) mode and 250 kS/sec in continuous scan (hardware paced) mode. I don't know what I need to do in Labview to distinguish between the two modes but I would like to use the hardware paced mode.

 

Could you suggest the best possible method for my application?

Do I need to use the sampling clock/start VI with the Timing-Transition express VI?

Which sampling rate should work the best?

If measuring the times between points is the best way, do I need to use a different input or an analog input will do? Also, which VI should I use for this purpose?

 

I know I'm directly asking for the solution, but I need to get the job done quickly.

 

 

Again, thanks for your help!

 

 

0 Kudos
Message 3 of 3
(3,435 Views)