09-11-2008 10:58 PM
09-11-2008 11:32 PM
You'll have to show us what you are doing now before we can tell what is incorrect about.![]()
You should look at the example for XY graph.VI and also Read from Text File.VI A combination of those two should show you what you need.
If you still need help post your VI and also a copy of your text file.
09-12-2008 01:33 AM
Hai.
To read and display text file on a graph,u need to save the data in a text file using 2d array to string vi specifying Comma & Semi-colon as column and row seperators
Then use string to 2d array vi to display text on a Graph.Specify comma & semicolon as column & row seperators here also.
Check the attached vis for reference.
09-12-2008 10:14 AM
Wow. OK, this is going to sound harsh, but sometimes, brashness is necessary... That's certainly a convoluted way of doing things. Why use a complicated way of saving 2D data when you have the Write to Spreadsheet File and Read From Spreadsheet File functions? Those 2 perform in a single step everything that you're trying to do with all of that code. The delimiter used to separate columns can be whatever you want, and I've never heard of using semicolons to separate rows. That's not to say you can't, but normally newline characters (specific to the operating system) are used.
Also:
While we appreciate you trying to help, please provide examples that work and that indicate a certain level of understanding of proper and efficient LabVIEW coding. I'm not trying to discourage you, but it is clear, at least to me, that this example is not one that the original poster should consider as a solution.
01-22-2009 01:51 AM
Well given the presenece of this thread I didn't see the point in starting up a new one given that wanting to display some text as described by the original poster is my initial aim here. However, I think I have got the text to display, my problem is that is not presenting as it should. Thus I have attached the vi I have come up with, the text file I want to read and graph and a image of how the data should be presented.
The reason I am doing the vi like this is the moment is the next step will be to fit it using the non-linear fit vi using an equation I have. Thus by graphing it initially here I can see I can do part of initially what I want to do. Once I can do this I will then attempt to use the fitting vi and see how well the data fits to the known (ie model values). (sorry if that last paragraph went slightly off topic.
I should note here that the reason I am using a text file with a sort of header is that the data that i will be getting from the DAQ card, and after it has been processed, will be of the form in the text file. hence wanting to start fromt here.
thanks and any hep would be appreciated,
01-22-2009 09:41 AM
01-23-2009 12:38 AM
Thank you for that help. I must apologies for the issue with the text file. It is something I had noticed as well and I had deleted those extra tabs as well. Obviously I sent ac opy of the file that i hadn't modified before I attached the file. So the tabs aren avoidable, but maybe using the Array Subset is actually a good idea. Ideally the data I will be working with will have more than one row (ie header information and stuff), so this might be a better way of dealing with the data.
Thanks for the help, I got it to work on my machien as well. Much appreciated.