07-15-2019 08:34 AM
LabVIEW is giving an error of excel file not found. Then if I press continue the program runs fine and just goes to zero every few seconds.
07-15-2019 08:44 AM - edited 07-15-2019 08:45 AM
Hi nsaeed,
abVIEW is giving an error of excel file not found. Then if I press continue the program runs fine and just goes to zero every few seconds.
All those problems because of missing error handling:
IF no error THEN do something with CSV data ELSE try again ENDIF
07-15-2019 09:07 AM
I am an amateur when it comes to lab view can you please elaborate as to how I can introduce error handling I tried using a case structure but am unable to find a way to detect when the error occurs to forward it to the case structure.
07-15-2019 09:33 AM
Hi nsaeed,
I am an amateur when it comes to lab view
You really should take the training!
how I can introduce error handling I tried using a case structure but am unable to find a way to detect when the error occurs to forward it to the case structure.
Use the error wire!
07-15-2019 10:00 AM
I tried that aswell, now I get no errors shown but still get the same errors.
07-15-2019 10:18 AM
@nsaeed wrote:
I tried that aswell, now I get no errors shown but still get the same errors.
Then could you share your csv file? That is likely where your problem is.
07-15-2019 10:28 AM
Sure,
I have attached the csv file plus the latest version of my labview program.
In my csv in order to save the file every second I introduce a two vba's 1 in the thisworkbook object and the other in a general module.
I have attached these aswell.
07-15-2019 12:16 PM
Something's fishy here. You're talking about a CSV file as if it were an Excel file. It's not. There's no such thing as a CSV "workbook". I've opened up your "CSV" file and it is an Excel file with a CSV file extension. I think you'll have to work this out before we can really help you. It's likely that your failure to realize that a CSV file is a pure text file while an Excel spreadsheet is causing at least part of your issues.
07-15-2019 12:49 PM
Sorry, but the format of your file is a mess. It looks like you have a line for each variable, possibly multiple values. But you throw in the variable names in the middle of the lines, with those strings being duplicated. Those names will just be formatted into your 0s. And then you have a bunch of "blank" values (multiple commas next to each other). A simpler format would be to have the variable names first in the line and then the list of values for those variables.
And you could just use Read From Delimited Text File to do all of the reading for you.