From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my LV8 SubVI a clone?

I have a subVI that is acting weird.
Every time I open it from the block diagram of the calling VI, it comes up as a clone (title bar reads <subVIname>:1 (clone)) and I can't edit it.
 
If I open the subVI directly from disk, it's fine.
 
If I close LabVIEW, open the calling VI, and then double-click on the subVI, it's a clone.
 
If I delete the subVI from my VI, save the VI, put the subVI in, it's not a clone.
Then I save the calling VI, and the subVI is a clone again.
I close LabVIEW, re-open LabVIEW, and open the caller VI, and then open the subVI again, it's a clone again.
 
I put the subVI in a new VI and save that - it's never a clone.
 
Neither my VI or SubVI are set for re-entrant. I don't have a project open at all, so I don't think I have multiple instances. None of the other subVIs in my VI have this problem.
 
What the heck? Any ideas?
0 Kudos
Message 1 of 14
(4,538 Views)
I am experiencing the same behaviour in LV8. This seems to happen, when SubVis are marked as reentrant.
It looks like Labview erroneously does not distinguish between opening the frontpanel manually when the SubVI is not running and opening it when called by the main VI (in the latter case it has to  create a "clone" each time a reentrant SubVIs is called).
This does not occur when I add a SubVi in the first place or when I replace it with itself. After I save the calling VI, quit LV and load it again I have the same problem again though.
I am currently using LV in evaluation mode.

0 Kudos
Message 2 of 14
(4,500 Views)

Neither my VI or SubVI are set for re-entrant.

Sorry, didn't read carefully
0 Kudos
Message 3 of 14
(4,500 Views)
LVRob,
It sounds like the subVI is reentrant. Can you attach a subVI that shows the problem? Perhaps you can Save As to create another VI that demonstrates the problem and delete everything on the block diagram before posting. Was the subVI reentrant at one time and now it's not? Perhaps there is a bit somewhere we are not clearing? I tried toggling reentrant on a subVI and can not reproduce the problem though.
C.Horn,
FYI - You can edit a message after you have submitted it. You have to be signed in, then click on the Options link at the top right of the message you want to edit and select Edit Message. Handy for fixing a response when you realize you misspoke, omitted something, etc.
Roy
0 Kudos
Message 4 of 14
(4,470 Views)
Hello,
 
I have attached a zip file containing two VIs - one named "Calling VI.vi" and the other named "random plot.vi" to illustrate what I think is the point of confusion here.  The VI "random plot.vi" is used as a subVI by "Calling VI.vi" and is currently saved as reentrant.  The subVI node setup for the subVI is to show front panel when called and close afterwards if originally closed.  When you open "random plot.vi" from the block diagram of "Calling VI.vi" it will be a clone.  When you run "Calling VI.vi" it will open "random plot.vi" as a clone.  If you change "random plot.vi" to be NOT reentrant, then it will not open clones as described in the previous 2 sentences, rather it simply opens the only instance of the VI that can exist at one time.
 
When reentrance is set, and you do have clones, they can be run independently of each other, and debugged independently (with highlight execution for example).  They cannot be edited because they are copies of memory of the original VI from which they were cloned, and their purpose is to allow multiple instances of that code to independently run and be debugged at the same time.  The original VI can be edited, but not when the clone is running; the clone cannot be edited.
 
This is expected behavior, and hopefully you will see the same behavior on your machines.  If you are experiencing something different with your VIs, please attach them in as simple a form as possible, and provide a short step by step sequence of events you use to produce the undesired behavior, and be sure to note precisely when and where you expect the undesired behavior to occur.
 
Thank you,
 
Best Regards,
 
JLS
 
Best,
JLS
Sixclear
Message 5 of 14
(4,462 Views)
Apparantly whatever it was fixed itself or I overlooked something.
 
Today when I opened the subVI, it was re-entrant. When I turned it off, that fixed the problem. But I SWEAR I checked that the other day. I dunno... getting senile?
 
 
Comment on the way that this works:
You need to provide a way to open a reentrant VI for editing from the block diagram. Here's the way that I believe it should work:
 
1) During execution, you always open the clone because obviously you are interested in watching it during execution
2) During editing, the default is that you open the source VI for editing, but provide an option on the pop-up menu that allows you to open the clone version instead.
 
90% of the time when I am double-clicking on the subVI, I am interested in editing it. 10% of the time it's because I want to watch it during execution. The most common use scenario should guide how it operates.
0 Kudos
Message 6 of 14
(4,449 Views)


@Roy F wrote:
FYI - You can edit a message after you have submitted it. You have to be signed in, then click on the Options link at the top right of the message you want to edit and select Edit Message. Handy for fixing a response when you realize you misspoke, omitted something, etc.
Roy



Cool Feature! Except that I don't see that as one of the options... I have eight options, three, then a divider, then five. None of them has anything to do with Editing.
 
Any ideas as to why?
0 Kudos
Message 7 of 14
(4,435 Views)
It only works for five minutes after posting, then it's gone.

___________________
Try to take over the world!
0 Kudos
Message 8 of 14
(4,427 Views)
Hello,
 
Stranger things have happened in the world - no problem as long as you only see expected behavior now 🙂
 
Anyway, I think the suggestion you are making is to have, at edit time, a reentrant subVI double clicked on a block diagram actually open the disk copy, and not a clone.  All suggestions are welcome, in fact encouraged, and should be make at our suggestion site.  Click the word "feedback" in the bottom left portion of the following page to link to the suggestion site:
 
 
In any event, I am glad we're all on the same page now and seeing the same behavior on our machines!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 9 of 14
(4,404 Views)
Re: Options >> Edit Message

@10Things wrote:
 
Cool Feature! Except that I don't see that as one of the options... I have eight options, three, then a divider, then five. None of them has anything to do with Editing.
 
Any ideas as to why?


I found a post in another thread that there is a time limit, 10 minutes perhaps, after which the selection will no longer be available. I searched through help, but could not find this documented anywhere (ouch!).

FYI - I learned of this when I noticed the message edited text on some messages (as you should now see on this one).

Roy

Message Edited by Roy F on 12-07-2005 03:37 PM

0 Kudos
Message 10 of 14
(4,381 Views)