From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom numeric control values, uneven increments

Hi, I want to create a numeric control with some custom behavior, so that I can use it in several VIs without copying the logic. I have the basics working in the attached VI, but I don't see a way to use it in another VI. Basically, I have a regular numeric control, but I want its values to be constrained to a finite set of legal values in non-linear increments; and when a user types in a value it gets coerced to one fo the legal values.

 

custom frequency control.PNG

 

Is this possible to implement as a sort of custom control?

0 Kudos
Message 1 of 3
(2,262 Views)

I would recommend that you take at look at turning this into an X-Control. X-Control are custom controls that actually have processing associated with them. Once written, the control looks like a simple terminal on the block diagram but in reality there can be a fair amount of processing that takes place under the hood.

 

Fair warning though, X-Controls can be tricky to get working. However, they are extremely powerful.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 3
(2,255 Views)

Hi Mark, thanks for the quick reply. It does seem that an XControl is what I want to use. My only trouble now is that I'm working on a client's Full Development version of Labview, and XControl authorship requires the Professional Development version.

 

Is there another -- perhaps less elegant -- way to get my VI version of the control to be reusable in other VIs?

 

Thanks!

Arthur

0 Kudos
Message 3 of 3
(2,251 Views)