LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot data on a cartesian plane, with a twist.

I am completely new to LabVIEW. I would like to read in a tab-delimited txt file with about 80 columns and 560 rows of data. When a particular piece of data is above a certain "limit," I'd like to plot a '+' sign on a cartesian plane. When the data is below another "limit," I'd like to plot a '-' sign. When the data falls in between the two limits, I'd like nothing to appear on the cartesian plane.

I think I can handle opening the text file, but how should I read in the data. Then, how do I use the 'draw text at point' tool when the value is outside certain limits? Again, I have no experience with LabVIEW in terms of arrays and things. Any ideas on a path forward, where I should start, and how to do what I'm trying to do?

The txt files contain thickness data across a sheet of product. The product has 560 data points across(X-axis) and 80 sets of data from top to bottom(Y-axis).

Thanks
0 Kudos
Message 1 of 24
(5,018 Views)
You can simulate it with an intensity graph and making your own Zscale markers and colors. Not exactly + and -.
0 Kudos
Message 2 of 24
(4,989 Views)
I was bored, and wrote this.  I think it's what you are looking for (but I'm no expert, so there's probably a more efficent way)
0 Kudos
Message 3 of 24
(4,985 Views)
The real problem you will have is how many pixels you have to use to display the + and - signs. Your screen probably is not wide enough for 560 data points across.
0 Kudos
Message 4 of 24
(4,981 Views)
Unclebump, you present a great point. There's no way I could fit 560 across the screen. I'd probably have to do some type of averaging first, either before saving the txt file or within LabVIEW. That being said, there will never be a case where I need 560 across the screen.

It's going to complicate things somewhat, especially since i have no experience, but I'll probably do something like look at a group of 10 data points or so. If their average is higher than the average of all the data, then I'd plot a '+' or '-'.

l1k, what's left to do with your VI, because it seems very much like what I'm looking for. Do I need to open my txt file and read it into arrays called "all rows" or something?
0 Kudos
Message 5 of 24
(4,961 Views)
Attached is my intial attempt at reading in each row of data and turning the strings into numbers.
0 Kudos
Message 6 of 24
(4,958 Views)
I bet you could just use Read Spreadsheet File.  If you type in where your file is to the File Path, and it looks backwards, change the True/False constant to True on the block diagram (this transposes the data as it reads it in).  If you need more significant digets, change the %.3f to %.6f (or whatever you want).  Finally, if it's comma delimited, or something else, you can change the string constant thing (\t would represent a tab, \n = new line - just search in the help menu for formating stuff).  Hope that helps.  If it's not crucial to use +'s and -'s though, I would seriously try to use that intensity plot.
0 Kudos
Message 7 of 24
(4,956 Views)
l1k, how can I rotate the graph 90 degrees. Right now, it basically plots what's in the txt file, like I asked. However, I'd like what's at the top and bottom of the txt file to be on the right and left of "new picture." Let me know if I've lost you.
0 Kudos
Message 8 of 24
(4,950 Views)
Did you try changing the True/False constant to True (in the block diagram)?  That will change the rows to columns and vice versa.  Otherwise, switch the wiring of the two 'i' wires (there's one in the inside loop - put that on the top line of the cluster, and one in the outer loop - put that on the bottom line of the cluster) - .  I think that would do it too.
0 Kudos
Message 9 of 24
(4,943 Views)
l1k, it's working great so far. I'm working with several engineers to determine how to average the information so that I can fit the whole sheet on the screen. Then I'll start getting into the complicated stuff. If i have a question in the future regarding a different aspect of the same VI, do you suggest adding it to this thread or starting a new one?

Thanks alot.
0 Kudos
Message 10 of 24
(4,936 Views)