LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error - "You have connected two arrays of different dimensions"

Solved!
Go to solution

I'm trying to complete the Mathscript chapter in Hands-on Intro to Labview for Scientists and Engineers and as I add in the code for the Shape controller, I get the error message:

 

You have two or more array data types wired together, but the arrays have different numbers of dimensions. Show the Context Help window to see how many dimensions are required. The dimension of ->t is 2. The dimension of XY Graph->t is 1.

 

I've tried inserting the index and build arrays like the help page says, but it still doesn't work.

 

Attached is a screen shot and any help would be greatly appreciated.

0 Kudos
Message 1 of 4
(5,869 Views)
Solution
Accepted by Slick_Rick

You have a couple of 2-D arrays coming out of your Mathscript node.  Is that what you want?

 

You are clustering them together to get to the XY graph, but I don't think there is any logical data structure for a graph that uses a cluster of 2-D arrays.

 

First you need to look at the help and examples for an XY graph to see what data structures that a graph can accept.  Then figure out what the 2-D arrays mean and what you can do to them to get them to work in an XY graph.

0 Kudos
Message 2 of 4
(5,862 Views)

I don't see anything in your MathScript code that should generate a 2D array.  Make sure the outputs have the Auto Select Type turned on.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(5,850 Views)

Thanks for the heads up. My outputs were both set to DBL 2D without me realizing it so once I switched them to DBL 1D and took out the arrays it worked.

0 Kudos
Message 4 of 4
(5,846 Views)