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: 

I want to simplify this block diagram. help me.

I am a beginner of labview user.

As you see, this diagram has repetitive blocks.

And these blocks are in loop.

 

That leftside vertical pink line is cluster array and index array block is next to clsuter array line.

Each of index array block has two input values(array and index value) and one output value(single cluster line).

And each of ouputs is connected to each of unbundle blocks and case structures.

 

In this case, I want to simplify this block diagram and it has to excute simultaneously.

 

Regards.

0 Kudos
Message 1 of 5
(3,007 Views)

Oh, I made a mistake. I forgot to upload my photo.

0 Kudos
Message 2 of 5
(3,006 Views)

I can't read chinese so I can't tell what your local variables say.  Are they all the same or are they different controls?

 

You can use a subVI to encapsulate common code.

 

You don't need a dozen Index Array Functions to index different elements out of the same array.  You can use one and have multiple outputs by stretching the bottom border downwards.

 

Are you working on every element within that original array?  You can put your code in a For Loop and autoindex on that array at the For Loop border.

 

What are in the other cases of all those case structures?

0 Kudos
Message 3 of 5
(2,990 Views)

From the looks of it, all case structures are the same, right? Make that a sub-vi together with the index array and unbundle. Then you can use 1 for loop with the index settings (which might be redundant if you're looping through all of the array and use autoindex). The result will be an array out, which you can expand an Index array and get the data to write to all indicators directly.

/Y

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

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

If I am reading your block diagram correctly this should work. Of course you would have to change the indicatior to your variable output. I don't know why you need to use more than two elements of the clusters, but if you don't you can further reduce the diagram by simply clicking on the 2nd box of the unbundle and changing it to the array in the cluster. You can then delete the last two elements of the unbundle.

 

 

 

simplified.jpg

0 Kudos
Message 5 of 5
(2,914 Views)