LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency Measurement Speed

Hey everyone/anyone,

 

I'm trying to do frequency measurements but it is SUPER slow.

I know it's because I'm taking 400 samples for each measurement with TCP/IP connections in each iteration.

But I would be very thankful if someone could take a look at the attached code (it's the engine room only) and let me know how I could make it run faster?

 

And/or anther method of frequency measurement? I wrote my own code for it using the number of loop iterations between stationary points, but the values are really unstable. Possibly because LabView doesn't run at a constant rate due to being a higher level language?

 

Love this forum btw, have spend hours and hours reading posts.

 

Cheers,

 

Appleseed

0 Kudos
Message 1 of 3
(2,533 Views)

Appleseed36 wrote:

And/or anther method of frequency measurement? I wrote my own code for it using the number of loop iterations between stationary points, but the values are really unstable. Possibly because LabView doesn't run at a constant rate due to being a higher level language?


No, the points are unstable due to a non-deterministic OS and a non-deterministic data transfer method.  Windows cannot promise any consistant time accuracy.  I have seen random delays of 50ms just because Windows has to take care of something.  And TCP/IP does not guarantee a time of delivery, just that delivery will happen.

 

If the other system reading this data at a constant rate?  Can it send all of the data to you in a single packet?  If you have the constant sample rate, that is what is really needed for a proper frequency measurement.  And if you can get it all in a single packet, that will help reduce some of the TCP overhead.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,503 Views)

Hi thanks for the response!

So it's a windows thing plus TCP/IP, that's disappointing. I guess that means that frequency measurement with just one cycle is impossible?


Yes I'm fairly sure it's reading the data from an external sensing system at a constant rate.

I saw a video of a guy do it what I'm trying to do with a microphone and it was super quick and accurate:
https://www.youtube.com/watch?v=DKQT4M7M2Fg
But I guess he was able to take around 800 samples in a single packet?

Looks like I need to talk to the sensing equipment manufacturer, otherwise I'm screwed.

 

 

0 Kudos
Message 3 of 3
(2,477 Views)