LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add preconfigured expression node to function palette?

Solved!
Go to solution

Is there a way to add a custom preconfigured expression node to the funtion palette?

 

Labview offers a couple of these (such as radians to degrees and degrees to radians) in the NI_AngleConversion.lvlib.  I can bring up the quick drop palette, type rad to deg and click in my block diagram to get this:

 

rad_to_deg_snippet.png

 

I looked at the VIs in that library and tried to configure a custom library for myself in the same way but have not had much luck.

 

I CAN add them to the library, but I have to wire the connection terminals get a standard square VI icon in my block diagram when I try to use it.

 

However, I really like the compactness of the Expression node on my block diagram and don't want the VI's icon to be used.  I just want a preconfigured expression node to appear that looks like this:

 

feet_to_meters_snippet.png

 

Does anyone know if this is possible?

 

Thanks,

-Randy

 

0 Kudos
Message 1 of 6
(3,739 Views)
Solution
Accepted by topic author rbyers

You can place VI contents from items on the palette.

 

Read this.   (note: link changed, see below)

 

 

Also, you can make it a subVI.  It doesn't have to be a square icon.  You can make your icon smaller with by using a smaller box on your icon.  Leave the outer pixels of the icon blank.

 

For something like a basic trig calculations, I think you are better off using LabVIEW primitives and using a subVI.  Just make the icon smaller.

Message 2 of 6
(3,736 Views)

Thanks for the prompt reply.  It doesn't give me exacly what I hoped for as the expression node is wider than the icon and can visually show you the conversion without opening up the sub-VI, but it is certainly an acceptable alternative.

 

Thanks again!

-Randy

0 Kudos
Message 3 of 6
(3,704 Views)
Solution
Accepted by topic author rbyers

@rbyers wrote:

It doesn't give me exacly what I hoped for as the expression node is wider than the icon and can visually show you the conversion without opening up the sub-VI


But it doesn't have to be a subVI. Read RF's link. When you do that LV drops the actual code inside the VI instead of the VI itself (which is most likely the same mechanism that those preconfigured expression nodes use too).


___________________
Try to take over the world!
Message 4 of 6
(3,605 Views)

Thanks tst and RF!!

 

By following the initial link in RF's post, I got exactly the result I was looking for.  I'm not sure what I did wrong the first time but it is now working perfectly.

 

 

0 Kudos
Message 5 of 6
(3,551 Views)

This link is dead. I know this thread is ancient, but I'm adding the updated link here so people like me who came here from a search engine can have the correct answer!

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2PkCAI&l=en-US 

Message 6 of 6
(1,952 Views)