10-16-2019 07:15 AM
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.
Solved! Go to Solution.
10-16-2019 07:20 AM
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?
10-16-2019 07:53 AM - edited 10-16-2019 07:55 AM
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.
It's also possible to associate the Enter key to the Apply button, however I don't recommend it.
10-16-2019 08:05 AM
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.
10-16-2019 08:09 AM
@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.
10-16-2019 08:12 AM
Thank you pincpanter.
When I get to lab I will try it.
10-16-2019 08:24 AM
@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.
10-16-2019 08:47 AM - edited 10-16-2019 08:50 AM
@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.
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).
10-16-2019 09:07 AM
@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.
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.
10-16-2019 09:40 AM