LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In Place Element Structure or not??

Hi!

 

I have an array of a cluster. I want to increase a field called "Counter" for each array item and thought of three ways to do it (Solution A, B, and C in the picture).

 

Is there a difference between the solutions? At what "dimension size" does this difference become important? Or is it at what interval I call this function that it becomes important?

 

Is there a forth and better way to do this?

 

Thanks in advance!

BD

0 Kudos
Message 1 of 4
(2,818 Views)
There shouldn't be any difference between these solutions. I'd stick with the simplest one. The compiler will recognize that the unbundle/increment/bundle operation should happen in-place (this is a"magic pattern" that the compiler can identify) so no need for the in-place element structure.
0 Kudos
Message 2 of 4
(2,798 Views)

If the cluster if big i'd use #1, else #3. You can easily setup a timer to see how long it takes.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,786 Views)

A 4th solution is to mix B and C and user the ordinary cluster function inside the array in place.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(2,783 Views)