LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI's " Read Delimited File" can not find file

LabVIEW 2017, Windows 7

 

Problem:

A main VI and a SubVI are put in a labVIEW LLB.  The LLB is copied to another computer (user end) from the computer that developed the VI’s and LLB.

The SubVI uses “Read Delimited File” and has a directory input to “Read Delimited File” and the directory is set to a default path, C:\folder1\folder2\folder n\file.

On the user end computer and in the main VI, when executing the SubVI, error 7 shows up in the main VI and points to the SubVI’s “Read Delimited File”. 

However, before running the main VI, the file to be read is created in the user end computer and the name of directory has no spelling errors; therefore, both the file to be read and the directory in which the file is stored exist. 

So why couldn’t LabVIEW find or see file on the user end computer?  What hasn’t handled correctly?

Error 7 is

LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer.

=========================

NI-488:  Nonexistent GPIB interface.

 

0 Kudos
Message 1 of 17
(3,310 Views)

Has the proper LabVIEW Run Time Library been installed on the other computer?  Why were the files put into an LLB?  If you take the Delimited File back to the computer that created the LabVIEW code, does the routine work?

 

There are many "moving parts" and we can't "see" any of them, nor understand precisely what you've done.

 

Bob Schor

0 Kudos
Message 2 of 17
(3,298 Views)

Is that default path relative to the VI or application (ie, are you using Current VI's Path or Application Directory)?  Could you supply a snippet to show how you are calling this VI as well as how the path is being built up?


GCentral
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 3 of 17
(3,292 Views)

If you are just copying the llb, you need the development system on the other computer. (Run Time is irrelevant).

 

Is LabVIEW allowed to access the folder/file? Maybe it was created by a different owner. Does it work better if you start LabVIEW as administrator?

 

Is the convoluted story about llb relevant? I.e. does it work correctly If the vis are in a plain folder?

 

Is the path a diagram constant or formed dynamically? How?

0 Kudos
Message 4 of 17
(3,283 Views)

To confirm and clarify:

1.  LabVIEW Run Time Library has been installed on the user end computer.

2. Regardless why using LLB, there are just VIs, and it's expected LabVIEW still performs its simple built in function, as simple as "Read Delimited File".  But LabVIEW fails to do so.

3. On the computer that creates every VI, everything works fine, "Read Delimited File" works without errors.

4. No GPIB interface during execution.

 

Moreover, there are only 2 parts, a main vi and a subvi, and nothing else or "moving".  To me, it seems like a built in function failure, in this case, the LabVIEW "Read Delimited File",  or one more step hasn't been handled that I haven't known of.

0 Kudos
Message 5 of 17
(3,282 Views)

Again, it would be trivial to check if the "llb" bit is even relevant. Have you?

 

Most likely you are making a mistake somewhere, but without seeing code, we cannot help further. Did you read all my earlier comments?

0 Kudos
Message 6 of 17
(3,279 Views)

@LLVV wrote:

LabVIEW 2017, Windows 7

 

Problem:

A main VI and a SubVI are put in a labVIEW LLB.  The LLB is copied to another computer (user end) from the computer that developed the VI’s and LLB.

The SubVI uses “Read Delimited File” and has a directory input to “Read Delimited File” and the directory is set to a default path, C:\folder1\folder2\folder n\file.

On the user end computer and in the main VI, when executing the SubVI, error 7 shows up in the main VI and points to the SubVI’s “Read Delimited File”. 

However, before running the main VI, the file to be read is created in the user end computer and the name of directory has no spelling errors; therefore, both the file to be read and the directory in which the file is stored exist. 

So why couldn’t LabVIEW find or see file on the user end computer?  What hasn’t handled correctly?

Error 7 is

LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer.

=========================

NI-488:  Nonexistent GPIB interface.

 

 


You didn't include any VI for us to look at, which makes it very difficult to debug. Just guessing from what you posted, here are a couple of things to try.

 

  • The SubVI uses “Read Delimited File” and has a directory input to “Read Delimited File” and the directory is set to a default path, C:\folder1\folder2\folder n\file

Is the default path supposed to point to a "file" or "directory"? Which is it? 

 

 

  • before running the main VI, the file to be read is created in the user end computer
  • C:\folder1\folder2\folder n\file

Your filename is "file" with no extension. Does the file being created have the same file extension? Do you have the files extensions hidden in the folder. Could it have been created instead as: file.txt, file.dat, file.csv, etc?

 

unhide extensions.png

0 Kudos
Message 7 of 17
(3,270 Views)

To all,

 

It uses an absolute path, and it's reading a csv file.  SubVI is massive.  I extracted the area in the code that relates to my question.

 

I don't think there's anything to do with LLB.  I included the condition of LLB in my question only to see if it might be a problem.

 

The flow of operation is shown in below attached image.

 

CodeStructure.JPG

 

 

0 Kudos
Message 8 of 17
(3,259 Views)

Hi LLVV,

 

are you sure about the value of that local variable of "file"?

Really sure?

Did you check the value?

Did you debug your VI (using a probe)?

 

Btw. why do you use a local variable here?

 

SubVI is massive.

The way you write that is sounds like a problem (or like the source of your problem)…

 

Again you didn't attach the whole VI so all we can do is guessing. Attach the VI(s)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 17
(3,255 Views)

Your 1st question shed some light.  

0 Kudos
Message 10 of 17
(3,247 Views)