03-21-2007 06:35 AM
03-21-2007 07:18 AM - edited 03-21-2007 07:18 AM
Message Edited by GerdW on 03-21-2007 02:19 PM
03-21-2007 07:51 AM
03-21-2007 07:52 AM
03-21-2007 07:58 AM
Hey looser,
In order to control subvi by mainvi you have to go to the front panel of your subvi and right click on the icon in the top right corner. Select Show Connectors and then wire the indicators/controls you want to whichever positions. Save the vi then go to your mainvi and select the subvi and wire in the values that will control the selected indicators/controls.
Hope this helps,
03-21-2007 08:36 AM
03-21-2007 09:27 AM
03-21-2007 09:36 AM
03-21-2007 09:45 AM - edited 03-21-2007 09:45 AM
No. It's not the answer to get the value of the loop. It's the answer to how you should be programming.
You want to ramp the power supply, correct? The power supply subVI is in the main, correct? The main has a while loop, correct? The decision to ramp up and down and the values calculated should in the main. You would have to make some serious changes in the ramping subVI to be even close to getting it to pass values back to the main. You would have to eliminate the while loop altogether. With your while lool in the subVI, you have not way to stop it and return to the main. You would have add shift registers to the main and pass these to the subVI. There's not much code there and can be easily placed in the Main. If you really want to try using a subVI, it should look something like the code below.
Message Edited by Dennis Knutson on 03-21-2007 08:46 AM
03-21-2007 11:59 AM - edited 03-21-2007 11:59 AM
Message Edited by tbob on 03-21-2007 10:59 AM