LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Recovery from an Error 7 (bad path)?

Recovery from an Error 7 (bad path)?

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

0 Kudos
Message 1 of 8
(129 Views)

Re: Recovery from an Error 7 (bad path)?

Mark,

 

If you are plotting the data - Right-Click and 'Export' the data to Excel or file....

 

Try that...

Regards

Jack

 

0 Kudos
Message 2 of 8
(107 Views)

Re: Recovery from an Error 7 (bad path)?

"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

0 Kudos
Message 3 of 8
(103 Views)

Re: Recovery from an Error 7 (bad path)?


@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.

 

exporter.png

 

(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. Smiley Sad (see also)


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 4 of 8
(92 Views)

Re: Recovery from an Error 7 (bad path)?


@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.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 5 of 8
(86 Views)

Re: Recovery from an Error 7 (bad path)?


@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.

 

exporter.png

 

(Be aware that the...


Export to clipboard will crash LV if the arrays contains type-def-d enums (in LV 2017 I believe)

 

Ben

0 Kudos
Message 6 of 8
(85 Views)

Re: Recovery from an Error 7 (bad path)?

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

0 Kudos
Message 7 of 8
(76 Views)

Re: Recovery from an Error 7 (bad path)?

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).


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 8 of 8
(63 Views)