Polyline – shape and state colors
Draw a right-angle polyline, add an end arrowhead and control its color with a dedicated process symbol.
1. Draw the polyline
- Select Structure → Polyline.
- Click the starting point, then the desired corners. Segments run horizontally or vertically and snap to the page grid.
- Finish by double-clicking the last point. Alternatively, Esc or a right-click finishes the path using points already placed.
At least two points are required. The example goes right, down and right again. The entire polyline is one object. It does not automatically connect to other objects, so its endpoints do not follow a neighboring symbol. The original screenshots show the German interface.
2. Object properties
The example uses Start X = 40, Start Y = 150 and transparency 100. Use Assign area to assign the polyline to a tab, collapsible area or scroll area.
The process variable and five comparison values will determine the color state. First open Polylinie einstellen (configure polyline).
3. Configure style, arrows and colors
The shared settings dialog is headed Linie / Pfeil einstellen (configure line / arrow) in the screenshot. Its preview displays the polyline bends.
- Thickness: 4 px in this example; the allowed range is 1 to 30 px.
- Line style: solid (Durchgezogen); dashed, dotted and dash-dot styles are also available.
- Start arrowhead: off; end arrowhead: off in the current screenshot; enable it if an arrow is required.
- Color change via process value: on.
When process-based coloring is enabled, the state colors are used and the single line color is disabled. Turn it off to use a fixed line color. Polyline direction follows the order of its drawn points. The generic rotation hint in the shared dialog refers to the line object; the polyline properties shown here have no rotation field.
The flow animation controls are explained in section 8. The current screenshot shows reversed flow at 40 px/s with the On-state restriction disabled. Earlier screenshots below demonstrate the state colors before this extension was added.
4. Add a dedicated process symbol
- Click Symbol to open the communication table, then Tabelle bearbeiten (edit table).
- Use + Zeile (add row) to add the entry below. In this example, the table grows from 15 to 16 symbols.
- Validate and save the table, then close the table editor.
- Select Anlage_Poly-Linie and apply it to the object properties.
| Field | Example value |
|---|---|
| PLC / device | Modbus_Testserver |
| Symbol | Anlage_Poly-Linie |
| Address | 40017 |
| Simulation value | 0 |
| Data type / length | UINT16 / 1 |
| IP address / port / unit ID | 127.0.0.1 / 502 / 1 |
| Description | Steuerwort Poly Linie |
The symbol information shows Holding Register / FC 03/06. After applying the selection, check the device, symbol, address 40017 and UINT16. Anlage_Linie at address 40016 belongs to the earlier line example and is a different symbol.
5. Comparison values and state colors
Use these comparison values in object properties and the corresponding colors in the settings dialog:
| State | Comparison value | Color |
|---|---|---|
| Off | 0 | Gray · #C7D0D6 |
| On | 1 | Teal · #23BCA2 |
| Manual | 2 | Blue · #3B82F6 |
| Fault | 4 | Red · #D9534F |
| Maintenance | 8 | Yellow · #F7B731 |
Apply the settings and save the project. Colors indicate the reported state; an arrow is not a measurement of flow.
6. Check colors in test mode
Enable the local project simulator for this example and start test mode with F5. The Modbus connection must be online. Set the comparison values in turn at the assigned test register 40017.
The screenshots show off (0), manual (2), fault (4) and maintenance (8). The shape and end arrow stay the same while the entire polyline changes color. On (1) is configured as teal; this sequence does not include a separate test screenshot of that state.
7. Troubleshooting missing color changes
- Is color change via process value enabled?
- Is Anlage_Poly-Linie / 40017 assigned?
- Is the connection online and supplying the intended comparison value?
- Have the state colors and comparison values been applied?
Related guides: Line / Arrow and keyboard shortcuts.
8. Flow animation (from 2.61.512)
Open the polyline properties and choose Configure polyline. Enable Flow animation in Play mode. Moving bright dashes appear over the unchanged base line. Existing objects keep their previous appearance until this option is enabled.
- Reverse flow direction: reverses movement relative to the order in which the points were drawn.
- Speed: 5 to 200 pixels per second; default 40. This is visual speed, not a physical flow measurement.
- Move only in the On state: enabled by default. Assign the pump signal through the existing process variable and set its On/Off comparison values. Movement runs only while the mapped state is On. Off, Fault, Manual and Maintenance pause it.
Clear the On-state option for continuous movement in Play mode. Invalid communication still pauses the animation. The editor and dialog preview remain static. The animation is only a display effect and does not start a pump or write a control command.
Apply stores the object settings; save the project afterwards. Animation settings are retained when reopening the project. This feature is not included in the existing 2.61.511 demo package.
With the settings shown, the line moves continuously in play mode regardless of its assigned color state, as long as communication is valid. To show a pump running only when it is On, check “Only move in the On state”. Click Apply, save the project and start play mode (F5) to check the movement.