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.
- Editor will have two modes.
- Custom controls will be saved with .ctl extension.
LabVIEW Example: Custom Push Button
- Before customizing in LabVIEW prepare the images for both false and true case.
- I have taken an example for stop and start control with size of 50 *50 px.
- Open LabVIEW, take a push button and make the width and height as 50.
- Select Advanced -> Customize.
- Change to Customize mode.
- Select the LED and set the width and height as 0, since its not used here.
- Select the shadow behind the button and set the width and height as 50.
- Now right click the button and select import picture from file and select the image.
- Change to edit mode.
- Change the state of the button to true.
- Now again right click the button and select import picture from file and select the image.
- 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.