There is no difference between the creation of a subVI or regular VI. You go to File>New VI. It becomes a subVI if you call it from another VI. If you have code in a main VI that you want to make into a subVI, highlight the code and go to Edit>Create subVI. You cannot include a local variable from the main VI in your subVI. By definition, a local variable only is available to the VI in which it resides. If you want to pass values to the main from a subVI, you could use a Global variable. Use either the normal one on the Structures palette or use a functional-style global. There are plently of references to this type of global in the shipping documentation and on the forum but it is basically a subVI with a shift register. Your other alternative is to pass a reference to the control you want to update in the main to the subVI and write to the reference in the subVI. There are also shipping examples on using control references.