LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

This cluster looks like an error cluster, but it's not

Solved!
Go to solution

Created a new cluster containing a pass/fail boolean, an integer for "counts", and a short calibration string.  Saved this into a typedef'd cluster, dropped it on my block diagram, and it shows up as the mustard-colored error cluster! Smiley Frustrated

 

Any way to make this not look like an error cluster on the block diagram?

 

Adding another object in the typedef and making it invisible is kind of an ugly hack, but it does turn the object string-pink.

0 Kudos
Message 1 of 8
(2,716 Views)
Solution
Accepted by topic author SnowMule

Reorder the elements.

Right click on the cluster in the type def, select "Reorder Controls in Cluster", and click on the elements in a any order other than, bool, int, string.

Message 2 of 8
(2,709 Views)

Making your counts U32 instead of I32 might work.

Message 3 of 8
(2,695 Views)

If a cluster has three elements, and those element data types are (in order) boolean, I32, and string, then it will get drawn like an error cluster.  Change anything about the cluster to *not* fit those criteria and it will go back to being drawn like a regular cluster.

 

Funny thing about it being specific to data type is that if your cluster has a boolean, an I32, and a tree control, it will get drawn like an error cluster.  😉

 

error_with_tree.png

Message 4 of 8
(2,689 Views)

@Darren wrote:

If a cluster has three elements, and those element data types are (in order) boolean, I32, and string, then it will get drawn like an error cluster.  Change anything about the cluster to *not* fit those criteria and it will go back to being drawn like a regular cluster.

 

Funny thing about it being specific to data type is that if your cluster has a boolean, an I32, and a tree control, it will get drawn like an error cluster.  😉

 

error_with_tree.png


 

... so the tree is just a string as far as LV is concerned.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 8
(2,679 Views)
The tree has either a scalar string data type, or an array of strings data type, depending on how it's configured.
0 Kudos
Message 6 of 8
(2,671 Views)

@matt W wrote:

Reorder the elements.

Right click on the cluster in the type def, select "Reorder Controls in Cluster", and click on the elements in a any order other than, bool, int, string.


Smiley Happy That's the reason I asked here, knew there'd be some simple solution to the problem.


@Darin.K wrote:

Making your counts U32 instead of I32 might work.


That worked too.  From the string-number conversion in the root VI that actually gets that data, I'd have to cast that to an I32 instead of leaving it as the output's U32.  Not a big deal to do, but since this VI is used elsewhere in other projects I'll just leave it the way it is and change the control order.

0 Kudos
Message 7 of 8
(2,635 Views)

The error cluster is sooo 1990s. It needs to be a class.

=====================
LabVIEW 2012


Message 8 of 8
(2,629 Views)