PamaglaweUser and project guide
Pamaglawe · Objects

Display operating hours as a duration or decimal hours

The operating-hours display converts a numeric counter into a duration or decimal hours. The PLC supplies and advances the counter; this object neither counts time itself nor resets the PLC counter.

Help ID OBJ-HOURS13 original screenshotsExample version 2.61.503

1. Insert the display

In design mode choose Displays (Anzeigen) → Betriebsstd., place the object on the process page and double-click it to open its properties. The initial preview 01:01:00 means one hour, one minute and zero seconds. A preview does not confirm a PLC connection.

Select Displays → Betriebsstd.
The placed object shows caption Betriebsstunden and duration 01:01:00.

2. Set the general properties

Choose a unique name. Text / initial value contains the caption Betriebsstunden. The example uses X 20, Y 140 and 167 × 49 pixels. Leave enough width for long durations including days. Configure the counter’s input unit in the separate display dialog.

Configure unit and presentation through Anzeigeobjekt einstellen. No process variable is assigned yet.

3. Select the input unit and output format

Click Configure display (Anzeigeobjekt einstellen). Select Seconds, Minutes or Hours to match the PLC counter; the example uses Minutes. Duration displays HH:MM:SS and adds days from one day onward, for example 2 d 04:15:30. Decimal hours converts the counter into hours and appends h. Decimal places accepts integers 0–6 and affects decimal hours only. Examples: 61 minutes or 3660 seconds → 01:01:00; 90 minutes → 01:30:00 or 1.5 h with one decimal place; 25 hours → 1 d 01:00:00.

Apply.

Input unit Minutes, duration output and one decimal place for the alternative decimal output.

4. Format the text

Open Format text. The screenshot uses the system font, size 20, color #f1f5f7 and left alignment. Choose font, size, color, alignment, bold or italic using the preview, then Apply.

Configure font, size, color and alignment.

5. Add the counter symbol

Click Symbol → Edit table. Add a row or duplicate a suitable row and edit all relevant fields: device Modbus_Testserver, symbol Anlage_Betriebsstunde, address 40010, simulation value 90, UINT16, length 1 register, Holding Register. The example connection is 127.0.0.1, port 502, unit ID 1. Duplicate Anlage_Ampel in the exercise. The symbol name intentionally has no final n. Set unit min and description Betriebsstunden Anlage in Minuten. UINT16 holds at most 65,535 minutes, about 45.5 days.

Larger counters need a larger PLC data type and matching register length and address allocation. Validate the table, save it and close the editor. Use a free, appropriate address in your own project.

Eight earlier symbols are present. Add a separate operating-hours entry.
Anlage_Ampel is used as the template for the new row.
Nine valid rows: Anlage_Betriebsstunde uses address 40010, UINT16 and unit min.

6. Assign the counter

Select the prepared symbol in the communication table, check the symbol information and click Apply at the bottom right. Device, IP address, symbol, physical address, data type and register information are copied together. Apply the object properties and save the project. Read access is sufficient for this display. Reopen Configure display and confirm Minutes and Duration. The table unit min does not replace this display setting.

Direct Modbus TCP, 127.0.0.1:502, unit ID 1, Holding Register 40010, FC 03/06 and UINT16 with one register.
Properties now contain Modbus_Testserver, Anlage_Betriebsstunde and address 40010.

7. Test 90 minutes

In project settings select No communication driver – simulation only (Kein Kommunikationstreiber – nur Simulation). Save the symbol’s simulation value in the communication table and start test mode with F5. Since version 2.61.503, saved table values are loaded when Play starts in this mode. For each new test, leave test mode, edit and save the table value, then start Play again. No external Modbus server is needed. With a communication driver selected, the connected source supplies the value; editing a simulation value does not write to a PLC.

The result must be 01:30:00. This workflow was confirmed with 2.61.503; in 2.61.502 the preview could remain visible.

No communication driver – simulation only is selected for this test.
Confirmed test: 90 minutes displays as 01:30:00. The traffic light shows red and yellow for its table value 3.

8. Display decimal hours

Leave test mode and open Configure display. Keep input unit Minutes; select Decimal hours and 1 decimal place. Apply both dialogs, save and restart F5. The same table value 90 now appears as 1.5 h; only the output format has changed.

The same 90-minute value displays as 1.5 h with one decimal place.

Common questions

If 01:01:00 remains, check the saved value, symbol, simulation-only mode and version, then restart Play. The data source must advance the counter. Incorrect durations usually indicate an incorrect input unit. Decimal places do not affect whole-second duration output. A nonnumeric value appears as —; negative values are limited to zero for time display. Resetting must be implemented by the controller or a separate operating function.

Keyboard shortcuts

Apply or close property dialogs, select objects on the canvas and leave any active text field before using an object shortcut.

Delete — delete selection
Deletes selected simple objects without another confirmation. Check the selection first.
Ctrl+Z / Ctrl+Y — undo / redo
Undoes or restores an available object edit. This is not a recovery mechanism for deleted pages or files.
Ctrl+C / Ctrl+V — copy / paste
Copies the selection and inserts an offset copy. Check names and process assignments afterward.
Ctrl+X — cut
Copies objects to the internal object clipboard and removes them from the page. Paste with Ctrl+V.
Ctrl+A — select all
Selects unlocked objects on the current page.
Arrow keys — move precisely
Moves the selection one pixel in the chosen direction within the page bounds.
Shift+Arrow — next grid position
Moves the selection in the grid direction using the page grid spacing.
Ctrl+L / Ctrl+Shift+L — lock / unlock
Locks the selection; Ctrl+Shift+L unlocks all locked objects on the current page.
Esc — end editor action
Cancels an action such as placement or clears the current selection.
Ctrl+S — save project
Saves applied changes. Save again after deleting, moving or copying.

The fixed global alarm area cannot be deleted or copied. Structural objects with assigned contents can ask an additional question about those contents.

Image viewer
Screenshot preview