Skip to content

Shift log

The shift log replaces the paper logbook at the control desk. The operator writes on the screen what happened during the shift: a remark, a repair, a switching operation, a shift handover. Each entry gets the time and the logged-in user’s name, is kept on the server, and is visible in every operator client and browser.

As in a paper logbook, an entry cannot be edited or deleted; a correction is written as a new entry. Every entry also goes into the hash-chained audit log, so history cannot be replaced unnoticed.

Settings:

  • Book is the log name. “Boiler house” and “Instrumentation” have their own entries, and views of the same book on different screens show the same thing.
  • Categories are the choices in the drop-down list for a new entry.
  • Show, days sets how many recent days are visible.

Writing needs the “Operate” right, plus the element’s own right if one is set. Without “New entry” the log is read-only, for example on a shift supervisor’s overview screen.

Entries are kept on the server in the shiftlog.db file (%ProgramData%\Scadora). Ctrl+Enter in the entry field records the entry.

Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:

Property Values Default Description
Book text Смена Book. Log name: entries with the same book show in all its views
Categories text Categories. Entry categories separated by “;”; empty — no categories
Days integer 3 Show, days. Entries for this many recent days
AllowAdd true / false true New record. A field for a new entry at the bottom; without it the log is read-only
RefreshSec integer 15 Refresh, s. How often to show other people’s new entries
FontSize number 12 Font size

Item.Type = ShiftLog. Any property is read and changed by name: Item.FontSize = 10. The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.

Actions of this element:

Member Description
Entries() Entries on screen — Time, User, Category, Text
Write(category, text) A new entry on behalf of the user
Refresh() Reload entries from the server

Mouse, hover, focus and keyboard — as for any element (see Events and functions).

Automatic entry when equipment starts, in the Start button’s event.

Screen.Items("Log").Write("Switching", "Pump P-2 started, pressure " + Tags("P2.Pressure").Value + " bar");

Remind about the shift handover if there was none in the last 12 hours.

var since = Date.now() - 12 * 3600 * 1000;
var handover = Screen.Items("Log").Entries().filter(function (e) {
return e.Category == "Shift handover" && e.Time.getTime() > since;
});
if (handover.length == 0) HMI.ShowMessage("Remember to record the shift handover");