LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Chetan_G

Support basic math operations in numeric controls

FINAL PIC.png

I come across many situations where the value that needs to be entered into a numeric control is not readily available but has to be computed (For example: I need to enter the value 679.5/23.2 into the numeric control), then I would need the help of a calculator to compute this division answer, copy and past it back in the LabVIEW control.

 

So it would be good if we support basic math operations (+-*/^%) in the numeric control (and constants?) so that even if I enter 679.5/23.2 or 2^23 or 172857+3675 in the numeric control, it evaluates the math expression in edit time and assigns the value to the control. This would less than 5% of the time it takes currently in LabVIEW.

 

(One other option would be to change the code to accept 2 controls and use the division primitive. But this may not be feasible if the VI is built into an application or if the operation is a one time calculation that need not be repeated, or if the math operation that is done to calculate the input to the numeric is different each time,etc)

11 Comments
Pachi
NI Employee (retired)

I think this is a great idea. It's one of those things you can't prove a huge impact about, but it becomes one of those little things that make a UI awesomer.

Prashanth N
National Instruments
Rakesh_rocky
Member

I really like the idea. 

Bdev
NI Employee (retired)

To further improve this idea, I think we can simply integrate a calculator which comes up in the pop up menu of the Numeric control where we can do whatever numerical operation we want and a press a button in the calculator that will say "DONE" or "USE THIS VALUE". 

 

 

தமிழ்நேரம்
Member

I like the Bdev's Idea. Having the calculator poputated for numeric controls.

அன்புடன்
தமிழ் நேரம்
முதல் இந்திய ஆய்வுமெகபொப சிற்பி
சோதனைநிறுத்தம் சிற்பி
மற்ற சான்றிதழ்கள்
யாதும் ஊரே! யாவரும் கேளிர்!!

Knight of NI
SteveChandler
Trusted Enthusiast

I think this is a duplicate and not a variation. What am I missing?

 

Kudos anyway Smiley Very Happy

=====================
LabVIEW 2012


wevanarsdale
Member

This idea would be useful for numeric constants as well.  Perhaps the view could be toggled in edit mode to reveal the calculation.

SteveChandler
Trusted Enthusiast
Wevanarsdale, I am not sure if you are replying to me but the original idea specifies constants as well as controls.
=====================
LabVIEW 2012


tst
Knight of NI Knight of NI
Knight of NI

> I think this is a duplicate and not a variation. What am I missing?

 

This idea should be a lot easier to implement, since it only requires processing the typed expression into a numeric value (or discarding it if it's invalid). The other idea would require that the numeric be able to store the expression over time, display it, etc.


___________________
Try to take over the world!
SteveChandler
Trusted Enthusiast

The other idea does not say to store the expression or even to display it. I think that came up in the comments. I do like that enhancement.

=====================
LabVIEW 2012