02-15-2023 01:49 PM - edited 02-15-2023 01:53 PM
I have a cluster with good names as I'm expecting and bad names, I don't know how they came from. For the bad ones, I was expecting them to be "Log.11.label .... Log.20.label"
What did I do wrong to "Log. 1 2. label..." . I'm struggling with fixing them. (I have attached my VI)
Solved! Go to Solution.
02-15-2023 01:53 PM
Unless you attach your cluster, we cannot tell what you are doing wrong. Maybe there are hidden elements?
What does the context help say if you hover over the cluster wire?
02-15-2023 01:54 PM
Hi Mr.altenbach,
I just attached it.
02-15-2023 01:58 PM
@GRCK5000 wrote:
I have a cluster with good names as I'm expecting and bad names, I don't know how they came from. For the bad ones, I was expecting them to be "Log.11.label .... Log.20.label"
What did I do wrong to "Log. 1 2. label..." . I'm struggling with fixing them.
Unfortunately that is PEBCAK. It looks very much like you copied some controls and did not rename them from their default copy names. LabVIEW will always add an incremental number after the label. SO let's say you have a control named "A". If you copy it, the name of the copy will be "A 1". If you select both and copy/paste, you get "A 2" and "A 3".
And always remember that everything that appears in the cluster bundle/unbundle by name is in the actual cluster. EVERYTHING.
02-15-2023 02:03 PM
H Billko,
Yes, I was copying controls to save me some time. Is there any way this can be fixed without having to manually create controls one by one?
02-15-2023 02:05 PM
02-15-2023 02:06 PM
Hi GRCK,
@GRCK5000 wrote:
Is there any way this can be fixed without having to manually create controls one by one?
You just need to rename them as needed.
How else do you define a datastructure/typedef in any programming language? You need to define the labels for each element of the structure/cluster…
02-15-2023 02:45 PM
The quickest fix is to delete it all and start over. LabVIEW auto-incrementing labels is a great convenience, but you have to understand how it works.
Create a control inside a cluster and give it a name with any text, a space and any number. When you copy and paste the control, the text and the space are carried forward and the number increments. Copy any number of controls, and the numbers all increment perfectly. It does not even mater which one you copy.
Your labels are missing the text and the space before the number that make it work.
02-15-2023 07:15 PM
Actually the quickest way is what Mr. Altenbach said. I did what he said "disconnect the cluster from type def" then change the names. Problem is fixed now.