LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I check an increasing frequency

Solved!
Go to solution
I want to check a freqency that is increasing. If it exceeds 2000 I want to capture it immediately, however if it does not exceed 2000 within 12 seconds I want to capture whatever it is at that point. Attached is a VI I wrote that accomplishes that but I used a local variable. Is there an easy way to do this without a local variable?
Message 1 of 8
(3,363 Views)

Hi,

 No need of using local variable,directly wire the control to the case structure?

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 8
(3,349 Views)

Hello,

 

       I read your problem carefully & understand it but I Can't see your attached VI due to your higher version of LabVIEW. So I just implement you logic and attached my VI. It may help you.

 

Thank you. 

Vinal Gandhi, CLA
0 Kudos
Message 3 of 8
(3,334 Views)

Hello,

 

I tried your suggestion previously and it does not work because it only uses the initial value of the frequency.

 

Thanks,

Chuck

0 Kudos
Message 4 of 8
(3,319 Views)

Vinal G,

 

The problem is that the initial value of the frequency is changing outside of the loop, that is why I had to use a local variable.

 

Thank you,

Chuck

 

 

0 Kudos
Message 5 of 8
(3,314 Views)

I changed a few thing about your VI.

 

First: When you put the 1000 msec delay in the loop it will not be exact timing. I would use the clock. This also allows for you loop to exicute faster so that you can evaluate the frequency faster and respond faster than one second.

 

Second: I removed the true false  case structure for the frequency evaluation and replaced it with a greater than compairison.

 

Third: I moved the control into the loop.

Tim
GHSP
0 Kudos
Message 6 of 8
(3,305 Views)
Using local variables is ok. If you are updating this in another loop then there is nothing wrong with using a local variable to get the new value. The are more complicated and safer ways to do this and if you program is going to get big then at some point you may wish to consider the alternatives.
Tim
GHSP
0 Kudos
Message 7 of 8
(3,304 Views)
Solution
Accepted by topic author chuck72352
This one has an example of what I thing you are looking for.
Tim
GHSP
Message 8 of 8
(3,297 Views)