Jump to content

[CR] XNode Wrapper


Recommended Posts

index.php?automodule=downloads&req=display&code=sst&id=6

File Name: XNode Wrapper

File Submitter: mike_nrao

File Submitted: 6 Jul 2006

File Updated: 22 Oct 2006

File Category: LabVIEW Development Environment

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

http://xnodes.lavag.org/XNode.html

Have fun using this VI. Let me know what kind of exciting uses you find for it. Email me at

mlacasse@nrao.edu

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.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.