LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set concatenated String name

Solved!
Go to solution

I have concatenated two strings.  Is there an easy was to set the name of the concatenated string?

0 Kudos
Message 1 of 11
(2,918 Views)

Hi Sean,

 

after concatenation you just get a wire: right-click the wire -> visible items -> label…

(Once you create an indicator you can set its label as needed.)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(2,913 Views)

Thanks Gerdw,

 

If the below is what you mean, I tried it before posting but it didn't work.

 

string.png

In the output cluster indicator, the concatenated string doesn't have a label.  Am I doing it wrong? 

0 Kudos
Message 3 of 11
(2,867 Views)

Hi Sean,

 

In the output cluster indicator, the concatenated string doesn't have a label.  Am I doing it wrong? 

Yes.

When you want defined labels in this cluster you should/need to define a typedefinition for that cluster. Then wire an instance of that type definition to the middle connector of Bundle - or use BundleByName instead…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(2,851 Views)

If you want to go with the unnamed bundle you'll need to Type Cast the string to a string with a label in order for it to have a name.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 11
(2,845 Views)
Solution
Accepted by topic author SeanJ

Cluster element names.png

 

Of course if the goal is to label the elements of an indicator, you can also edit the names in the indicator. If the indicator is an output of a VI, the callers of that VI will see the names given in the indicator.

Message 6 of 11
(2,832 Views)

Thanks All,

 

Type cast, is probably the best solution for me in this instance!

 

Rgds,

Seán

0 Kudos
Message 7 of 11
(2,804 Views)

wiebe@CARYA wrote:

Cluster element names.png


For LabVIEW 2018 and later, Coerce to Type is safer than Type Cast for naming wires in general. (It actually existed in earlier versions of LabVIEW too, but it wasn't officially supported before)

Certified LabVIEW Developer
Message 8 of 11
(2,767 Views)

I'd probably cluster them as before, and change the labels in the indicator.

 

And remember, NXG doesn't have wire names anymore. So the type cast or alternatives won't do anything useful... You might want to shy away from depending on wire names, to get used to it. It won't be added later, it's been removed from the G language for ever.

Message 9 of 11
(2,751 Views)

wiebe@CARYA wrote:

I'd probably cluster them as before, and change the labels in the indicator.

 

And remember, NXG doesn't have wire names anymore. So the type cast or alternatives won't do anything useful... You might want to shy away from depending on wire names, to get used to it. It won't be added later, it's been removed from the G language for ever.


Really? I find wire names to be quite helpful, especially if the diagram is somewhat big or cluttered. It'd be a bummer.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 11
(2,742 Views)