Jump to content

1 Screenshot

About This File

Copyright © 2006, Mike Lacasse

All rights reserved.

Author:

Mike Lacasse

--see readme file for contact information

Description::

To use this VI: Put it in the same directory as the VI you want to "wrap" and rename this VI to ";Dxxx_targetVI.vi" where 'xxx' can be anything, and 'targetVI' is the name of the VI you want to "wrap". The target VI must have a 'type' input terminal and a 'data' output terminal (these can be wired anywhere on the connector pane).

Now you can drop this VI on block diagrams instead of your target VI. The 'data' output terminal will conform to be whatever datatype is wired to the 'type' input. Your target VI will still appear in the VI Hierarchy as a subVI. Double-clicking this node on the block diagram will open the target VI..

This is accomplished within the xnode by altering the terminal specifications and by typecasting the output data from the target VI to the datatype wired to the 'type' input.

Much of this implementation was done in LabVIEW 7.1 using VI scripting which is available by adding the following lines to LabVIEW.ini:

SuperPrivateScriptingFeatureVisible=True

SuperSecretPrivateSpecialStuff=True

Here's the disclaimer:

DO NOT contact NI for support on VI Scripting.

DO NOT use these features for released code or applications to your customers.

DO NOT count on the implementation to stay the same for future releases of LV. It will change and your code will not be upgradable.

The code is pretty well commented. White text boxes describe how the xnode functions. Yellow text boxes are implementation details.

Thanks to Adam Rofer for the XNode documentation available at

Known issues/bugs:

- In LabVIEW 8, the VI description doesn't update correctly from the target VI. It works in LV7.1 to get the target VI's description to show up in the context help window, but not in 8. Not sure why.

- Terminal Labels don't appear in context help window. The icon image of the subVI is succesfully copied, but not the terminal labels. This would be a nice fix. 'Get Conpane Image' gets what I want from the target VI but there is no 'Set Conpane Image'.

- Is there any way not to require ';Dxxx_' in the VI name, but still have it work right?

- If the target VI is not executable, the errors list only says 'External Node: Code could not be generated correctly for this VI'. Thats not very helpful.

- Still working on finding a way to automatically rescript the xnode when changes are made to the target VI. This would be nice so if a control or indicator name is changed on the target, the terminals on the xnode will be renamed accordingly.

Version History:

1.0.0:

Initial release of the code.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.