LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Datastream Data to Labview XY Graph

No particular order, cause once this goes into testing the people who will be running it are just going to dump any file into one of the six paths.  Shouldn't create a problem...each one goes through the same commands, I believe?  and each file is the same with exception to the transmittance values.
0 Kudos
Message 11 of 17
(1,073 Views)
Of course it makes a difference. They way you are doing it, you have three different plots and you get an x axis from one file and a y axis from another. And you are getting column 0 from all files. This appears to be a value that is the same in each file so that is why you have a linear plot. Are you trying to get six different plots where you plot column 0 versus column 1 from each file?
0 Kudos
Message 12 of 17
(1,071 Views)
"Are you trying to get six different plots where you plot column 0 versus column 1 from each file?"
 
-Yes, six different plots all on the same graph with respect to 0 versus 1.  If it makes it any easier, I had been doing the same file inputs for each test.  1st path, 1001;  2nd path, dark filter; 3rd path, longpass; 4th path, long-short; 5th path, short-long; 6th path, shortpass...
 
Sorry for being so difficult, I'm still fairly new to LabVIEW Smiley Indifferent
0 Kudos
Message 13 of 17
(1,066 Views)
OK, some thoughts:

  1. You don't really need the sequence structure. LabVIEW's DATAFLOW paradigm will ensure that things get done correctly, just wire them up. Sequence is used to enforce some particular order when it otherwise would not be enforced.
  2. You are using a SEARCH/SPLIT string to find the word "Wavelength" in the file's text. But you pass the MATCH + REST output to a SPREADSHEET STRING to ARRAY function. The word "Wavelength" will be included in the string passed, and will try to be interpreted as a DBL number. That will fail. Every time.
  3. You don't include any data files,so I don't know what they look like, but consider using the READ FROM SPREADSHEET FILE function to do some of this work for you. If all you're doing is reading a column and scrapping row 0 (the column header), do it the easy way.
  4. Your code then transposes the array, then picks out Row 0. It would be better to pick out Column 0 and not do the TRANSPOSE operation at all. The INDEX ARRAY will happily pick out a column for you, but you do have to wire it.
  5. Take a look at my attachment. You can simplify it further if you're just reading a whole spreadsheet column.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 14 of 17
(1,061 Views)
Well, like I said, you only hve three plots. this is obvious from the build array function in the last frame. It's also pretty obvious that you are taking column 0 from each file and plotting it against column 0 in another file. Here's something that I think is much closer to what you want to do. since the code repeats, I put it inside a for loop. There is absolutley no need for a sequence structure even with your old code. The debug of your old program could have been done by either probing some of the wires or placing temporary indicators in various places. For example, placing a probe at each of the inputs of the bundle functions showed that they were column 0 values and all were identical.
Message 15 of 17
(1,061 Views)
Well, I just spent 15 minutes answering your question, only to find out you wanted to ask something else.

Can you state what you want, clearly, in one single post?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 16 of 17
(1,053 Views)

Coastal, you actually did help me.  So no worries, it simplified my previous VI completely which is all the better.

Dennis, thank you so much.  I now have the plots up on the graph which puts me way ahead of where I was, and the file path array worked very nicely ( I tried incorporating that before but couldn't get it right).

Once again, thank you both so very much - if I have any other questions I'll be sure to direct them to yas Smiley Very Happy


-Steve

0 Kudos
Message 17 of 17
(1,049 Views)