Jump to content

Naming unnamed wires?


Recommended Posts

Is there a way to create names for unnamed wires before they are bundled so Unbundle By Name can be used? I have 7 image wires coming out of a subVI, and I am wanting to modify the subVI to output only a cluster of the images so it can be passed around the main app easier. I experimented by bundling the outputs (outside the subVI). Unbundling that cluster by name works (the wires are named the same as the outputs of the subVI). So I tried bundling those same wires within the subVI, passing the cluster out, and then unbundled by name outside the subVI. The wires are all named "New Image" because (I'm assuming) that's the name that the "IMAQ Create" VI outputs are inside the subVI. I suppose I could nest my subVI inside another which only bundles the image outputs of the first subVI. If I can't figure out another way of doing it, that's what I'll do. Isn't there a better way?

Thanks,

Brad

Link to comment
Is there a way to create names for unnamed wires before they are bundled so Unbundle By Name can be used? I have 7 image wires coming out of a subVI, and I am wanting to modify the subVI to output only a cluster of the images so it can be passed around the main app easier. I experimented by bundling the outputs (outside the subVI). Unbundling that cluster by name works (the wires are named the same as the outputs of the subVI). So I tried bundling those same wires within the subVI, passing the cluster out, and then unbundled by name outside the subVI. The wires are all named "New Image" because (I'm assuming) that's the name that the "IMAQ Create" VI outputs are inside the subVI. I suppose I could nest my subVI inside another which only bundles the image outputs of the first subVI. If I can't figure out another way of doing it, that's what I'll do. Isn't there a better way?

Thanks,

Brad

Hi Brad,

Yes there is a way to do that. You can use the variant to data primitive. See attached image and example.

post-121-1156830182.png?width=400

PJM

Download File:post-121-1156830220.vi

Link to comment
I'm not sure I understand, but are you just looking for some way to name elements in a cluster so they can be unbundled by name? If so, try "Bundle by name" with an input cluster that defines the names:

post-181-1156854027.png?width=400

Seeing that Y'all have posted every possible correct answer to this Q, let me share what I thought the Q was by the title.

The thought occured to me that that it could be much easier to indentify wires and tunnels (for the purpose of scripting) if I could apply a label to them.

"On the surface" it would just look like improved documentation. But under the hood I'd like to be able to do an invoke node wire named tunnel to ...

It would also be nice to be able label the outputs of nodes with proper names that would be displayed when we use help and the wiring tool while over the wire.

Just a thought,

Ben

Link to comment
Seeing that Y'all have posted every possible correct answer to this Q, let me share what I thought the Q was by the title.

The thought occured to me that that it could be much easier to indentify wires and tunnels (for the purpose of scripting) if I could apply a label to them.

"On the surface" it would just look like improved documentation. But under the hood I'd like to be able to do an invoke node wire named tunnel to ...

It would also be nice to be able label the outputs of nodes with proper names that would be displayed when we use help and the wiring tool while over the wire.

Just a thought,

Ben

Maybe you could convert your data to a variant and add the "name" as an attribute?

Link to comment
It would also be nice to be able label the outputs of nodes with proper names that would be displayed when we use help and the wiring tool while over the wire.

Are you talking about your custom made VIs or the ones that come with LabVIEW? If you're talking about your own VIs, the help uses the indicator label's name...

Link to comment
Are you talking about your custom made VIs or the ones that come with LabVIEW? If you're talking about your own VIs, the help uses the indicator label's name...

Yes the behaviour of the wires coming from my sub-VI's do that but I'd like to do it for the native LV operators.

It would make creating sub-VI's easier as well becuase if we labeled the wires BEFORE the sub-VI was created, LV would label all of our controls and indicators automatically.

Ben

Maybe you could convert your data to a variant and add the "name" as an attribute?

If I really wanted to get the name to show when floating that woudl work.

BUT my thought was to provide a mechanism to improve the documentation of the diagram w/o making it more complicated.

I can hear them asking already, "BEN, why did you convert to variant?".

What I am thinking is to take the recomended free text we use to lable shift registers and wires, and actually associate the two.

Ben

Link to comment
I can hear them asking already, "BEN, why did you convert to variant?".

I'm sure you'll be able to make something up intelligent-sounding :D

What I am thinking is to take the recomended free text we use to lable shift registers and wires, and actually associate the two.

Other than dabbling in scripting, I don't think this can be done... I was hoping that grouping can be used as a work-around, but wires can't be grouped to other objects...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.