From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster order


@cbutcher wrote:

In the picture posted above, one simple example you could use to claer up extra nodes is visible - you multiply 8 different values (which are consecutive elements of an array) by the same scalar value - you can instead multiply the array by this value and then index after.

 

Following that point, you wire consecutive values to Index Array. You don't need to wire numeric constants when the values are 0..N - just drag the Index node and consecutive values will begin from 0. If you wire the first element, you get consecutive elements from that value, like here:

Example_VI.png


Even better, use the Array Subset and you'll use 1 function instead of an expanded Index array and build array.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 14
(555 Views)

Hi,

 

seeing those dark-blue wires in the snippet image I STRONGLY recommend NOT to mix/join different signals into DDT wires - especially not that amount of signals…

 

I also prefer to convert boolean arrays to numbers and store just one number instead of 16/32 boolean values. Caveat: your analysis toll has to support those "packed" boolean data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 14
(549 Views)

@Yamaeda wrote:

@cbutcher wrote:

In the picture posted above, one simple example you could use to claer up extra nodes is visible - you multiply 8 different values (which are consecutive elements of an array) by the same scalar value - you can instead multiply the array by this value and then index after.

 

Following that point, you wire consecutive values to Index Array. You don't need to wire numeric constants when the values are 0..N - just drag the Index node and consecutive values will begin from 0. If you wire the first element, you get consecutive elements from that value, like here:

Example_VI.png


Even better, use the Array Subset and you'll use 1 function instead of an expanded Index array and build array.

/Y


I just used Build Array to create an array output so that we could use 2 instead of 12 indicators or so. The OP wants individual values (hence the Index Array).

 

Edit: That being said, in at least a few places a pair of values are indexed off, then rebuilt into a Merge Signals to DDT, then split with a Split Signals, then bundled... Might be simpler to avoid at least a few operations here.


GCentral
0 Kudos
Message 13 of 14
(545 Views)

Some further comments (maybe you already found these):

  • The sequence structures don't do anything (much). The only affect is to make the Start Data Acquisition visible before the loop. Just wire the error out from the property node to the side of the While loop, then ignore it.
  • Your Event Structure (in the lower left - I didn't  find it at first) is indexing the Item Names field, but then does nothing with this. Perhaps this is because you sent a simplified version of code, but if not, you can throw away almost all of it. Indeed, if the loop iterates quickly, just remove the Event Structure and place the Value Change code in the While loop (where it is now).

For anyone who wants to play with Dynamic Data Wire simplification, here's a version with a bit less white-space and fewer Index Array nodes (saved to 2016)

 


GCentral
0 Kudos
Message 14 of 14
(532 Views)