LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why isn't my multiplot working?

Hi,
I'm trying to plot two different Y arrays to the same X array in the same XY plot. I've looked at a few examples and have cut and past the block diagrams from them, but I can't seem to get it working.

I have attached the program (it is quite cumbersome). The error I'm getting is a broken wire when I try to link my bundled data to the XY multiplot VI. I'd appreciate any help.

Thanks!
Kathryn
0 Kudos
Message 1 of 10
(4,536 Views)
Would you save the VI to version?  I haven't gotten around to upgrading to 8.2 yet.
0 Kudos
Message 2 of 10
(4,527 Views)
Yup,
You didn't give a LV version, so I am assuming you meant 8.0. Let me know if this version works for you.

Thanks for your help!
0 Kudos
Message 3 of 10
(4,521 Views)

You are trying to make an XY plot from a cluster of 2 2-D arrays.  The datatype for an XY graph plot is a cluster of 2 1-D arrays.  You then make an array of those individual plots.

So you need to loop though the 2-D arrays making a cluster of 1-D arrays, and then you can send those to the graph.

0 Kudos
Message 4 of 10
(4,519 Views)
OOps, that was the wrong version of my program. Here the right version for 8.0.

Sorry about that.
0 Kudos
Message 5 of 10
(4,518 Views)
Evan,
How do you do that?

Thanks for your help!
0 Kudos
Message 6 of 10
(4,516 Views)
I'm not sure exactly what is happening with your 2D arrays, but I've modified
your VI to show how you would put together the data so that the two sets of data
will plot. In this revised VI, I am assuming that you have the same x-axis values.
Message 7 of 10
(4,506 Views)
Thanks NYC I got busy and was just coming back to this post.
0 Kudos
Message 8 of 10
(4,500 Views)
nyc,
Thanks for your help. Your setup makes sense, and that is what I have been seeing examples of on other threads. But, how do I make it work with my setup? Why does it work with your arrays, but not my arrays? When I try to duplicate what you have done (but connect to the rest of my program), the wire is still broken between the build array and graph vi.

0 Kudos
Message 9 of 10
(4,495 Views)
You are providing the wrong arrays to the graph.
Your data needs to be 1D arrays not 2D arrays.
 
By default the Spreadsheet String to Array element creates a 2D array.
You use this element 3x in your VI when you are converting the response from the scope.
 
You need to right-click over the array type input of the Spreadsheet String to Array element and select Create -> Constant.
Then right-click over the empty 2D array constant that is created and choose Remove Dimension.
 
 

Message Edited by nyc on 11-30-2006 04:57 PM

Message 10 of 10
(4,492 Views)