LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi becomes locked after calling it by reference node

I am using LabVIEW 8.21. I have a rather complex program, Main Panel.vi, that I build as Main Panel.exe and deploy on a device. Recently I created a new subVI, printhistory.vi. I wanted this subVI to be flexible so that I could change how a report prints by modifying the single printhistory.vi file without changing and re-building the Main Panel.exe. So I call the printhistory.vi from within Main Panel.vi using Call By Reference Node. In the application builder, I included printhistory.vi as a Dynamic VI in the Destination Directory. The build was successful and I copied the Main Panel.exe and printhistory.vi files to the target device. Everything functions as intended.

 

call printhistory_vi by reference node.JPG

 

But now I want to make a small change to printhistory.vi. All I'm trying to do is add one more \n to a printout. But my printhistory.vi file is locked. I can't get to the block diagram, and all of the VI Properties are grayed out.

 

printhistory_vi Locked (no password).JPG

 

How can I unlock the VI? Is my block diagram permanently gone?

 

 

0 Kudos
Message 1 of 7
(2,817 Views)

Hi jRhodes,

 

It looks like your VI was saved without a block diagram as per this KnowledgeBase article:

 

KnowledgeBase 2N7DBEEW: What Happens When I Save My VI and Remove Diagrams?

http://digital.ni.com/public.nsf/allkb/FEE732F4B1541B9586256BF0006A78CA

 

I believe that this is done by default in LV 8+ build specifications when building an executable with VIs included. There isn't a way to modify the VI once this has been done, but if you still have the original (source included) VI you should just be able to swap them out.  Alternately, you could rebuild the exe and VI with this option deselected.

 

Untitled.png

Regards,

Tom L.
0 Kudos
Message 2 of 7
(2,795 Views)

When you included printhistory.vi in the build as a dynamic VI, did you uncheck the "remove block diagram" option? If not, then yes, the block diagram is gone and you'll need to go back to your original source. The default behavior is to remove the block diagram for all VIs set as Always Included.

0 Kudos
Message 3 of 7
(2,789 Views)

Not necessarily addressing your issue. Others have already done that. But, I would suggest you may want to consider proving the name of your reporthistory vi in an external file. That way you do not have to overwrite the actual VI allowing you to have multiple report formats available at the same time.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 7
(2,776 Views)

0utlaw and nathand, thanks for the replies.

 

I don't see the "Remove Block Diagram" option in the source file settings for LabVIEW 8.21. This is my window:

Source File Settings.jpg

 

Also, my original source copy of printhistory.vi is the file I am trying to open and modify. I'm checking with the IT guys here to see if there's a saved backup copy from last week pre-build, but barring that there is no original vi that still gives me access to a block diagram. As far as I can tell, building the Main Panel.exe seems to have removed the block diagram from my original source printhistory.vi.

0 Kudos
Message 5 of 7
(2,771 Views)

Looking through that Knowledge Base article, it seems my original printhistory.vi (and also a similar printassay.vi) somehow got saved without a block diagram, and is now non-recoverable. I don't know how I did this, since I've only used Ctrl-S and the project Save All button to save. Fortunately my Main Panel.vi still has its block diagram and has redundant backups anyway.

 

Thanks again for the help.

0 Kudos
Message 6 of 7
(2,761 Views)

@jRhodes wrote:

Looking through that Knowledge Base article, it seems my original printhistory.vi (and also a similar printassay.vi) somehow got saved without a block diagram, and is now non-recoverable. I don't know how I did this, since I've only used Ctrl-S and the project Save All button to save. Fortunately my Main Panel.vi still has its block diagram and has redundant backups anyway.

 

Thanks again for the help.


This is a good case for setting up some source code control. SVN is quite easy to setup and it is free.Even if you are a one man shop it would be worth your while to use it.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 7
(2,752 Views)