LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update Numeric Value While Typing

I've got a problem retrieving values from a numeric control:

I've got a popup window where a user must enter numeric values. When switching from one numeric field to another field everything goes ok(all values are updated). But when I go the last field and enter a value and then click a button to end and close the popup-vi, the last entered value is not updated.

When replacing the numeric controls with strings and enable �update value while typing�, I do get the values when clicking on the button to stop the popup-vi.

So my question is: Can I reproduce the string behavior(update value while typing) for numeric controls? So the last known value is saved when he loses focus.

The LabVIEW version is 6.0.2

Thank you!

---

Arnoud Ringoir
0 Kudos
Message 1 of 6
(4,888 Views)
The way I got around this is to make the enclosing loop go round one more time. If you make the STOP signal go through a shift register, and wire the input from the shift register to the loop control, then this has the effect of reading and processing all the inputs before the vi exits.
Yours Sincerely
John www.tradersmicro.com
0 Kudos
Message 2 of 6
(4,888 Views)
Thank you for your reply, I thought about it, but that way i had rebuild my whole vi. I jumped into the properties of the numeric controls and i found a way to work around it:

For every numeric control there must be an extra 'helper' control to send the data to(create a reference of the numeric text). And from the helper, the data is sent back to the orignal control. This way it is updated. I attached an image, so you can see how it is done.
Message 3 of 6
(4,888 Views)

I did this to correct my issue. I got the idea from this post and this one. I attached the VI from that post also.

 

I created a property node for the control "Signal Duration" called "Text" and feed it to Scan From String. The output is feed to the local variable of "Signal Duration". This is done in my first state.

State 1.PNG

 

 

 

In my next state, I just wired the "Signal Duration" control directly to my other wires.

State 2.PNG

 

The FSM goes back and forth between Check Start Button and Read Inputs... It updates perfectly without glitches. I tried putting the property node in Read Inputs state, but when the FSM went back to Check Start Button, the control was glitchy and set itself to zero. It then set itself again to the number I wanted. It did this back and forth and wasn't very appealing.

 

 

To get the NumText.Text property node, just right click the control you want and follow the picture I posted below:

Create>Property Node>Numeric Text>Text

How to get NumText.Text.PNG

Message 4 of 6
(4,259 Views)

I'm curious, why would you respond to an 8 year post. I am quite sure th eperson has either resolved their issue or could care less by now.

 

And an event structure is much more efficient for handling changes to the UI. It avoids polling which is unnecessary processing.



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
Message 5 of 6
(4,247 Views)

I post my solutions to the same problems because most people don't show step by step instructions. I spent an hour trying to figure out how to do get the "NumText.Text"!!!

The more solutions the better, especially if they are detailed like mine is. I found this post very useful after 8 years, so why not improve it so in 8 years someone else can have an easier time then I did.

I don't know about event structures. Never used them. If at some point I have a need for them, I will use them, once I figure out what they do.

 

Cheers Mate

Message 6 of 6
(4,243 Views)