Have you read/viewed/studied any LabVIEW Tutorials, such as the ones mentioned on the first page of this Forum? If so, you should be able to:
Give it a try. When you next Reply to this message, attach your VI so that we can either (a) congratulate you for figuring out how to do this, and for putting a little effort into learning enough basic LabVIEW (like the first few Tutorials), or (b) give you just a little hint to correct a mis-impression or lack of understanding of LabVIEW's Data Flow paradigm.
Thanks for reply...I can create a loop to generate Boolean and I can compare old and previous value...what my main problem was how to check with in 5 sec any value ( Boolean ) changed or not
It is always a good idea when you have a LabVIEW Question to post your LabVIEW code where you try (and, maybe, fail) to solve it. For example, you say "Boolean value", but it is unclear if this is a Boolean control or a Boolean variable.
Why does it make a difference? LabVIEW (as you may have discovered) is a little different from other Programming Environments. For one thing, Time is treated as an intrinsic concept in LabVIEW. Not only are there Timing functions, there is also the Event Structure, which allows you to "take notice" when a Control changes.
You ask "How do I check within 5 seconds whether a Boolean value changed or not". One way to do this is called "Polling" -- ask over-and-over (either "as fast as you can", which tends to waste CPU cycles, or "every <time-interval>") if the value has changed. The other way is to "fire an Event" when a change occurs.
When you say "check within 5 seconds", do you mean "If it changes at 1 second, wait until 5 seconds is up and say It Changed!" or "If it changes at 1 second, immediately say It Changed!"? If the former, what if it changes twice (On, then back Off) during the 5 second interval -- do you count those two "Changes" as a "Change"?
Next time you reply, attach the VI where you've attempted to solve your own problem. We try to not do Homework for other Forum Users, neither are we trying to develop yet another set of LabVIEW Tutorials or Classes (there are plenty on the Web).
In my project i want count the boolean value has changed within 5 sec or not?
if changed I want to trigger the hardware if not i just need to continue the loop
Your two sentences don't seem to agree because they talk about two different problems.. Counting transition will tell you how many times a boolean has changed over that time interval, i.e. if gives you an integer number, but you seem only be interested if it has changed at all, i.e. only two possible outputs (changed, not changed).
Do you want to count over a specific time interval (specific start and end time) or do you want to continuously detect if the boolean has changed within the last 5 seconds?
It would probably help if you could show us your code.
I want detect continuously in past 5 sec the Boolean value changed or not?
I want to detect the boolean variable value's in particular timestamp , and if there is any change in value for particular time stamp, i want to trigger event .
Note:- This vi i have created for demo/ part model of my project,
thanks for reply and support. I am thinking about shared variable and queue to implement. please try to give me the logic
If you just want to detect a boolean change, what's the significance of the 5 seconds? Makes no sense to me. What should happen after five seconds if no change occurred? What if more than one change occurred?
Also have a look at "boolean crossing ptbypt".
Do you want to ignore all changes for five seconds after a change has been detected?
I don't understand your code. Your boolean changes 10x per second. What's the significance of the sequence frame? I also think you have wired the indicator to the wrong output of the feedback node. To detect odd/even, you don't need Q&R, a simple "AND 1" followed by "equal zero" is preferred. I don't see any time stamps.