Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

In RoboLab, what is the difference between a subroutine and a sub-vi?

robolab sub-vi Subroutine
0
Posted

In RoboLab, what is the difference between a subroutine and a sub-vi?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123