abhishek_d Posted April 17, 2014 Report Share Posted April 17, 2014 I have data saved in a text file can anyone please tell me how to read the entire data from text file and display on graph the attached file is my data file. data.txt Quote Link to comment
dannyt Posted April 17, 2014 Report Share Posted April 17, 2014 As has been said on LAVA before, people here are happy to guide and help but you need to make some sort of effort yourself as a starting point. So which part of the task are you stuck on ? I would start by breaking the problem down, can you a ) read the data from your text file ? If not look in the LabVIEW examples b) can you plot simple data on a graph ? if not look in the LabVIEW examples. In fact there is an example provide by LabVIEW in the NI example finder that does basically what you need, plus several VI's on the NI LabVIEW forums which show you how to do this as well. Come back if you have a more specific question having looked at some of these. Quote Link to comment
abhishek_d Posted April 17, 2014 Author Report Share Posted April 17, 2014 Actually i'm able to read the data from text file, but while plotting it on the graph i'm having problem it is getting hang. can you tell me what to do for this to show the entire data on the graph. i'm attaching my VI which i used to display the data in table format as well as graph. Analysis.vi Quote Link to comment
dannyt Posted April 17, 2014 Report Share Posted April 17, 2014 Can you save it for LabVIEW 2012 Quote Link to comment
abhishek_d Posted April 17, 2014 Author Report Share Posted April 17, 2014 saved for version12 Analysis.vi Quote Link to comment
dannyt Posted April 17, 2014 Report Share Posted April 17, 2014 Several thing jump out looking at your VI. 1) File I/O is time expensive and the file is opened before read, read and then closed, reading the same file twice is a waste of time a lot quicker to open read once and the manipulate your data in the types you want. You can simple open read all data then, use spreadsheet string to array. 2) User event structures are not used in the way you have used it here, look at some event structure examples and read http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/event_struct_outside_loop/ 3) finally what data are you actually trying to plot, just trying to understand your data a little Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.