LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calcualte the period of my imput on a FPGA VI

Solved!
Go to solution

Hi,

If Anyone would be able to help me. I want to calculate the periode of my input, and for that I used the fonction "Tick Count" and apparently it's not the right choice
Any suggestions
Thank you in advance for your replies

My best regards

Nadia

Download All
0 Kudos
Message 1 of 9
(3,010 Views)

I am guessing you are just getting an increasingly larger and larger number for your loop timer.  You can use the tick count function as long as you are holding the previous value in a shift register and finding the difference between the two.  The white paper below gives other examples for finding the loop time in an FPGA VI.

 

http://www.ni.com/example/30439/en/

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 9
(2,997 Views)

But a loop time function give me the speed of my loop, and what I'm looking for is how to get the period of my input(my signal)

My best regards

Nadia

0 Kudos
Message 3 of 9
(2,980 Views)
Solution
Accepted by topic author k.nadia

Try checking out the "PWM Measurement" example in the NI example finder (just use the search to find it). It should cover everything you're asking about here. Feel free to post back with any questions you have about it.

Also, here's a relevant old post: http://forums.ni.com/t5/LabVIEW/PWM-Rise-Fall-detection/m-p/2503918#M762735

Cheers!

TJ G
0 Kudos
Message 4 of 9
(2,973 Views)

Thank you so much

 

My best regards

Nadia

0 Kudos
Message 5 of 9
(2,936 Views)

T-REX$  in your opinion, the sum of the high and low period will give me the period

Thank you advance for your answer

My best regards

Nadia

0 Kudos
Message 6 of 9
(2,917 Views)
Solution
Accepted by topic author k.nadia

Yes, the amount of time high plus the amount of time low will give you one period.

Cheers!

TJ G
Message 7 of 9
(2,913 Views)

Hi T-REX$

Your method is working great 

I still have a question. Do you see how to verify that my signal is not turn off

 

Thank you in advance

My best regards

 

0 Kudos
Message 8 of 9
(2,793 Views)
Solution
Accepted by topic author k.nadia

k.nadia wrote:  I still have a question. Do you see how to verify that my signal is not turn off

You will typically want to have a max value for the period.  If your count for the period goes above that value, consider the signal to be turned off.


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
Message 9 of 9
(2,775 Views)