Discussions au sujet de NI LabVIEW

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Condition avec tableau 2D

Résolu !
Accéder à la solution
Highlighted

It is very difficult looking at truncated images, but there are many very questionable code constructs, for example your build array and matrix operations that make no sense whatsoever. It is also very ambiguous if you show array diagram constants where we cannot tell how big the arrays really are (containers size is not the same as array size!). "Delete from array" is not the correct operation to take an "array subset" (hint)..

 

Yes, "AND array elements" will give you a TRUE only if  all elements are true, while "OR array elements" will give you a TRUE if at least one element is true. Basic stuff.

 

I still don't understand why you are wasting 8x memory by using DBL to represent U8 values. 

 

So you have a while loop that reads "frames" as 1D array. Each frame is fixed size. So why are you only keeping the last frame when you leave the loop? Does each iteration return redundant elements, just with a little more data? How much new data is added with each iteration?

 


@Michel_Dupuy wrote:

 

Am I right if I compare only the last row by this way to stop the while loop:

image.png


If you do "Not equal", you need to do "OR array elements" because you want to stop if at least one element is non-zero. If you do AND, it will only stop if ALL are non-zero.

 

 


@Michel_Dupuy wrote:

 

image.png


Please don not wire N when autoindexing. The number of iterations is determined by the number of rows in the 2D array.

 

Can you attach your code and some typical data? As mentioned, there is still a lot of very questionable code.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Compliments
Message 11 sur 13
80 Visites
Highlighted

@Michel_Dupuy wrote:

 

  • Each frame corresponds to a row; so, 1 row is replaced on each iteration.

Since you know the number of iterations before the loop even starts, use a FOR loop (With an stop terminal for the stop button). No need to inspect the data. After the loop, one all data is valid, search for the pattern once.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Compliments
Message 12 sur 13
78 Visites
Highlighted

@Michel_Dupuy wrote:

I'll will probably devide the two tasks on two subVIs. Here are the extracts of how I am trying to implement the codse (not comfortable with array handling), there are probably more than one correction on those extracts:

 


Not sure why you reshape to 128 columns if there are only 12. And if it is U8, that's the first thing you should covert it to.

 

Here's what I meant about the matrix thing. In LabVIEW, a Matrix is a special datatype for linear algebra. You are dealing with plain 2D arrays.

 

altenbach_0-1599940139974.png

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Compliments
Message 13 sur 13
65 Visites