Jump to content

[Discuss] XNode Wrapper


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=55

Name: XNode Wrapper

Submitter: LAVA 1.0 Content

Submitted: 03 Jul 2009

Category: XNodes

LabVIEW Version: 8.0

Version: 1.0.0

License Type: GNU Public

Potentially make this available on the VI Package Network?: Undecided

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.

Click here to download this file

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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