LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Row and Column detection of a 2D boolean array

I use an array as showed by my example (LB8.2).

Press a 1 or 0 in the array changes it's value and it gives

back the Row and Column (that was changed).

I use this to program a 22 channel patterngenerator (GPIB).

It sends only the column (channel of patterngenerator) patterns, so that makes it faster.

Has someone an idea if this row and column detection can be made simpler (faster)?

Kind regards, Bernard

0 Kudos
Message 1 of 5
(2,389 Views)

You could do something like that:

MyRowColDetection_BD.png

The check >0 and the select functions are not even required since this code sits in a value change event, so one element did change (normally, there are a few exceptions though).

 

 

0 Kudos
Message 2 of 5
(2,377 Views)

Here is a different way

 

MyRowColDetection Rev TLE_BD.png

Tim
GHSP
0 Kudos
Message 3 of 5
(2,373 Views)

This one works only when the array value goes from 0 to 1, but doesn't work when the value goes from 1 to 0. 

Kind regards, Bernard

0 Kudos
Message 4 of 5
(2,357 Views)

My excuse it works correctly!

 

I forgot that change the same position inn the array (0 to1  or 1 to 0) gives the same results.

Thanks, Bernard

0 Kudos
Message 5 of 5
(2,355 Views)