LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wiring tunnels, default data....

Pincpanter, that's a nice trick!  I'll definitely keep that in mind!
 
Centerbolt, what are the advantages / disadvantages of using a functional global?  Coming from a programming background, I tend to not use globals by habit, but perhaps in Labview they lend themselves to certian applications?
0 Kudos
Message 11 of 19
(1,346 Views)


@centerbolt wrote:
In this case why not use a functional global instead of the shift register?

Sorry, I don't understand you comment in the context of this thread. Which post are you referring to?
0 Kudos
Message 12 of 19
(1,343 Views)
I generally use a cluster to pass data like this.  In this way, if I need to add or remove data going to cases, it is as simple as adding or deleting from the cluster.  and then bundle and unbundle the specific variables I need in the cases I need them.  Voila, only one wire ever transcends every case.  As for functional globals.  it may be an easy implementation, but my thought on that is globals (however you implement them) are just that, and meant to be used when data needs to be set or read outside of one VI and not used as a local implementation.  But heck, if it works for you.. do as you see fit.

If you are using LabVIEW 8.5 on windows, feel free to download my queued message handler template from my samples, it shows this cluster implementation in action.
Good Luck,
Paul

Paul
0 Kudos
Message 13 of 19
(1,331 Views)

I would also go with Lynn's suggestion of placing all your wires into a typedef cluster which you pass through the SR. That's what I usually do, but that isn't really that practical for small loops where you're doing a simple thing. Then again, for small simple loops you usually have many cases.

Paolo, nice trick.


___________________
Try to take over the world!
Message 14 of 19
(1,322 Views)

@ altenbach

Instead of using the shift register in the original post, the contents of which are only used in one of the cases and require all the extra wiring we all hate to do, why not store the data using a functional global?  This gets rid of a lot of clutter on the block diagram.

0 Kudos
Message 15 of 19
(1,316 Views)

@smercurio_fc wrote:
As tst mentioned, the Tunnel Wiring Wizard can be very handy in these cases. There's a thread on this here.


Here's the original thread on the Tunnel Wiring Wizard back in 2004. The 8.0 version is here.

You can make more of your own scripting tools like this by poking around the VI Scripting Forums here.



Michael Aivaliotis
VI Shots LLC
Message 16 of 19
(1,262 Views)
Did I miss something?  If data is changed only in one of n cases LV offers the feedback node !
 
Or is the use of the feedback node a NONO?
 
However, since in most of my cases I already have (at least) one cluster running through, I seldom use the feedback node.

 
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 17 of 19
(1,259 Views)


@Henrik Volkers wrote:
Did I miss something?  If data is changed only in one of n cases LV offers the feedback node !

At least in 7.x feedback nodes can not be inside structures. They have to be in the loop itself.

8.5 now gives the options of having a feedback node without any loop.

The main reason I rarely use FNs is that they are harder to understand than SRs. A minor reason is that they have some performance issues.


___________________
Try to take over the world!
Message 18 of 19
(1,252 Views)
some time ago i had the same question: why keep only default values, and not having option for "last value registered".
at the time Jhoskins said it would be hell to debug.
i guess he is right. although, that would make my codes so much nicer Smiley Happy
cant find the thread anymore...
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 19 of 19
(1,242 Views)