smoothbrain Posted November 17, 2004 Report Posted November 17, 2004 Is there a simple way to control the order of execution of sub-VIs in a program without using the sequential frames? I am trying to clean up some software that someone else wrote, and it's very very difficult to see what is going on in the program because everything is hidden in a frame. For example, the program as it exists has a 3-sequence frame at the beginning. The first frame initializes the serial port, the second frame sends an intialization command to a stepper-motor controller, and the third frame sends the "move" command to the same motor. Now in any other language, each step would be in order in the program, but I noticed that LabVIEW seems to arbitrarily execute each step in some random order if each is not in its own frame. I suppose I'm missing something, but I'm coming from a c++ background and the whole picture-programming thing is a bit strange. Thanks Quote
didierj Posted November 17, 2004 Report Posted November 17, 2004 Is there a simple way to control the order of execution of sub-VIs in a program without using the sequential frames? I am trying to clean up some software that someone else wrote, and it's very very difficult to see what is going on in the program because everything is hidden in a frame. 2670[/snapback] You're in the same house... In order to make sub-vi's sequencial without the sequence frame, wire the error cluter in and out of every sub-vi. In the sub-vi, wire the error in to a case structure that surrounds everything. This way you wire the error in/out clusters together in the main-vi. Also If a sub-vi produces an error, all the subsequent called sub-vi don't waste time on operations that are then useless. For further informations see LTR (www.ltrpub.com) Volume 7, Numbers 1 + 2. There are rules on good wiring ("rules to wire by"). There is an example of using the error cluster. Maybe there is also something in the online-help. Didier Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.