06-10-2007 03:09 AM
06-10-2007 04:30 AM
Hello Oistvan,
you can tranfer easily data (numbers, clusters, arrays, references...) from and to subvis. you just have to connect the front panel controls and indicators to external terminals.
To do so, go to the front panel, and right click on the vi icon (top right of the window). select "view terminals". from there, you can either add or substract terminals, or choose from one of LV templates.
typically, to input data to the subvi you will want to connect the correlated control to a terminal on the left side of the icon. to extract data from the subvi, you'll prefere to connect to related indicator to the right side of the icon of your subvi.
Connection: select a free square from the terminal icon, with the hand or the wire mouse. then select the control/indicator you want to connect to it. the terminal will color itself with the typical color of the kind of datatype (orange for double, green for boolean, blue for integer...).
Now in the main vi, after "relink to subvi" (right click on the subvi icon), you'll be able to connect data to and from your subvi, exactly as for any regular LV function.
note: you can connect any data to those terminals. if the data type is completely incorrect, the wire will break.
if the data type connected is compatible, (eg. dbl to uInt), LV will automatically typecast and convert the data type you connect, and will notify you by putting a small red dot on the icon. it is preferable to use same data type, to avoid truncation or other undesirable effects on your data transfer.
Good luck!
06-10-2007 11:55 AM
06-10-2007 12:50 PM
07-28-2008 04:47 PM
07-28-2008 04:57 PM - edited 07-28-2008 04:58 PM
07-28-2008 07:17 PM