04-28-2015 04:42 PM
My objective is to connect a numerical array with a boolean array of the same size. I would like to create a VI where I manually select any desired elements in the boolean array and call or retrieve the numbers in the corresponding numerical array to perform downstream numerical manipulation. I am approaching this problem with an Event Structure. I am starting by connecting the "control reference" with the boolean array. However, I get an error saying that the 2 terminals are of different types. Is there a way to change the control reference to the specific data type? Alternatively, can you suggest a different programming approach?
04-28-2015 04:47 PM
Post your VI so we can see what you are doing. It sounds like you are just wiring something wrong.
You probably need to search one 1D array for a value, then use that index to index out a value from the other 1D array.
04-28-2015 05:01 PM
Here's the VI
04-28-2015 06:14 PM
@tensegrityguy wrote:
I am starting by connecting the "control reference" with the boolean array.
And what would expect to happen there? You are connecting a reference of a control to a data node.
I think what you really want is the Array:Value Change event. Then you can use the Old Value and the New Value terminals. Use the Equals? on them and then for the first false value. That will tell you the indices of the boolean that was changed.
04-28-2015 06:32 PM
What terminal am I suppose to wire to the Array terminal (source, type, time or CtlRef) in the event structure? I still get get error that states that I am connecting 2 terminals of different types.
04-28-2015 06:41 PM
Here is an updated version of your file to give you the right idea as Crossrulz described.
(Spelling errors in VI corrected free of charge.)