09-18-2020 01:14 PM
Hi guys
I want to plot "torque values" vs time from this txt file. My idea is to start moving data into an array starting after torque values, then doing the same to time values for a different array. I am struggling to get this specific data into an array. Can someone help me achieve this?
Solved! Go to Solution.
09-18-2020 01:36 PM - edited 09-18-2020 01:36 PM
09-18-2020 02:51 PM
Hi GerdW, thank you very much for the reply.
The text file is generated from a machine and sent to a pc.I have no control over the layout of the txt file. My idea is to extract the data after the word "torque" and "time". I think you copied the txt file into labview and then just worked from there, so not quite what Im looking for, but I appreciate the effort. The idea is you just click a button and Labview will extract that information (torque and time) into two different arrays, which is the plotted.
09-18-2020 11:03 PM
GerdW said it was an "idea". Your job now is to use a little imagination to make it suit your needs.
09-19-2020 12:53 AM
The whole point of the question is extracting specific data from the text file, not how to use it. Once i get the data into an array, its very easy to plot. So to be blunt, his answer helped nothing.
09-19-2020 03:02 AM
Hi hans,
@hans7755 wrote:
The whole point of the question is extracting specific data from the text file, not how to use it. Once i get the data into an array, its very easy to plot. So to be blunt, his answer helped nothing.
Well, my idea shows how to extract specific data from text/string.
All you need to do is to load the text file and find/filter the part with the measurement data.
In your first message you did not mention any buttons so I guess you know how to display a file dialog to allow the user to select a file...
09-19-2020 03:09 AM
To put it bluntly, you definitely lack imagination.
09-19-2020 06:07 AM
What the hell is going on here? Parsing a JSON file is not that easy.
Same developers share great code for JSON parsing.
Here is an example using JSONtext from JDP Science for your file.
09-19-2020 11:08 AM - edited 09-19-2020 11:08 AM
Hi Martin Henz
This is exactly what I was looking for!! Thanks so much for the help, appreciated!
12-05-2020 07:27 PM
Hi guys, I have a similar problem. I have to extract data from the columns of a .txt and plot it. The problem is that the file does not allow me to extract more than one piece of data. What is my problem in the block diagram?