Create a Custom Control in LabVIEW

By Ralph - Last updated: Wednesday, March 19, 2008

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.

Filed in LabVIEW • Tags: , , , ,

VI Geek – My New Tech Blog Start Now

By Ralph - Last updated: Monday, March 17, 2008

I have been in the industry of Virtual Instruments for over 10 years, and dedicated in the development of Virtual Instruments systems for over 7 years. The first time I touched the concept of PC based test system is at the year of 1998. At that year, I established a PC based optical fiber light power dynamic acquisition system,  which use a notebook with a PCMCIA DAQ card to acquire the light power when the optical fiber is in a dynamic  movement status. The PCMCIA DAQ card was from IOTech, which is now a part of the NI. At that time, the  concept of Virtual Instruments was not very popular.

Since then, I was very interested in this area. And, luckily at the year of 2001, I began to work for one NI Alliance company as a software engineer, and after that company, I worked for another NI Alliance & Reseller.  At the beginning, I used the LabWindows/CVI version 5.5 to build custom VI systems (PC based test and control systems) for customers, and later I began to use LabVIEW  to build custom VI systems for customers.

Today I establish this blog site to share my experience and knowledge with everyone who is also interested. Hope I can learn a lot more here.

Good luck!

Filed in Misc
Pages: Prev 1 2 3 4 5