11-03-2008 10:15 AM
Guys,
Quick question, how do you clone a VI? I just download an example but I'm not sure how this guy did it...
Solved! Go to Solution.
11-03-2008 10:16 AM
11-03-2008 10:17 AM
11-03-2008 10:18 AM
VI properties >>> Execution
Set VI as re-entrant.
Ben
11-03-2008 10:25 AM
11-03-2008 10:32 AM
The relevant LabVIEW help entry.
A description of the new feature. (When it was introduced in LabVIEW 8.0)
ctrl+M switches between run mode and edit mode, that's why things change.
11-03-2008 10:40 AM
11-03-2008 10:51 AM
01-07-2012 01:08 PM
I have a strange thing happening that is because I have a cloned VI on my block diagram. After using CTRL-M to disable the cloning and getting a non-rentrant VI, I then save the non-reentrant VI in a folder so that I can access the VI. And when I open the saved VI it is in the non-reentrant mode! However when I go back into the original VI that uses this cloned VI and replace the cloned VI with the non-cloned VI and then open it up I get the expected results where I can actually change the code in this VI. I have actually gone into the replaced reentrant version of the original cloned VI on the block diagram and then replaced the VI witht the saved non-reentrant version of the VI and changed the code in the VI and then saved it again. Then I reopened the VI and looked the block diagram and the thing was still in the non-reentrant mode. However, When I saved the main VI the non-reentrant VI again became cloned as a reentrant version! This seems to me to be really strange and I am at a loss to reason this out! Can anyone explain this behavior?
01-07-2012 02:06 PM
You are confusing terminology.
CTRL-M doesn't change a VI from reentrant to non-reentrant or enable/disable cloning. You don't "enable/disable" cloning.
Reentrancy is a property defined under the File / VI properties/ Execution menu. Ctrl-M changes the appearance of a VI from edit mode (what you normally see) to run mode (what you see if the VI is running.) It will also allow a copy of a reentrant VI that is open (a "Clone") to open up the real, original copy of the VI so you can do editing on it.
A VI that is non-reentrant means there is only ever a single copy of the VI that is running at any given time. If you try to call a non-reentrant VI from multiple places at the same time, each subVI instance has to wait until the other subVI instances have stopped using it. With a reentrant VI, a copy of the VI is made when it is called (the "clone"). That means more than one copy of the same subVI can run at the same time, each with its own memory space.