Ano Ano Posted February 16, 2011 Report Share Posted February 16, 2011 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? Quote Link to comment
george seifert Posted February 16, 2011 Report Share Posted February 16, 2011 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 1 Quote Link to comment
tushar Posted February 17, 2011 Report Share Posted February 17, 2011 (edited) 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 February 17, 2011 by tushar 1 Quote Link to comment
Mark Smith Posted February 17, 2011 Report Share Posted February 17, 2011 If you have the full development system, there's a VI called Basic Trigger Level Detection that should do what you need. Mark 1 Quote Link to comment
Ano Ano Posted March 13, 2011 Author Report Share Posted March 13, 2011 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? Quote Link to comment
Jordan Kuehn Posted March 14, 2011 Report Share Posted March 14, 2011 (edited) 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 March 14, 2011 by jkuehn 1 Quote Link to comment
Ano Ano Posted March 14, 2011 Author Report Share Posted March 14, 2011 (edited) 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 March 14, 2011 by Ano Ano Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.