LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I load an array of XYgraphs at runtime

Solved!
Go to solution

Hello everyone.  I need to load an array of XYgraphs at runtime.  Each array element is a collection, of which one element is an XY graph.  Each curve on its own XYgragh is generated as part of an optimization search.  The number of curves generated being a function of user input at runtime.  Resulting curves may be sorted by the user according to different criteria.  Using the sorted curves, the user selects one or more associated sets of operating conditions.  So, only 1 curve per graph, as each curve has its own operating conditions which were responsible for its generation (the other members of the collection).

 

When I try to wire data in a little test vi, I get the listed error message... which seems to be complaining that my data types do in fact match!!??

 

Thanks a bunch

Terry

0 Kudos
Message 1 of 4
(2,259 Views)
Solution
Accepted by topic author acfkt

Look closer at your data types.  Up top you have two 1-D arrays of double bundled together.  Then that made into a 1-D array.  It is a pink cluster, made into a 1-D array of pink cluster.

 

Look at the empty array going into the shift register.  Your XY graph is a 1-D array of a brown cluster.  That brown cluster consists of two scalar doubles, not the two 1-D array of doubles you have up top.

 

In your For loop up top, try converting the blue scalar to a double, then bundle the two values together.  Feed that cluster to the edge of the For Loop and auto-index on that tunnel. Now you will have a 1-D array of a cluster of doubles.  Feed that into the XY cluster element at the bottom.

0 Kudos
Message 2 of 4
(2,256 Views)

Excellent.  But how may I ask did you know about association with wire color.  Is there a list of all wire colors and what data type is associated with them?  ...or do you just learn these over time?   Thanks much.

 

Terry

 

0 Kudos
Message 3 of 4
(2,247 Views)

I remember older messages on the forums talking about brown vs. pink for clusters.  I think pink means the datatype has an indeterminate length.  (e.g. arrays inside could vary in length changing the size of the cluster) and brown means the length of the cluster is predetermined  (no strings, no arrays, just datatypes of fixed sizes).

 

For other colors, check out this thread.

Also, this article.

0 Kudos
Message 4 of 4
(2,241 Views)