LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Broken Wire for XY Multi-plot

I am currently trying to figure out what the error is in the wiring I have with the XY Multiplot I have replicated from the example found in LabVIEW. I am collecting data into a text file that is formatted as such (there is a tab ("\t") in between the two columns:

 

0 0
1 1
5 3
28 20
42 35
75 200
90 300

 

The left column are my x values, and the second column are the corresponding y values. I am trying to set it up where the user can choose the file they want to plot and plot all the data selected onto a single XY graph. I understand that some of the wires are not the same data type, but I do finish the final wiring from the data read to the Plot Multi-XY.VI with the same type of data. Why is the wire showing as a bad wire and how can I fix the wiring/data that I am loading from my text file to properly work?

 

I have uploaded the VI and included screen shots if it can't be opened. Thank you.

Download All
0 Kudos
Message 1 of 3
(205 Views)

You probably should have attached a few typical data files, but most of your code makes very little sense. For example there is no reason for the FOR loop, becase it just reads the same three files N times.

 

To create an array of points from two 1D arrays, you need to use "index and bundle cluster array). See if this can give you some ideas. This will take your three file paths and create three plots.

 

altenbach_1-1711846623644.png

 

0 Kudos
Message 2 of 3
(189 Views)

your current code is reading the files several times (how many times are you plooting) then creating a 2 d array for each one of the plots then building a 3 D array before ploting the multi XY. that's why you're getting broken wires. 

 

0 Kudos
Message 3 of 3
(136 Views)