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

Hi Rcano,

 

your latest VI does NOT look like my snippet. Using the feedback node inside the FOR loop (which is not needed anyway) will change the behaviour of the VI tremendously!

 

Don't blaim others when you don't understand what's going on in your VI!

THINK DATAFLOW!

 

Edit:

You can edit your own posts (within a timeframe of some minutes). No need to create 3 posts within 3min!

Best regards,
GerdW


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

Rcano_1982 wrote:

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


Why the FOR loop?  All of those functions in the snippet work on arrays.  GerdW's snippet was done with arrays.  So I don't see why you are stuck on this FOR loop.



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 22 of 39
(1,584 Views)

To add to the discussion:

Why do you alter working code at all?

 

But if you do so:

Why do you worsen runtime performance by removing better code with worse code?

Why do you change the feedback node direction and mess the functionality by this?

Why do you change a decent, readable wiring to some extended, partly hidden wiring making the VI harder to read?

 

Sorry, don't want to be harsh on you, but it seems to me that you should still learn some basics in LV. Have you gone through the LV in 3(6) hours tutorial yet?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 23 of 39
(1,581 Views)

 

Norbert, Why do not you mind your own business?

0 Kudos
Message 24 of 39
(1,577 Views)

Crossruiz.

 

This comparison is a just an estate of larger estate machine.

 

The data stored in "data array" is refreshed every time the state is executed.

 

So in every iteration I need to keep registering what readings match the expected readings stored in "array comp"basically that is why, unless my understanding of LV is totally wrong, I need to run a "for loop" 

 

Anyway thanks for your time

 

0 Kudos
Message 25 of 39
(1,568 Views)

When three users with a lot of more experience than you (judging by post count) tell you the same it seems your understand of LabVIEW is wrong…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 26 of 39
(1,563 Views)
Rudeness does not get your questions answered. Norbert made a very legitimate comment. A recommendation to take the basic tutorials should accompany poor coding.
Message 27 of 39
(1,562 Views)

@Rcano_1982 wrote:

Crossruiz.

 

This comparison is a just an estate of larger estate machine.

 

The data stored in "data array" is refreshed every time the state is executed.

 

So in every iteration I need to keep registering what readings match the expected readings stored in "array comp"basically that is why, unless my understanding of LV is totally wrong, I need to run a "for loop" 

 

Anyway thanks for your time

 


You are storing a data ARRAY.  Then you are checking that this array matches what you expect.  This checking does not need to be in a FOR loop since we can just operate on the arrays directly.  You just put this code in your state machine as is.



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 28 of 39
(1,554 Views)

Just wanted to jump back in as i didn't post any link in my previous post, which is not too helpful.

LabVIEW in 3 hours

 

Yes, i know that my post was not very polite, and for that i ask for pardon. But you have to understand that this IS a very basic question and you obviously don't understand the code Gerd provided to you completely free of charge.

So obviously youhave a gap between "what you want to do" vs. "what you can do with your current knowledge". The only option to solve this situation is: expand your knowledge.

 

I don't want to make any assumptions here, but i dare to say that if you keep on replying like you did to my post, you won't get too much help from any experienced user on this forum. We are a very helpful bunch of people, but we have our pride, and insults will not be taken easily.

That being said, you made an assumption which is very doubtful: Why the hack do you assume that it isn't my business to do exactly what i did? That is: answering questions for support....

 

Norbert

 

PS: Thanks Gerd and Dennis for backing me up 🙂

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 29 of 39
(1,544 Views)

Well my apologies for that comment.  I have been polite on every single of my 30 comments in the forum.

 

I think you are bringing this issue too far.

 

I take your advise aboard and will double check the principles of handling arrays and then again will check my attempts of using this code in my design.

 

Thanks again for your time

 

Regards

 

 

0 Kudos
Message 30 of 39
(1,533 Views)