In RoboLab, what is a sub-vi and how do we create them?
A sub-vi is a short hand notation. It allows the user to represent a series of icons with a single icon. A sub-vi drastically reduces the number of icons displayed on the top level diagram. Sub-vis are not subroutines in the true programming sense. They are equivalent to a macro. Each time a sub-vi is used in a program, all the icons it represents are substituted before the program is downloaded. You can create a sub-vi quite simply. Use the selection tool to highlight all the icons that you wish to aggregate. Next select “Create Sub-vi” from the edit menu. The icons will be replaced with a new icon. Double click this icon to see the original icons. Make sure to perform a “Save As” on the sub-vi to save it. This sub-vi can now be used many places in your own program. Be aware of a minor bug in RoboLab. The sub-vi diagram will have begin and end terminals. The terminal labels are swapped, but the program will function properly. Use the text tool to rename the terminals. A sub-vi can acc