02-11-2019 12:25 PM
Hi, Everybody --
I'm using LabVIEW 2018 and I recently modified a tried-and-true VI to accommodate a slightly different set of sensors. In the process, I altered the path used to store the collected data. Unfortunately, I forgot to create the actual folder to which the new path referred. Of course, after the experiment was completed and it was time to save the .CSV file, LabVIEW couldn't find the specified folder and gave me the Error 7.
Unfortunately, there's no question that it was my fault. My question is this: Even though I screwed up so egregiously, is there a way to recover the data somehow? I haven't stopped the VI yet; the error dialog is still there, waiting for my reply. Are the data stored in a buffer somewhere where I can access it, maybe, or am I out of luck, to be banished from my own lab forthwith under pain of death?
Thanks!
Mark
02-11-2019 12:59 PM
Mark,
If you are plotting the data - Right-Click and 'Export' the data to Excel or file....
Try that...
Regards
Jack
02-11-2019 01:02 PM
"Depends"
On how your code is structured and implemented.
If there is a sub-VI that has the data and the data is available in a FP control... You could copy the control to a new VI and make it the default. Then save the data using that copy.
But that is a big DEPENDS.
Ben
02-11-2019 01:35 PM
@MrJackHamilton wrote:If you are plotting the data - Right-Click and 'Export' the data to Excel or file....
Does not need to be a plot. That works equally well for plain array controls or indicators.
(Be aware that the export truncates the formatted data to the resolution of the axis markers, so if they e.g. use "%.1f", the exported data only contains one decimal digit. 😞 (see also)
02-11-2019 01:43 PM
@Craters wrote:
I haven't stopped the VI yet; the error dialog is still there, waiting for my reply.
If the code is written reasonably (state machine), it will give you another chance at saving once you OK the dialog. At that time you can manually create the required folder and try again. If the code is poorly written and saving occurs automatically after the UI loop has stopped, you are out of luck. I doubt you can interact with the VI if the error popup is still up and who knows what happens after the VI stops. Does it close automatically? Does it run cleanup code? Does it go back to edit mode? In edit mode, all controls and indicators of the toplevel should still be available. SubVIs that did not have the front panel open during run will most likely be blank unless the code requires the front panel to be loaded and they are still in memory.
02-11-2019 01:43 PM
@altenbach wrote:
@MrJackHamilton wrote:If you are plotting the data - Right-Click and 'Export' the data to Excel or file....
Does not need to be a plot. That works equally well for plain array controls or indicators.
(Be aware that the...
Export to clipboard will crash LV if the arrays contains type-def-d enums (in LV 2017 I believe)
Ben
02-11-2019 01:54 PM
Thanks, you guys!! That worked, at least to the extent that the chart on the FP was displaying the data.
The Excel file contains 2595 data pairs, which is 2595 more than I had when I posted my question! If I may pry a little further -- when I right click on the displayed data and select "Chart History Length...", it reports that there are 16384 data points in the chart history. That's 13789 more than I now have in the Excel file. I'm guessing that the rest of those points aren't accessible; could one of you verify that assumption, or is there still a way to recover them?
Thanks again -- this forum has never disappointed me!
Mark
02-11-2019 03:37 PM
Chart history length is the buffer for chart data. Once it is exceeded, the oldest points will vanish. Since you used less than the maximum, you have all your data.
(The default chart history length is 1024 point and you would have lost >1500 points with that setting. Fortunately for you, somebody changed the default).