06-18-2024 06:18 AM
Hello,
I have a conceptual question. Is it in general a good practice to use clusters to avoid a crowded block diagram with very long wires? Is there anything to be careful with? such as increased memory usage, computational time, wrong evaluations, etc.?
For example, previously I had 5 outputs of a for loop going somewhere (far!) in the block diagram, creating many long wires.
rpicazof_0-1718709191849.png
Alternatively, I thought of immediately clustering the outputs together so that everything is tidy, as here:
rpicazof_1-1718709402068.png
I would be grateful for any insights, thanks!
06-18-2024 06:26 AM
Hi rpicazof,
@rpicazof wrote:
I would be grateful for any insights, thanks!
When you would split your very large block diagram into several (logical organized) subVIs then you wouldn't have to worry about long wires!
06-18-2024 07:14 AM
Hi GerdW,
I agree subVI is the way to go, I am actually using a subVI that has 5 outputs
rpicazof_0-1718712794385.png
but even if the wires are not long too many of them are cumbersome, that is why I think my question still remains :D, but thank you for the tip
Best,
06-18-2024 08:23 AM
What I would do:
raphschru_1-1718716945012.png
In this way, your cluster array will be modified in place without unnecessary memory copy.
Also, you have the least possible wires coming in and out of your subVI and the code is scalable through the use of the cluster type definitions.
Regards,
Raphaël.
06-18-2024 10:56 AM - edited 06-18-2024 10:58 AM
Hi rpicazof,
@rpicazof wrote:
but even if the wires are not long too many of them are cumbersome, that is why I think my question still remains
Those wires are "cumbersome" because: