LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why does array turn to cluster

How come when I am trying to pull an array from the front panel to the block diagram, it turns brown instead of pink like it's suppose to. Is there a way to create this constant from the block diagram? It's for the initialize array function and I want to initilize the values in the cluster that is in the array to o.
0 Kudos
Message 1 of 7
(3,449 Views)
Not sure what's going on, but it sounds like you have a cluster with nothing in it. That would have a brown border. Is this what you have:


You can create block diagram array and cluster constants by using the Array Constant and Cluster Constant elements in the respective Array and Cluster palettes.

Message Edited by smercurio_fc on 06-28-2007 12:03 PM

0 Kudos
Message 2 of 7
(3,435 Views)

An array will assume the color the the array element. Your array element seems to be an empty cluster.

There are two colors for clusters, depending on contents:

Brown: All elements are of scalar numeric type (or cluster is empty).

Purple: Mixed Elements (numerics, string, boolean, arrays, clusters, etc.).

(There is probably a more precise description on how the cluster color is determined, but I cannot find it right now)

 

0 Kudos
Message 3 of 7
(3,427 Views)
To answer the original question(s): (1) I suspect that when you tried to drag the array of clusters to the block diagram, you actually grabbed the edge of the cluster and dragged it out of the array. If you grab the index display or the border of the array, you will get an array constant.

(2) Context clicking on a terminal, the wire, a tunnel, or a local variable on the block diagram will pop up a menu. One of the items is Create >> Constant. After the constant is created you can change the values with the Operte tool.

Lynn

Christian, you forgot the error cluster color. (As I am color blind, I will make no attempt to name the color).
0 Kudos
Message 4 of 7
(3,414 Views)
OK that explains it. On one of the other files that I have, I have an array of clusters and that is what I have been working with, and on this one it is only an arary, with one cluster that has 5 numerics, so (correct me if I misunderstood), I think I have an array with numerics, so it's brown. Attached is what I am looking at.
0 Kudos
Message 5 of 7
(3,406 Views)
No...  you have an array of clusters. The cluster contains only numerics, which is why it's brown. That's what altenbach was trying to tell you. As he also said, and as I indicated in my picture, it can also be brown if the cluster is empty. An array of numerics would be orange if the numeric was floating point and blue if the numeric was integer.

Looking at your VI, what are you trying to do?
0 Kudos
Message 6 of 7
(3,393 Views)
Yes, I actually mistyped what I was thinking on that. On the vi, I have another post for the operation of the VI. It is the post about how to increment array that contains two clusters whose visibility is controlled by a visible property node and a by a radio button. A long title I know. I am using the last vi that was uploaded on there and trying to edit it in order to only have one element in the array showing at one time and actually showing that updated element in the array. Also, I want to be able to go back to an element and edit it. I hope this makes sense. Thank you.
0 Kudos
Message 7 of 7
(3,389 Views)