LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview refuses to save my vi file

When I'm trying to save my *.vi file, I receive a message: "Cannot load diagram of *.vi", and forced to click on "Cancel save" button.

After clicking, another message appear: "LabView: Cannot load block diagram", and again, forced to click on "OK" button (no other buttons exist).

 

Additional info - Since last saving, I have added some Global variables.

 

Any help is welcomed.

 

Thank You,
Gil

0 Kudos
Message 1 of 6
(5,662 Views)

Your VI is corrupted - but I doubt it is due to a Global you have added. Try opening the VI by launching it with another VI which does work. If that doesn't work, you may have resort to loading from you last backup.

Richard






0 Kudos
Message 2 of 6
(5,648 Views)

there are a few potiential reasons for this.

 

  1. The block diagram was removed intentionally.  This is sometimes done to save memory or preserve IP but you might have saved the vi without its block diagram on accident.  You cannot recover from this without a backup copy.
  2. The block diagram is corrupted.  It happens rarely but a bit can flip in the wrong memory location and corupt the code.  Again without a backup from your source control you will not be able to recover
  3. The vi protection properties may be set to Locked.  You can recover from this if there is either no password or if you know the password.  If there is a password and you don't know it you can try to hack it- but its a brute force effort!
  4. Very unlikely, but your LabVIEW IDE could have become corrupted (in a rather specific way.)

So to troubleshoot we need some more info

A) can you create and save a new vi?

B) can you VIEW the block diagram of *.vi on your working PC?

C) can you open *.vi on another machine?

D) is the block diagram locked?  Look under VI Properties>Protection


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(5,637 Views)

Hello Jeff,

 

Thank you for the fast and detailed reply.

 

Here are my answers:

A) Yes, I can create and save new vi's

B) I can view the block diagram. More than that, this vi is running perfectly, with no issues or errors. The only thing I can't do is to save it.

C) I can open it on other computer - But it isn't up-to date, since it cannot be saved for the last 6 hours...

D) The block diagram isn't locked

 

Thanks,

Gil

 

0 Kudos
Message 4 of 6
(5,625 Views)

Great news!

 

You have a corrupted VI.  This means you will have to completely re-create the vi by copying a section of code at a time onto a new block diagram.  (Hint: If you save after each step you'll find out exactly whats corrupted.  When you copy the corrupt code you may not be able to save the new vi but you can revert to the last good save and build in the corrupt functions!)


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(5,609 Views)

One thing that sometimes works is to select the entire block diagram and drag the selection to the block diagram of a new VI. Note: do not try to copy and paste. Just drag and drop. See if the new VI can be saved.

Message 6 of 6
(5,606 Views)