03-19-2018 01:14 AM - edited 03-19-2018 01:16 AM
I would like to add to the very good suggestions already made above by others.
edit: i mentioned clusters just as a general info how to avoid "too many wires going around", they are not necessarily needed in your current project (arrays what you need here i guess only).
03-19-2018 06:02 AM
I'll be the Devil's advocate on this and say that if you absolutely want to avoid wires you can look at Action Engines (AE) and/or Functional Globals (FGV) and/or Global variables. You'll most probably run into Race conditions as mentioned earlier, but it'll be less wires on the diagram and it'll probably bite you in the butt later, but hey, it's less wires.
One cute effect is that if you bundle an AE in separate Read and Write VI's you can even have it like the black dot. You'll need one such group of 3 VI's (AE, Reader, Write) per wire though.
/Y
03-19-2018 06:14 AM
@Yamaeda wrote:
I'll be the Devil's advocate on this and say that if you absolutely want to avoid wires you can look at Action Engines (AE) and/or Functional Globals (FGV) and/or Global variables. You'll most probably run into Race conditions as mentioned earlier, but it'll be less wires on the diagram and it'll probably bite you in the butt later, but hey, it's less wires.
Now I feel I must supply a link or two...
Are Global Variables Truely Evil?
03-19-2018 06:59 AM
Good idea @crossrulz. There are way to use and abuse all functions, but as i interpreted OP, globals and similar will cause more problems than they'll solve (currently).
/Y
03-19-2018 08:53 AM - edited 03-19-2018 09:09 AM
@Blokk , Thank you very much for the link, now i really understand the importance not to use local variables everywhere! Could you please take a look at the file attached to show me how to accomplish not to use local variables that way.
Thanks again.
03-19-2018 10:53 AM - edited 03-19-2018 10:54 AM
@MaxiBarac wrote:
@Blokk , Thank you very much for the link, now i really understand the importance not to use local variables everywhere! Could you please take a look at the file attached to show me how to accomplish not to use local variables that way.
Thanks again.
You example is too simple and anything we show you will be more complicated than using a local.
But how about this? 😛
If you are worried about a "messy" block diagram think about using sub-vi's and clusters, NOT local variables or Property Nodes.