07-01-2011 12:04 PM
HI;
In the attached VI, I'd like to continuously monitor the the 8 switches (1D 8-bit Boolean array) for any changes in value and which switch changes.
I'd also like to clear the switches on Stop.
Any suggestions?
Thank you.
4BoysDad
Solved! Go to Solution.
07-01-2011 01:55 PM
try this, for example.
07-01-2011 02:10 PM
Could you please explain how to create that VI invoke node?
And why you choose invoke node instead of property node?
Thank you
07-01-2011 02:40 PM
This will do it for all controls and indicators on the front panel in one step. Seems easier. :D.
07-01-2011 02:44 PM
Of course you can further simplify your code dramatically if you would use an array of switches on the front panel instead of 8 seperate switches. Make the array size 8, all false, and make this the default.
07-02-2011 09:02 AM
Thank you altenbach. Have a nice holiday!
07-05-2011 07:40 AM
Thank you for the suggestions.
How might one capture which of the switches changed value and the associated value? I think I could use a switch that holfd its True (selected) value only so long as the switch is held. I would need this switch type to get back to the feault state automatically. What do you think?
4BoysDad
07-05-2011 09:05 AM
@4BoysDad wrote:
How might one capture which of the switches changed value and the associated value?
I don't understand what you mean by the rest of your comment, but to find the changed boolean, simply do a "not equal" comparison in "compare elements" mode and search for TRUE. If the result is not negative, use "index array" to find the new value.
Here is a simple example.
07-05-2011 09:09 AM
Thank you.
What if I had a refnum to the 1D 8 bit boolean array?
I assume I would use a similar technique if not the same technique.
4BoysDad
07-05-2011 09:11 AM