LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 8 occurred at Read File+ (string): Read File

Solved!
Go to solution

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.

0 Kudos
Message 11 of 19
(1,558 Views)

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
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 19
(1,550 Views)

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. 

0 Kudos
Message 13 of 19
(1,544 Views)

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!

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 19
(1,527 Views)

I tried that aswell, now I get no errors shown but still get the same errors.

0 Kudos
Message 15 of 19
(1,517 Views)

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



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 19
(1,506 Views)

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.

 

0 Kudos
Message 17 of 19
(1,504 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 18 of 19
(1,437 Views)
Solution
Accepted by topic author nsaeed

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 19 of 19
(1,433 Views)