LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search array of refnums?

Hi there!
I'm trying to setup something like a value change event of a group of boolean controls, which I can't group into an array or cluster (since they're scattered all over the front panel). During my research I found an example similar to shoneill's post at http://forums.ni.com/ni/board/message?board.id=170&message.id=171993&query.id=77617#M171993 (sorry, can't find it again) which went along the lines of:
*put everything in a cluster
*every timeout of my event structure I check if the array equals the one I got from the shift register
*set up a case structure, which - if abovementioned comparison yields FALSE - figures out which of the controls in the cluster got changed (via convert cluster to array - search 1D array) and react accordingly.

Now the thing is: I have to set this up using an array of refnums. If one of the booleans referenced from within the array is TRUE, some action is to be taken. Attached is a non-working example; obviously the Search 1D array expects to be fed an array of booleans, not of refnums.

Your help is greatly appreciated!

Kind regards,
Severin
0 Kudos
Message 1 of 3
(2,657 Views)
well, I've com up with a way, which is pretty straight-forward (I guess), but looks imho rather clumsy/bulky on the block diagram. I just put in a Value Property node like shown in the example. Still I'm open for more elegant suggestions.

Message Edited by severin on 06-27-2006 04:00 PM

0 Kudos
Message 2 of 3
(2,651 Views)
I don't understand your statement that you can't group the Booleans into an array or cluster. If you can't do it on the front panel, you can certainly do it on the block diagram. I've attached one example that shows how it's done. The way you have it now, the comparison between the reference array is always equal because you are never changing the number of references or which control references are in the array. Instead of the search array fix that I posted, instead you can have a value change event for all three controls and if all you want to know is if one or more are true, just or them together. That's the second example.
Download All
0 Kudos
Message 3 of 3
(2,645 Views)