Input validation for text field to get IP address

Hello everyone:
First: in my URCaps, UR robots need to use MODBUS-TCP to communicate with my remote device. So you need to set the IP address of the remote server. How do I need to design the input control to make it the same as in the MODBUS client?

Second: in my URCaps, I used the select control, and in the installation configuration, every time I click URCaps, the UR robot prompts me to save it. What should I do to solve the problem?

@jbm How can I conserve this?

Hi @alvinhuang

Input validation is in the current API (SDK 1.1) limited to control min, max and step for integer variables.
In this respect, to control an inputted IP address, I would suggest to check the input after the user has inserted it (in the ON_Change event callback), and show a label next to the input field, if the IP address is invalid.

The Save option will become activated whenever you make changes to the DataModel.
Hence, check the event callback, to see when this is written.
Also note, that the Select Event is triggered whenever you add new items to the select. Hence you may want to have a “populate select mode”, where the input is not saved. And when you are done populating, you switch back to “user input mode”, where the user changes are stored correctly.