Create a Custom Control in LabVIEW

By Ralph - Last updated: Wednesday, March 19, 2008 - Save & Share - 2 Comments

Sometimes, the built-in controls or indicators are not enough for our applications. Then we must use custom controls and indicators to extend the built-in set of front panel objects of LabVIEW. We also can save the custom control or indicator you created in a directory or LLB and use the custom control or indicator to other applications. And we also can create an icon for the custom control or indicator and add it to the controls palette.

Here, I’ll show how to create a custom Boolean indicator. The built-in Boolean indicator in LabVIEW is an LED lamp, but in some condition, it is not appropriate. Under conditions like to display the results of hardware, it is not a good idea to use the built-in LED lamp with the red lamp to indicate fail and green one to indicate success. If we use the symbols below to display the results, it’ll be much better.

custom-icon.PNG

Here, I’ll show how to create such a Boolean indicator in LabVIEW.

First, put a Boolean indicator on the front panel, then use mouse right click it, in the pop-up menu, select Advanced, Customize… like below:

first-step.PNG

Then, we are in the Control Editor Window. The Control Editor window toolbar indicates whether you are in edit mode  or in customize mode. The Control Editor window opens in edit mode. Click the Edit Mode button to change to customize mode. Click the Customize Mode button to return to edit mode. Here we switch to Customize Mode, like below:

 

second-step.PNG

 After that, we must place a copy of the graphic in the clipboard. You may put the custom graphic in some kind of graphic editor, select it and use mouse right click it and select Copy to Clipboard. Then right click the LED lamp and select Import Picture from Clipboard, like below.

 

step-three.PNG

Do the same again with another status. It’s quite simple. After all above done, we get the custom indicator, then use menu File–Save to save it. If we put it on the front panel, it’ll like the picture below:

 final.PNG

 We can use it on other panels as well too.

It’s a very simple control. Some complicated controls can also be created in LabVIEW, for more information, you can click this link to study more on the NI website.

No related posts.

Posted in LabVIEW • Tags: , , , , Top Of Page

2 Responses to “Create a Custom Control in LabVIEW”

Comment from dover
Time July 28, 2008 at 1:42 am

can labview handle strip animations as controls, ala synthedit…. or is it impossible?

Comment from Ralph
Time July 28, 2008 at 9:38 am

As I know so far, it is not possible to use animations to boolean control. But, there is some kind build-in control in LabVIEW called Pict Ring, you can use it with a little programming to create an animation.

Write a comment