Value field
The value field shows a tag value in a given format with units, and with “Input” on it accepts a setpoint from the operator, like the IO field in WinCC. The “Input from / to” limits keep the value within the range, the high and low limits color the background, and “Background by value” sets the color by thresholds. String tags can be entered hidden (a password, a code).
Writing checks the user’s rights and the tag’s protection. A tag with an electronic signature asks for the password and a reason.
Properties
Section titled “Properties”Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:
| Property | Values | Default | Description |
|---|---|---|---|
Tag |
tag name | Tag | |
Format |
text | 0.0 |
Format. How many decimals and how to write the number |
ShowUnit |
true / false |
true |
Show units |
Unit |
text | Units. Own units (°C, bar, rpm); empty — the tag’s units | |
InputMin |
number | Input from. Smallest value the operator may enter; empty — no limit | |
InputMax |
number | Input to. Largest value the operator may enter; empty — no limit | |
Writable |
true / false |
false |
Input. The operator can change the value (setpoint) — if rights and tag protection allow |
BackgroundRules |
text | Background by value. “threshold:colour” pairs separated by “;”, for example 0:#F2F3F4; 50:#F9C800; 80:#D32F2F. The colour of the highest threshold not above the value is used; below all thresholds the normal colour applies | |
Prefix |
text | Text before value. For example «P =» or «Setpoint:» | |
Password |
true / false |
false |
Masked input. For string tags: show asterisks (password, code) |
HighLimit |
number | Upper limit. Above — background in high-limit color | |
LowLimit |
number | Lower limit. Below — background in low-limit color | |
HighLimitColor |
#RRGGBB |
#F5B7B1 |
Color above limit |
LowLimitColor |
#RRGGBB |
#AED6F1 |
Color below limit |
FlashOutOfLimits |
true / false |
false |
Flash beyond limit |
FontFamily |
text | Font. Windows font name: Segoe UI, Arial, Consolas, Tahoma; empty — default | |
FontSize |
number | 18 |
Font size |
Bold |
true / false |
false |
Bold |
Italic |
true / false |
false |
Italic |
Underline |
true / false |
false |
Underlined |
Foreground |
#RRGGBB |
Text color. Empty — default | |
Alignment |
Left, Center, Right |
Right |
Alignment |
VerticalAlignment |
Top, Center, Bottom |
Center |
Vertically |
Background |
#RRGGBB |
Background. Empty — default | |
BackgroundStyle |
Solid, VerticalGradient, HorizontalGradient, Transparent |
Solid |
Background fill. Solid, gradient (3D) or transparent |
Background2 |
#RRGGBB |
Second background color. For gradient; empty — lighter than background | |
BorderColor |
#RRGGBB |
Border color. Empty — default | |
BorderWidth |
number | 1 |
Border width. 0 — no border |
BorderStyle |
Solid, Dash, Dot, DashDot |
Solid |
Border style |
CornerRadius |
number | 0 |
Corner radius |
Padding |
number | Padding. From border to text; empty — default | |
Shadow |
true / false |
false |
Shadow |
FlashBackground |
true / false |
false |
Flash background. Background alternates with the flash color; to switch by tag — use property animation |
FlashBackgroundColor |
#RRGGBB |
#D32F2F |
Background flash color |
FlashForeground |
true / false |
false |
Flash text |
FlashForegroundColor |
#RRGGBB |
#FFFFFF |
Text flash color |
FlashRate |
Slow, Medium, Fast |
Medium |
Flash rate |
From scripts
Section titled “From scripts”Item.Type = Value. Any property is read and changed by name: Item.HighLimitColor = "#D32F2F". The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Actions of this element:
| Member | Description |
|---|---|
OpenInput() |
Open the input window like an operator click (input limits, rights, the “Value change” event) |
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions). Its own events:
- Value change (
Change) — The operator entered a new value.
Examples
Section titled “Examples”An “Enter setpoint” button opens the same input window as a click on the field.
Screen.Items("Setpoint").OpenInput();A check after input — the field’s Value change event: the new value is already in Item.Value.
if (Item.Value > Tags("Tank1.Max").Value * 0.9) HMI.ShowMessage("The setpoint is close to the tank maximum");A read-only field in Auto mode.
Screen.Items("Setpoint").Writable = Tags("Mode").Value === 0;