Pump (simple)
The simple pump is a flat icon colored by the state tag (running by a condition, TRUE or greater than zero by default) and the fault tag, with a label below. The “Rotation” property (0, 90, 180, 270°) sets where the outlet points; the label does not rotate.
For new screens the equipment symbol is handier: the symbol library has dozens of pumps and other equipment with 3D look, rotation and fill.
Properties
Section titled “Properties”Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:
| Property | Values | Default | Description |
|---|---|---|---|
StateTag |
tag name | State tag. Running / open — by the condition below (empty — TRUE or greater than zero) | |
RunCondition |
text | «Running» condition. Empty — TRUE or greater than zero. «= 3», «<> 0», «> 5» — comparison; «2..5» — range; «1;3;5» — one of the values; «bit 3» — word bit; «js: value == 3 || value == 5» — JavaScript expression | |
FaultTag |
tag name | Fault tag. Bool: fault (optional) | |
Label |
text | Label |
From scripts
Section titled “From scripts”Item.Type = Pump. Any property is read and changed by name: Item.Width = 200. The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions).
Examples
Section titled “Examples”Running by a mode code: the pump counts as running when the mode is 2 or 3.
Screen.Items("Pump1").RunCondition = "2;3";State in a message — the pump’s state tag is in StateTag, not Tag.
var p = Screen.Items("Pump1");if (Tags(p.FaultTag).Value) HMI.ShowMessage(p.Label + ": fault");