I'm new to the codesys and to forge.
I'm searching a way to open the numpad with ST code and given the value to be overwritten and the min and max value is may be.
It's being a while i searching for it . but still doesn't find it
Now i can open the dialog with the values 'min' 'max' in it ( see image), but i'm stuck with 1 problem, and this is write the value parameter.
Anyone who can help?
First of all you really should not use GetNextClient and OpenDialog.
This can cause real issues when incorrectly accessed, in the worst case an exception stopping the whole application.
Could you help me understand what you are trying to do and why you want to open the numpad from IEC and not by a mouse click?
Thanks a lot
I'm programming now an HMI of a machine
I used to do it with a mouse click, and this was a lot easier. Now I have written a function where I can block the parameter of the machine (as administrator) on long-click the parameter and on short-click change the parameter. so now this has to be done via code
can you help me further? how to do it right? as it should
First of all sorry to disappoint you here.
There is no clean API which you can use to open a numpad/keypad from IEC.
You can of course open your own dialog, but then you would have to do the parsing of inputs etc yourself...
I raised an improvement to address your use case.
Apart from this, I think you could also achieve this with the attached example.
One known limitation of the example is that the numpad will be opened when you leave the visualization with the mouse. That is dont ideal, but that can be solved as well (e.g. closing all numpads when the lock is active etc).
Thank you very much for you answer. You have certainly helped me further.
I keep looking for the final result.
Log in to post a comment.