LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When you change a value you have to press Enter to make this change

Solved!
Go to solution
Highlighted

Hello,

 

My problem is that when I change value in control box it change automatically. I tried it with event structure but whole loop was waiting for that. But I need continual running loop for communication with generator ( if it waits for this event it will say connecion error). In attachment you can see program without event structure. What i precisely need is when you change value in "Incident power SP" you will have to press ENTER to confirm this change.

 

I hope it is understandable. 🙂

Thank you in advance. 

0 Kudos
Message 1 of 14
(592 Views)
Highlighted

I'm sorry but I don't understand.

 

What do you mean "you have to press enter"?  Why would you want a control to update without having to hit enter?  (You can do that for strings.)  It means it would use a value that you may not have fully entered yet.

 

I don't know why you couldn't use an event structure or why that would cause a connection error.  Did you try using a timeout case for the event structure?

0 Kudos
Message 2 of 14
(584 Views)
Highlighted
Solution
Accepted by topic author kostijak

Your control will output the new value as soon as you change it.

However, you may put your active value in a shift register and use a button to apply the new selected value.

The shift register value would not change until you press "Apply". See the example.

example.png

It's also possible to associate the Enter key to the Apply button, however I don't recommend it.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
Message 3 of 14
(556 Views)
Highlighted

For example I set it for 10W, but I will need change it to 100W, but I will accidentally write 1000W, so it will broke generator in better case. It is for safety. 

This generator need some flow of data on time. So if you slow down flow of data it will say connection error. It is doing same when I want to see flow of data (lighting bulb) it will stop working.

0 Kudos
Message 4 of 14
(538 Views)
Highlighted

@kostijak wrote:

For example I set it for 10W, but I will need change it to 100W, but I will accidentally write 1000W, so it will broke generator in better case. It is for safety.


If value safety is all you are concerned about, you can right-click on the control and choose "Data Entry".  This will pop up the control properties with the tab to allow you to set ranges that can be entered into the control.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 5 of 14
(530 Views)
Highlighted

Thank you pincpanter.

 

When I get to lab I will try it. 

0 Kudos
Message 6 of 14
(529 Views)
Highlighted

@crossrulz wrote:

@kostijak wrote:

For example I set it for 10W, but I will need change it to 100W, but I will accidentally write 1000W, so it will broke generator in better case. It is for safety.


If value safety is all you are concerned about, you can right-click on the control and choose "Data Entry".  This will pop up the control properties with the tab to allow you to set ranges that can be entered into the control.


Well it is not that simple, this generator generates microwave and it is used in healthcare, so you need to be careful when you changing power, it’s not about range, but it’s about value. Better example need 10W but I write 100W. I am mowing in rage 0-200W. I will definitely use this to reduce range only for that interval.

thank you for your idea.

0 Kudos
Message 7 of 14
(523 Views)
Highlighted
Solution
Accepted by topic author kostijak

@pincpanter wrote:

Your control will output the new value as soon as you change it.

However, you may put your active value in a shift register and use a button to apply the new selected value.

The shift register value would not change until you press "Apply". See the example.

example.png

It's also possible to associate the Enter key to the Apply button, however I don't recommend it.



I think this is the simplest way to do it.

And if you still insist to associate the Enter (Return) key to apply the new input, maybe you can add 2 button dialog for extra safety, in case the Enter key is pressed by accident. Or even safer, add a new window requesting for confirmation by typing "Yes" or something.

 

Since it's something critical, you should also consider how the user will know if the used value and the displayed one is different (Enter is not pressed yet).

0 Kudos
Message 8 of 14
(508 Views)
Highlighted

@Gabriel92 wrote:

@pincpanter wrote:

Your control will output the new value as soon as you change it.

However, you may put your active value in a shift register and use a button to apply the new selected value.

The shift register value would not change until you press "Apply". See the example.

example.png

It's also possible to associate the Enter key to the Apply button, however I don't recommend it.



I think this is the simplest way to do it.

And if you still insist to associate the Enter (Return) key to apply the new input, maybe you can add 2 button dialog for extra safety, in case the Enter key is pressed by accident. Or even safer, add a new window requesting for confirmation by typing "Yes" or something.

 

Since it's something critical, you should also consider how the user will know if the used value and the displayed one is different (Enter is not pressed yet).


You have a point I will have to find it out. But you were a big help. Thank you very much. 

0 Kudos
Message 9 of 14
(491 Views)
Highlighted

If it was the example that helped you, you might want to give the solution to pincpanter who posted it.


GCentral
0 Kudos
Message 10 of 14
(476 Views)