LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment values in array by comparing with an another array

Solved!
Go to solution

Please find attached

 

Thanks again

0 Kudos
Message 11 of 39
(1,425 Views)

@Rcano_1982 wrote:

Hi Gerdw

 

thanks for your reply.

 

I am not able to do what I want with your example. Please see attached my attempt. I do not find a way to store the final count incremented 1 by 1 as per every iteration.

The way to handle arrays in Labview, even the simplest operations really do not get into my brain these days

 

Any advise?

 

Thanks a lot


That is nowhere close to GerdW's example.  Look closely at his last example as it is as simple as it will get.


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 12 of 39
(1,422 Views)

Hi Rcano,

 

why don't you try my snippets?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 39
(1,416 Views)

Hi GerdW,

 

Please see attached.

 

Your snippet does not do what I am trying to do.

 

Maybe I didnt make myself clear, the result of the comparation must increment(a unit/iteration) only that specific element that matches the value in both Data Array and DataComp.

 

 

0 Kudos
Message 14 of 39
(1,408 Views)

Hi Rcano,

 

my snippet does exactly that!


Edit:

Your VI still doesn't look like my snippet.

And it may help to initialize the feedback node. That node is just to show how to store the data. You could use a shift register in your data analysis loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 39
(1,404 Views)

Could you check I am using you snippet correctly please?

 

Please find attached.

 

Thanks

0 Kudos
Message 16 of 39
(1,409 Views)

That looks correct.


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 17 of 39
(1,404 Views)

Right,

 

So do you mean that if put it into a for loop and substitute the feedback node for a shift register, it should work?

 

No it does not! unless I am missing something else about how to integrate your snippet into my

 

I have tried with the shift register and it does the same

 

 

 

 

0 Kudos
Message 18 of 39
(1,394 Views)

undefined

0 Kudos
Message 19 of 39
(1,393 Views)

The screenshot above is how the array looks like after the first iteration.

 

When it should be (0,0,1,1,0,0)

 

Am I missing anything?

0 Kudos
Message 20 of 39
(1,388 Views)