LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a custom control (combination of controls)

Is there a way to create a "custom" control?

I want to make a control that, on the front panel, consists of a numeric indicator and 3 boolean indicators. It should look like items contained in the right box of Image 1.

The control should also have 3 inputs, Vin, Vlow and Vhigh and function as per block diagram in Image 2.

These inputs will be connected in the main application.

I'm hoping labview allows for a straghtforward way to do this... I will later need to create multiple instances of this new control in my main application.

 

Image 1:

FrontPanel.jpg

 

Image 2:WiringDiagram.jpg

 

Thank you,

 

Boris.

0 Kudos
Message 1 of 5
(4,561 Views)

This sounds like a job for X-controls.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 5
(4,560 Views)

You could create a sub-vi that takes your inputs and the output could be a cluster with the indicators you want.  You could make the sub-vi reentrant depending on how many voltages you are monitoring.

 

Xcontrols sound like they would work, but I have never created one.  But if you have the time to learn how, give them a try.

0 Kudos
Message 3 of 5
(4,531 Views)

I have never used XControls except for attempting to make them for forum posts.  So I'm sure there are a lot of improvements to make to this.  But it may help get you started.  If you drag the XCTRL file onto your front panel, you will see the control layout.  On the block diagram, you will see a cluster control which contains the values for VHIGH and VLOW.  Update that cluster with your limits and you should see the booleans light up as you change the value.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 5
(4,516 Views)

You've got suggestions here on different ways to approach this.

 

Depending on how flexible you want this to be, you can just put together a cluster and have it update the values when changed using an event structure (the quicker way to put together XControls if you don't really need that solution).

 

A simple subVI handles the actual calculations and updates the cluster.  You're finished.

 

Any control/indicator can be saved as a ctl file to be used elsewhere.  You can look into that for typedefs if you want to be a bit more strict about what happens with the control in your application.

 

Really though, are you sure you want to be grouping controls and indicators into a single element?  There are definitely use cases where you want to programatically modify an input (which is what you'd end up doing here).  But, most cases make more sense keeping the inputs and outputs in different elements.

0 Kudos
Message 5 of 5
(4,505 Views)