LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Reference and Event Structure

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?

 

 

0 Kudos
Message 1 of 6
(4,806 Views)

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.

0 Kudos
Message 2 of 6
(4,800 Views)
0 Kudos
Message 3 of 6
(4,795 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(4,781 Views)

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.

0 Kudos
Message 5 of 6
(4,776 Views)

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.)

0 Kudos
Message 6 of 6
(4,769 Views)