LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

opening a a Subvi in Edit mode

Dear people,
 
I have a program and I try to open a Subvi in Edit mode. Actually, the Subiv runs when I open it up. which is logical, because it has been loaded into the memory.
 
Now my question is, while my main program is running, if I can start up a new Labview screen from that main program, with that Subvi at "stop" state  so the user can Edit, save it and then return to the main application?
 
thanx!
0 Kudos
Message 1 of 6
(3,383 Views)

No. The way LV runs, all subVIs of a running VI are changed into a Waiting to Run state in which you can't edit them. This is done for various protections and optimizations and is just the way LV works.

If you want to edit a VI which will be called by another VI you will have to tell the calling VI to dynamically load it into memory when it needs it and then to unload it, which is not as easy as using a simple subVI, but has other advantages as well. Search the example finder for "dynamic" and "VI server" to see examples.

I know LV 8 should also have a context menu option for loading the subVI in different ways, but I don't know how that works.


___________________
Try to take over the world!
Message 2 of 6
(3,378 Views)

"if you want to edit a VI which will be called by another VI you will have to tell the calling VI to dynamically load it into memory when it needs it and then to unload it, which is not as easy as using a simple subVI, but has other advantages as well. Search the example finder for "dynamic" and "VI server" to see examples. "

well, I have to I am afriad of. so, I looked in the examples, and that I understand, because I am doing the same. Actually, can you give me a vi which is able to unload the VI from the memory, so I can edit it?

An other option is to stop the whole program, I was thinking is to open the subvi in Edit mode, and then stop the Main Program.

Is that possible?

thanx!

Message Edited by btwesseling on 10-10-2006 07:06 AM

0 Kudos
Message 3 of 6
(3,373 Views)
What would be the purpose of this. Why do you even want or need to open a VI in edit mode that is being called by a main program. Maybe if you tell us why you are trying to do this task, we could possibly offer another solution.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 6
(3,364 Views)
Well, the final program is goign to be running on a system, where the explorer is disabled. the tests are not accesible by the explorer in other words.
 
So, there must be a way to edit or modify the test parameters, and the most safe way is by doing this directly out of labview.
 
 
0 Kudos
Message 5 of 6
(3,350 Views)
Parameters are not constant.
Once again - parameters are not constant. They should not be part of your code. Instead, they should be saved in some manner and passed to the approriate functions as variables. That's one of the basic elements of programming. If you search the example finder for "subVI", you should probably find some examples.
 
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
 
Of course, if you want to load VIs with different code, then that's usually done by calling them dynamically. There is no other way, really.

___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(3,343 Views)