LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
nagokul

Time to go WIRELESS...

Say I have some inputs/outputs that are shared between a function block in the start of code block and a function block that is 15 code blocks away in the LV Code.. And there are multiple such sharings occuring, without an involvement of a tunnel.. Now there are wires everywhere..  Either we cluster them into one single line (which becomes uneasy sometimes) or some use local variables (when shared and updated at multiple locations it becomes dangerous).. 

Current method.png

Instead, if we can go wireless.. 

Correction.png


Like a transmitter at the source and single or multiple recievers at the required spots.. 

transrecieve.png

When there is a tunnel to be placed.. 

tunnel.png

The appearance and the presentability of this method can be made much better.. (like tiny dots or something similar to bundly by name but not these ugly circles.. ) Just wanted to convey the idea.. This can remove wires flowing unnecessarily and would make the code more readable and easy to modify.. 


9 Comments
tst
Knight of NI Knight of NI
Knight of NI

This has already been suggested - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-breaking-up-long-wires-with-labels-in-each-end/i...

 

I did vote for it there and I still think it would be nice if NI looked into it, but I will say that you shouldn't have code where you have 15 "code blocks", whatever that is. If your code is that large you should restructure it so that it has subVIs and a proper architecture.


___________________
Try to take over the world!
nagokul
NI Employee (retired)

Thanks.. My fault.. didn't search for it before posting it.. 

15 code block was just a point of exaggeration..

AristosQueue (NI)
NI Employee (retired)

"Create SubVI From Selection": Allows you to create abbreviations between blocks of code.

X.
Trusted Enthusiast
Trusted Enthusiast

You may want to read this thread (and the negative comments from NI)...

TylerDurden
Member

Hi,

 

If I understand that correctly this means to implement a goto statement? In my opinion that would be just another way to break up the dataflow, which only minimizes the readability of the code.

 

Or do you mean a region statement like in C#.

 

#region ABC

Hide this (show only if you collapse)

#endregion

Certified LabVIEW Architect
tst
Knight of NI Knight of NI
Knight of NI

This isn't goto, nor is it like the region directive. This doesn't hide code, but only parts of wires. Think of it as digging a tunnel under the diagram and passing the wires through that tunnel. It's completely data flow safe and doesn't require any actual change to the code. It's only a display issue.


___________________
Try to take over the world!
nagokul
NI Employee (retired)

Hi X, 

That is something that I thought initially but the bundling of those wires could simply be done with Cluster.. And the wireless part as Tst mentioned is simply digging a underground tunnel.. 


And Hi Tyler,

What you mentioned

"

Or do you mean a region statement like in C#.

 

#region ABC

Hide this (show only if you collapse)

#endregion

"


was another idea which I wanted to post.. Instead of crearting subvi's from selection which are not being used anywhere else, if we simply have an option to fold the code and expand whenever needed, it will be much better.. And the code will open in the same window unlike in the case of subvi where it is opened in a seperate window and becomes pretty difficult for quick read through the code.. 

But Since you have mentioned already, I cannot post this.. Please feel free to point out if you have any glicht that you see in this approach.. (Except that its a hell of a difficult implementation for the people who develop LabVIEW to make it rewire and place the diagram components pretty while we expand and fold.. ) 

tst
Knight of NI Knight of NI
Knight of NI

Hiding code (effectively like the region directive) has been suggested before - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Macro-in-LabVIEW/idi-p/1095676

 

There are also discussions about it here:

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Collapsible-code/idi-p/1209625

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-Hide-Unhide-of-code-inside-Block-Diagram-without...


___________________
Try to take over the world!
JordanG
NI Employee (retired)