LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The File is not a VI

I am using LV7.1. And I kept getting this error message "The file is not a VI" when I tried to open my program. I can open an old copy of my code, make all the changes, and run the program. Everything seems fine, until I close the program and try to open it next time, it wouldn't open. I did the same changes for 5 times! Anyone know what went wrong?
 
Thanks in advance.
0 Kudos
Message 1 of 8
(3,138 Views)
Can you attach the bad vi?
 
What kind of changes do you make? How do you save the changed VI?
 
What is you OS (windows, Mac, Linux)?
0 Kudos
Message 2 of 8
(3,132 Views)
Hi DGU,

The situation you are discribing is quite weird, I have never seen anything like this... Have you tried to open the old code and to do a "save as" with another name and restart developping from this ?
Is there any subVI in your code or is it all in the same VI ?

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 8
(3,130 Views)

it is a fairly large file. I am not sure if you want to go through that. I just type CTR-S to save the vi, and I am using Windows

I did look what kind of change caused the problem. I am not sure if I find the exact cause, but here is what I find:

I have a subVI which contains several config read function to read ini file. I replaced that subVI with a similar but different one, (just read different section of ini) and after I save the program, the file size drop from 314kB to 294kB. I do not see any reason the file size should be that much different. When I ran the program, the subVI did read what it suppose to read though.

0 Kudos
Message 4 of 8
(3,126 Views)

Hi DGU,

      Have you tried simply opening/saving the old VI to a new name.  Is the "old"code written in an earlier version of LabVIEW?

Cheers.

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 5 of 8
(3,125 Views)
The VI are all written in the same version 7.1
 
I did more study on the code. Here is what I found: replacing that subvi wouldn't cause the problem, but if I ran the program, the file size would reduce by that amount, and then I couldn't open it any more. This program is one application of much bigger programs. It basically generate one waveform and send the waveform to AO, and acquire the respone through AI channel. My other application doing similar job (similar vi talking to hardware, the difference is # of AO/AI channel) are working fine.
 
 
0 Kudos
Message 6 of 8
(3,104 Views)

Hi DGU,

The VI becomes unusable after being run? Smiley Surprised

Is it possible that the VI [accidentally] opens itself as a data file?  Are there any graphs on the FP of this VI?

What happens if you make the VI "read only" then run it?

If the size changes as a result of the logic being executed, then it's just a matter of disabling code until the problem stops.

Please share the answer when you find it. Smiley Happy

cheers.

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 7 of 8
(3,098 Views)

OK, finally find what happen. After I make the VI read only, then I found the error. I miss wired the config VI path, and I use default on "write config data" on close config data vi, so that messed up my vi.

Thank you very much!!

 

0 Kudos
Message 8 of 8
(3,081 Views)