キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

comparing 2d array of string with constant

I have a VI which is using activex to read from a spreadsheet. I have am reading a 1 column by 13 row array from the spreadsheet, the data of which is either TRUE or FALSE for any of the elements.

 

I then want to compare each of the elements to see if they are = to a constant of TRUE to set 1 or more of 13 boolean indicators on my front panel

 

Can this be done and if so how?

 

Thanks in advance

0 件の賞賛
メッセージ1/7
3,538件の閲覧回数

@n_wint wrote:

I have a VI which is using activex to read from a spreadsheet. I have am reading a 1 column by 13 row array from the spreadsheet, the data of which is either TRUE or FALSE for any of the elements.

 

I then want to compare each of the elements to see if they are = to a constant of TRUE to set 1 or more of 13 boolean indicators on my front panel

 

Can this be done and if so how?

 

Thanks in advance


Definitely.

 

You need a 1D boolean array.

 

Please post a VI of your attempt.

0 件の賞賛
メッセージ2/7
3,536件の閲覧回数

Here is a hint... Assuming you are storing the spreadsheet you read in a string array

 

True.PNGt3.PNG

========================
=== Engineer Ambiguously ===
========================
0 件の賞賛
メッセージ3/7
3,528件の閲覧回数

Oh by the way,  1x13 is a 1d array. スマイリー ウインク

========================
=== Engineer Ambiguously ===
========================
0 件の賞賛
メッセージ4/7
3,489件の閲覧回数

@RTSLVU wrote:

Oh by the way,  1x13 is a 1d array. スマイリー ウインク


Not really, since we have two dimensions (1 & 13). In order to make the first column of a 2D array a 1D array, we need to use index array with a zero wired to the lower index.

0 件の賞賛
メッセージ5/7
3,484件の閲覧回数

@altenbach wrote:

@RTSLVU wrote:

Oh by the way,  1x13 is a 1d array. スマイリー ウインク


Not really, since we have two dimensions (1 & 13). In order to make the first column of a 2D array a 1D array, we need to use index array with a zero wired to the lower index.


Oh, yeah I guess you are right. If the OP is using "Read From Spreadsheet File" vi then it does output a 2d array except for the "first row" output.

========================
=== Engineer Ambiguously ===
========================
0 件の賞賛
メッセージ6/7
3,482件の閲覧回数

Yes, he could set "transpose?" to TRUE and use the first row output, which would give te first column instead. 😉

0 件の賞賛
メッセージ7/7
3,474件の閲覧回数