In RoboLab, what is the difference between a subroutine and a sub-vi?
A sub-vi is a shorthand method to make your code more readable and re-usable. Code that is defined in a sub-vi is expanded each time it is called. For those in the know, these are macros. There is no economy of code size. A subroutine shares the trait that a collection of code is aggregated into one place. But unlike the sub-vi, the aggregate code is not expanded. The subroutine code only exists once in the program. When the program goes to execute the aggregate, it remembers where it was, jumps to the subroutine, executes it, and then jumps back to the starting point. There is economy in size.