07-10-2015 04:26 AM
Hello
My aim is to find 'on' time and 'off' time of a boolean switch.It should be in the range..If not it is failed..I developed vi but my prob is that 'on and off time is being compared when it is in progress.couldn't find proper result.I need to compare time duration once it get completed but not in present state (i.e want to compare previous stored value)Please anyone help me.
07-10-2015 06:44 AM - edited 07-10-2015 06:46 AM
Since you care about both transitions, you need to do your actions only when you detect a boolean transition. For this, I just use a Feedback Node (to hold the previous state) and then a Not Equal. From there, I can do all of the updating of states and checking that is needed.
07-11-2015 05:27 AM
Thank you..Can u send vi plz..
07-11-2015 07:47 AM - edited 07-11-2015 07:50 AM
http://www.ni.com/tutorial/9330/en/
He just did, download the png file, it contains a VI too...
edit: also have a look at this vi:
http://zone.ni.com/reference/en-XX/help/371361H-01/ptbypt/boolean_crossing_ptbypt/
It can simplify your block diagram, sinc it is already included in LabVIEW...
07-11-2015 12:18 PM
Blokk wrote:He just did, download the png file, it contains a VI too...
The snippet is in LabVIEW 2014, but the OP posted in 2012.
07-11-2015 12:24 PM
yep, not noticed 🙂
07-11-2015 12:43 PM - edited 07-11-2015 12:44 PM
Here's a more streamlined version (LabVIEW 2012):
(Of course you would need to tweak the tolerance control and add more indicators as needed.)
07-12-2015 03:41 AM
Thank you so much 🙂