From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VIM Label Setting on Indicator In Cluster

Solved!
Go to solution

I'll ask my question first, then say why I need it, and then someone hopefully tell me I'm crazy.

 

So I have a VIM and I want to use it to set the data type that another developer wants for some thing that will be used down the line.  Think like the Obtain Queue where you define the data type, then the Dequeue knows the data type from wire of the obtain.  The data type created will be a cluster which contains Maps and a couple of other things.  I sorta need to reference these cluster elements by name, but this VIM defaults to the names, of the functions that created them.  How can I have the data type of the cluster be dynamically set by the VIM, but have the label of the element in the cluster be a constant?

Initialize Map Cluster Label Issue.png

 

Okay so now the reason.  I need to reference these cluster elements and the best way is probably by using the normal Unbundle and Bundle functions.  I'd prefer using the Unbundle and Bundle by name.  I thought I could live with the normal Bundle/Unbundle, but I actually need to use the In Place structure to access the cluster, since the compiler isn't smart enough to realize I'm using the same cluster, and performance tanks with large amounts of data.  About 100 times slower then if I use the IPE structure.  I could reference "map" in my other VIMs, but it no longer is self documenting on what "map" is what and the purpose of the data.  Thanks.

0 Kudos
Message 1 of 6
(1,016 Views)

I don't know if there is a solution. I had a similar issue, see

 

https://forums.ni.com/t5/LabVIEW/Different-Results-VIM-and-subVI/td-p/4056636?profile.language=en

 

Names are not propagated in VIMs it appears, by choice.

 

mcduff

0 Kudos
Message 2 of 6
(991 Views)

You can use my relabelling Xnode.

"If you weren't supposed to push it, it wouldn't be a button."
Message 3 of 6
(957 Views)

Here's a simplified version using my "Relabel and Default Value.xnode" and setting the output to be the default value.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 6
(950 Views)
Solution
Accepted by Hooovahh

If you've seen my Malleable Buffer experiment, I use a "Name the Buffer.vim" to fix a name for my buffer.  This VIM just passes one input to one output (naming the output).  This would let you name your map "Value Map".

Message 5 of 6
(946 Views)

Wow those are some amazing suggestions thanks guys.  I tend to go with a VIM over an XNode if both can do what I want and in this case a simple VIM of input and output does the job.  

 

However that XNode is cool and I would also give it the solution except for one issue.  I can't have the XNode in a file that is inlined, and the file I want to use it in is a VIM, which needs to be inlined.  Sorry Paul runner up for you.

0 Kudos
Message 6 of 6
(878 Views)