LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating sub-VI's with flex motion VIs

I am in the process of trying to create a 3-axis motion controlled system using LabView. We have 3 stepper motors, all connected through the nuDrive box, and they all work fine. The coding however is getting very complicated and confusing. I currently have written a program for an axis to move in steps to a target position, and then return to its original position. I wanted to make this a sub-VI so I could eliminate many wires and other motion-VI's, but I can't figure out how to do this. I tried copying things from other motion VI's (i.e. the Stop Motion VI), mainly the blue boxes that define data types... I cannot seem to find where these are located. So I write my VI and save it but when I go to "select a VI" (under all functions)
and open it, it has no "terminals" to wire to.

How can I make sub VI's that are able to be used by other programs? This would make life a lot simpler! Thanks.
0 Kudos
Message 1 of 2
(2,446 Views)
Is your question that you don't know how the terminals are created? If so,
this is how:

1. Right click on the icon in the upper right corner of your front panel.
2. Select Show Terminals.
3. Right click on the icon again and select Patterns.
4. Choose a pattern with several more terminals than you currently need.
5. With the wire tool still visible, click on a terminal and then click on
a control or indicator.
6. Generally, you want controls on the left terminals and indicators on the
right.
7. When you're done, right click on the icon again and select Show Icon.

Appendix.
In the future if you edit your vi's terminals, it might appear greyed out on
block diagrams where it is called. Right click on the vi and select Relink
To SubVI. Make sure that the wires st
ill go to the correct terminals.

"monodeamor" wrote in message
news:50650000000800000034EC0000-1079395200000@exchange.ni.com...
.. . . So I write my VI and save it but
> when I go to "select a VI" (under all functions) and open it, it has
> no "terminals" to wire to.
>
> How can I make sub VI's that are able to be used by other programs?
> This would make life a lot simpler! Thanks.
0 Kudos
Message 2 of 2
(2,446 Views)