Jump to content

Threshold Detector


Ano Ano

Recommended Posts

Hello,

I am a mechanical engineer and Newbie in Labview. I need to design a vi that will act as a threshold detector. I have 10 ramp signals and I want to get , for each signal, an LED turning on (in the front panel) when the the ramp signal rises and it passes a threshold. I also want to be able to log the time it takes for each of these LED's to turn on. I have tried the threshold vi that exists in Labview but I cannot get it to read that the threshold is reached and give a signal to the LED.

Any ideas?

Link to comment

Hello,

I am a mechanical engineer and Newbie in Labview. I need to design a vi that will act as a threshold detector. I have 10 ramp signals and I want to get , for each signal, an LED turning on (in the front panel) when the the ramp signal rises and it passes a threshold. I also want to be able to log the time it takes for each of these LED's to turn on. I have tried the threshold vi that exists in Labview but I cannot get it to read that the threshold is reached and give a signal to the LED.

Any ideas?

It'd be helpful to see what you have so far so we can make suggestions.

George

  • Like 1
Link to comment

use greater than function in comparison palette.

for time measurement when the LED turns ON off you can record the tick count, and the difference between tick counts will give you desired result.

you can post your code so that we can help you out. with implemetation

Edited by tushar
  • Like 1
Link to comment
  • 4 weeks later...

Thank you all for your replies and sorry for my long absence.

Yes the Basic level trigger detection vi" is what I needed to turn on the LED.

There is another issue though on how to log the time it takes from the minute I start the vi to the time that the threshold is reached (and passed)

How can I do it?

Link to comment

As suggested earlier, post your code and we can be more helpful. Perhaps even a VI Snippet.

tushar gave you good advice regarding timing when the trigger occurs.

To further elaborate, if you are simply wanting the time from execution to the first threshold, you can place a tick count vi before your while loop. Place another inside the while loop inside a case structure that has the selector wired to the same boolean as what turns the LED on. In the false case you can put the put the tick count from the beginning. Then subtract the two and conditionally wire the result into a numeric indicator. When true you'll see the time between start and threshold, when false you should see 0. I have a feeling you may need a little bit more sophisticated approach, but this should get you started for now.

Edited by jkuehn
  • Like 1
Link to comment

OK I have attached my vi.

I use 2 sinewaves with different amplitudes

Using the tick count method I can get the time difference for one of the sinewaves but not for both!

If i increase the amplitude on the first sinewave, i get the correct time difference, after a few seconds I try to increase the amplitude for the second sinewave, and as soon as it passes the threshold then I get the same time difference in both

Why is this happening?

This is very important for me as I am going to have 10 ramp signals and i need to know separate time for all 10, and display/export on a table

Basic Level Triggering of Waveforms5.vi

Edited by Ano Ano
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.