Showing results for 
Search instead for 
Did you mean: 

Error 97 labview

Hello partners.

I wanted to ask you a favor, I am doing a project, in which I am communicating with a PLC, the project visualizes the temperature data in different points, and saves them from time to time in an Excel file, the drawback is that I already execute it, and after a certain time, it may be about 15 minutes that is already working, I get ERROR 97, I do not know if someone has an idea why?


0 Kudos
Message 1 of 7

My feeling is: If this is running in a loop, this might be the problem. if you call that many times per second, you might have a race condition between the last file saved and the new one you want to modify.

Move that to a lower priority loop.


Message 2 of 7

Everything is in a while loop, but the problem of saving is not every second it does every 5 minutes.

By saying move to a lower priority loop ?? I do not understand this well?

0 Kudos
Message 3 of 7

Well, You do have an error during the save report.

I suggest then to isolate the report generation VI and try them alone. Do a simple validation with those.

You will see where it comes from.


0 Kudos
Message 4 of 7

The error occurs with Excel Insert Table.  I cannot easily see this in the limited picture you attached.  Please attach the VI (and possibly other VIs, if necessary -- if this is in a LabVIEW Project, you can compress the Project Folder and attach the resulting .zip file).  You are doing something wrong, can't properly see it yet ...


Bob Schor

0 Kudos
Message 5 of 7

Hello friend, I attached the file VI in mention, the truth I still try to see my error, but I do not know where it is xD.

0 Kudos
Message 6 of 7

Well, by looking at your code, I think I see the error.  In a single While Loop, you are attempting to write 8 Reports using Microsoft Excel at the same time.  That means you Open Excel, then you Open Excel, then you Create Easy Table, then you Open Excel, then you Do Something Else, then you Open Excel, then you Create Easy Table, ...


It would surprise me greatly if you can instantiate 8 simultaneous invocations of Excel and have LabVIEW and Office and Windows be happy about this.  Try serializing things -- run a single Error Line through the 8 different reports, so that you Open Excel, create Report 1, save Report 1, dispose Report (and thereby Close Excel), then repeat for Reports 2 through 8.  A word of caution -- I'd put a delay of maybe half a second between one Dispose Report and the next New Report.  I recall needing to do this when closing and then opening an Excel Report.  I don't remember the value I used, nor the LabVIEW Version I was running at the time (you seem to be running LabVIEW 2012, which sounds around the Version where I noticed the need for such a delay).


As another test, try removing seven of the Reports from this routine (so that you only write one) -- does it work OK?  [I'm betting the answer will be "Yes"].


Bob Schor

0 Kudos
Message 7 of 7