From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a xnode?

Hallo,

I am trying to get some knowledege about Xnode, but i feel difficulty to understand it. Attached is a summation node which i tried to make xnode similar to it. This has to be multiple selectable inputs which adds and substracts the input signal. where and how could i start to make it ? Thanks in advance

0 Kudos
Message 1 of 12
(4,772 Views)

As I said to your other post, the Compound Arithmetic Node will do what you want.  But if you really want to play with XNodes, then I recommend going here: http://vishots.com/xnodes/


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 12
(4,755 Views)

Out of curiosity, why are you trying to mimic the Control Design and Simulation Module Summation function as a Xnode? What is the application you are trying to do that the 'compound arithmetic' would not do for you?

Just as a reference, the Summation function actually uses a compound arithmetic as its implementation.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 3 of 12
(4,693 Views)

I am trying to make my first xnode which has to do exactly like attached vi. But I want to change its BD appearance as a circle using xnode abilities .This has to be multiple selectable inputs which adds and subtracts the input signal. how could i start for doing this? Attached is a compound arithmetic VI and picture as a circle which i wanted to have as a xnode.

0 Kudos
Message 4 of 12
(4,512 Views)

Okay well for this to work you'll need several Abilities.  You'll need the GetBounds ability to set the height and width of the XNode.  I don't know if you can have transparent parts of the icon I've never tried, but I guess it should work.  

 

The icon it self will be drawn using the GetImage Ability, and again not quite sure how a transparent will work.

 

GetTerms will define where the terminals are on the XNode and that defines where it gets wired up to.

 

You'll need GenerateCode of course.

 

You may want to add AdaptToInputs to cause code to be generated on wiring it.

 

You may also want BuildMenu, and SelectMenu if you want the user to be able to right click to interact with it.

 

Again if you haven't got the disclaimer yet, this is all experimental stuff and NI does not support or condone developers using XNodes.  Their functionality may change version to version, and functionality maybe removed without warning.

0 Kudos
Message 5 of 12
(4,460 Views)

Thank you Hoovahh.I have got some idea now. And what about .vit file which is located in the sub vi. do we need to make that by ourself or xnode will automatic generate it. I have seen in some examples, that .vit file is used to GenerateCode.vi (Ability Vi). Attached is a State.ctl file which i want to use for making xnode. is this ok in my case? i need the operands and result as double(DBL). 🙂

0 Kudos
Message 6 of 12
(4,418 Views)

Okay attached is a very simple XNode.  It is just an add with two inputs and one output.  It does this by taking the XNode Template.vi and using it as the functions performed when the XNode is ran.  To do this the GetTerms defines the inputs, the Bounds.vi defines the size, and the Image.vi sets the image of the XNode, which at the moment is just he icon from the template VI.  Play around and experiment with making different images, and setting terminal locations.  Good luck and if you come up with any neat XNodes please post them.

Message 7 of 12
(4,393 Views)

Thank you very much. it will help me alot. Definitely i will post if i am able to create or edit new XNode:smileyhappy. :):)

0 Kudos
Message 8 of 12
(4,372 Views)

Here (attached VI) is new image of Add xnode. how could i change the name of xnode as Subtract Xnode.xnode. I tried to change the name as subtract but doesnot work.i also tried to create the subtract Xnode.xnode using Xnode Manager LLB but all my trying went wrong. Is there any steps that i need to follow?. Actually i took a blank xnode provided by lava forum, renamed it as Subtract Xnode.xnode, then i build some abilities vis and added  them in xnode XML like:

    </Item>
    <Item Name="Bounds.vi" Type="Ability VI" URL="../Bounds.vi">
     <Property Name="NI.XItem.Name" Type="Str">Bounds</Property>

 

how could i use blank xnode LLB to create a new one?

 

 

0 Kudos
Message 9 of 12
(4,318 Views)

That's nice and all but you didn't attach the XNode, only the VI.  In any case you can rename an XNode without needing the special NI license.  Just open it in LabVIEW (File >> Open) then perform a File >> Save As... and select rename.  You'll then need to resave all the VIs in the XNode library because of the name change.

 

And please do post your XNode (in a zip with all the files needed) so others can see what you've done.

0 Kudos
Message 10 of 12
(4,277 Views)