A Text Field is either a display field, an entry field or both.
It contains an embed caption and a display area.
On the HMI grid, add a Text Field:
or
Entry Field
Check and .
Click on and write Speed on the text field for Caption. Check . .
Click on and write 120 on the text field for Caption. Check . Select a Red color. .
In the Runtime panel, put the following code:
// ... user code
printf("%f\n", atof(val));
|
Compile and Run:
Click on the text field, close to 120, to change the value. A little cursor appears.
Use backspace key to erase and write 130.
Then press Enter.
The new value is printed on the console.
Display Field
Uncheck .
Check and select 1 hz
On the Definition panel, put the following code:
On the Initialization panel, put this code:
On the Runtime panel, put that:
Compile and run: