03-07-2013 03:30 PM
Hi, I need to create a xy-graph that plots a 2D string array. The first - and every other entry is a timestamp. Each timestamp must plot (in sequence) along the x-axis. Each constant that follows cooresponds to the preceeding timestamp and must be plotted accordingly along the y-axis labelled 'Counts'. Keep in mind I will also need to expand this to allow multiple spreadsheets with the same format to be plotted on the same graph. Please, see attached and thank you for your help!
John
Solved! Go to Solution.
03-07-2013 03:32 PM
I am currently running LabVIEW 2011. FYI
03-07-2013 03:36 PM
Are you going to be reading this from a file or real time? Are you going to get a time stamp and a number or a 1D array like you have now out of a file? It will make a difference on how you process this data.
03-07-2013 03:56 PM
Are you trying to generate a graph that looks like this? If so, see attached code (VI is saved for 2011 to match your upload, but the snippet is in 2012).
03-07-2013 03:57 PM
To answer your first question. Yes, each text file will be read from a file. To answer the second part - actually, I am starting from a 2D string array and trying to produce the xy-graph using only the contents of each text file. Thank you for your reponse.
03-07-2013 04:04 PM
Thank you, I had actually tried using decimate 1D array and a for loop previously. I was missing the scan from string idea however - and running out of time!. 🙂
03-08-2013 02:43 PM
Hi again, I will need to sort a folder list by .txt file extensions. What is the best way to accomplish this? Please see attached.
03-08-2013 04:09 PM
Use the pattern input to the List Folder function; set it to "*.txt" (no quotes). That will get you a list of only the files with txt extensions.
03-08-2013 04:16 PM
I tried both .txt and \.txt neither worked sorry.
03-08-2013 04:20 PM
Try it with an asterisk (*) like I suggested: *.txt