Jump to content

Xnode as part of Xnode ( like SubVI)


KoBe

Recommended Posts

Hi guys,

it's me again. I'm still playin' around with Xnodes and it's working very well until now. I'm working on a Library for Ddta aquisition and data elaboration. I do need to adapt several input terminals to my needs. This works with Xnodes :-). Now I would like to use my Xnodes allready programmed as SubVI's of other Xnodes.

Example:

Consider a waveform-like cluster:

Y: Array of DBL data

dt: DBL

t0: timestamp

attributes: string

Y is of variable type, it can by an array of any datatype, clusters .....

Get_t_end.xnode calculates the timestamp of the last data elment according to the number of element in Y and the timestamp t0.

Get_Periode.xnode should then use Get_t_end.xnode to produce a cluster:

t0: timestamp

t_end: timestamp

The problem is, whne i drop Get_Periode.xnode on a blank VI, Labview is stuck and I have to shut it down with the taskmanager.

Has anyone an idea how to insert the code of one Xnode into an other? My idea was to use *.vit files and adapt terminals by scripting. The problem I think is the Xnode inside the *.vit, which also should adapt its terminals when the "owning" Xnode is droped or the data type of the input is changed.

Thanks

Link to comment

It is my understanding that calling an XNode (either by a subVI call or otherwise) within another XNode is simply not supported.

-D

Get_t_end.xnode is a part of a template VI which is used to generate the code for Get_Periode.xnode. In my opinion Labview is getting confused when it calls the ability VI's. It can not differ from the Abilities of Get_t_end.xnode and Get_Perdiode.xnode because the Ability VI's have the same name.

So I can try to use my template vi, which contains the Get_t_end.xnode by replacing the xnode by the diagram (code) contained in that xnode. Then the template vi contains no xnode anymore and it should again be usable to generate the code for Get_Periode.xnode.

The question is: when should I replace the xnode by it's code? What is the first ability VI which is called, when I drop a xnode in my block diagram (OnDrop) ? Maybe that would be the right time for the replacement.

So what would be the steps:

1) On drop of Xnode:

1.a) search for "Sub-Xnodes" in the loaded template VI of the Xnode

1.b) get actual block diagram of each "Sub-Xnode" (I can't even imagine how I can access the block diagram of a Xnode!!??)

1.c) replace "Sub-Xnode" by their code in the loaded template.

2) From now on the template vi for my Xnode contains no "Sub-Xnode" anymore and should work fine.

So I will try that and will let you know if it works. :-)

Bye

Link to comment

It is my understanding that calling an XNode (either by a subVI call or otherwise) within another XNode is simply not supported.

-D

1) I can not use a template file containing a selfmade custom xnode to generate code for my new xnode.

2) I CAN use a template file containing Match Regular Expression.xnode to generate code for my new xnode.

1) is always stuck, when my generate code tries to "open VI reference" of my template containing my custom xnode. Same does not happen with Match Regular Expression.xnode in my template.

Out of the "Open VI Reference" Help:

"If you wire a path, LabVIEW waits until the user interface is idle to load VI from disk. "

So why should I be able to "Open VI Reference" for a template containing Match Regular Expression.xnode and why it does not work with my custom xnode? What could be the difference between those two regarding "user interface is idle"??

Though I think I'm coming closer and closer to a real working solution :-)

Link to comment

For who is interested:

I resolved the problem and now I can use a Xnode in an template use for another Xnode.

The problem was that the Scripting VI, which copied the diagram of the template into the xnode was not reentrant and therefore got stuck using more than 1 Xnode in a Hierarchie.

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.