Custom Control in LabVIEW

In LabVIEW, we have a set of built-in controls and indicators to use. We can also customize controls and indicators as per our requirement and save them to use in our applications. These can also be used as normal LabVIEW front panel object.

  • I have selected push button for example. Customize the button by right clicking and select Advanced ->Customize.

Control editor[Push]

  • Editor will have two modes.
    1. EditEdit Mode
    2. CustomizeCustomize mode
  • Custom controls will be saved with .ctl extension.

LabVIEW Example: Custom Push Button

Start & Stop

  1. Before customizing in LabVIEW prepare the images for both false and true case.
  1. I have taken an example for stop and start control with size of 50 *50 px.
  1. Open LabVIEW, take a push button and make the width and height as 50.
  1. Select Advanced -> Customize.
  1. Change to Customize mode.
  1. Select the LED and set the width and height as 0, since its not used here.
  1. Select the shadow behind the button and set the width and height as 50.
  1. Now right click the button and select import picture from file and select the image.
  1. Change to edit mode.
  1. Change the state of the button to true.
  1. Now again right click the button and select import picture from file and select the image.
  1. Save the file and close. While closing replace original with yes.

Custom TypeDef button:

TypeDef control can be done by changing control type from Control to TypeDef. If any change is done in control, it will be updated in all the instances of the control inside VI.

Reference:

Customizing Custom Controls, Indicators and Type Definitions

Leave a Reply