ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when using the Open file block

I'm new to labview programming and am having the following problem:

When trying to open a file ".dat" in Labview 6i it from the program ".vi" and appears "Error 7"
and the file does not open. I am using the block "Open file". Attached is a screenshot. How to solve this?

Thanks

0 Kudos
Message 1 of 5
(3,010 Views)

There is no way to troubleshoot this by looking at a picture of the diagram. LabVIEW 6 is almost prehistory and many things have changed, especially the file IO all looks different so it is impossible to tell what you are doing.

 

Error 7 is file not found, so most likely your string operations are not correct. What are the full strings? What is the final file name (maybe you are missing a "\" or maybe you are on a different OS type). Put an indicator at the path wire to see what's happening!

 

Is this a datalog file?

 

(Overall, the code is a bit suspect. Nobody needs a seven frame flat sequence. 🐵 Why do a control and an indicator have the same label?)

 

 

 

0 Kudos
Message 2 of 5
(3,006 Views)

And, don't ever again attempt to get around the ban on posting bitmap images by simply renaming the file. Really irritating and rude behavior.

Message 3 of 5
(3,002 Views)

Problem solved. In another OS works perfectly Smiley Happy

 

Thanks

0 Kudos
Message 4 of 5
(2,968 Views)
As you have noticed, it is a really bad idea to keep paths as strings. The reason we have a path datatype is because they work in any OS. A path converted to a string will differ, because the syntax and delimiters differ. Your global should be a path!
0 Kudos
Message 5 of 5
(2,956 Views)