IMDTouchKnowledge BaseShop main store

How-to

How to timestamp Weintek HMI alarm history

HMI and touchscreens Published 7 min read

Short answer

Timestamp the history with the panel's own real-time clock: save every event in the Event (Alarm) Log, retrieve the records with an Event Display, and set the clock from the panel's date and time setup or the documented settable system registers. The S7-1200 supplies the trigger bits only; its clock is not needed.

On this page
  1. What stamps an alarm when there is no PLC clock sync?
  2. How do you make the Event (Alarm) Log save records?
  3. Which object displays the saved alarm history?
  4. Why does the alarm bar work while the history stays empty?
  5. How do you set the panel's date and time?
  6. Why must the clock be set before the first alarm?
  7. How do you verify the history end to end?
  8. Questions asked

When a Weintek panel has no supported clock synchronization with the PLC — the case for an 8071 IP polled by a Siemens S7-1200 — the panel's own real-time clock is a complete timestamp source for alarm history. You save the events in the Event (Alarm) Log, read the records back with an Event Display, and set the clock from the panel's date and time setup or from the documented, settable date and time system registers. The PLC contributes only the trigger bits. The steps below put a correct date and time on every stored row and prove it with a forced-alarm test.

What stamps an alarm when there is no PLC clock sync? #

The panel's own real-time clock stamps every event: when the event subsystem sees the trigger transition, it samples that clock and writes the date and time into the record, so that clock's accuracy is the accuracy of your history. The documented basic steps of the Event Log are to define each event's content and trigger condition; the event then triggers according to that condition. The trigger is a Boolean tag the HMI reads from the PLC, and the message is fixed text typed by the programmer. On this design the S7-1200 supplies the bit, never the time.

Keep each trigger stable long enough for the HMI's polling scan to observe the transition: a bit that rises and falls between two reads never becomes an event, even though the PLC logic executed it. Whether a given model offers PLC clock synchronization is decided by that model's documentation; where no such option exists, the internal clock is not a workaround, it is the design.

How do you make the Event (Alarm) Log save records? #

Open the "Data/History" tab, select "Event (Alarm) Log", define each event's trigger condition and message, and set the save option so the records go to history; an event that is not saved leaves no retrievable record. The configuration is:

  1. Open the "Data/History" tab and select "Event (Alarm) Log".
  2. Type the message for each alarm in the Event Log dialog; the text is entered by the programmer, not read from the PLC.
  3. Set the trigger condition to the Boolean tag that represents that alarm in the PLC.
  4. Choose the transitions to record — activation, return to normal, or both; logging both is what makes alarm duration traceable.
  5. Use the "Save to" selection so the events are written to history.
  6. Compile and download the project to the panel with the normal EasyBuilder Pro workflow.

Which object displays the saved alarm history? #

Use the Event Display object: it reads the log settings and lists the saved events in time and date order as they occurred, with the date and time of each record. The Alarm Bar scrolls current messages as text, and the Alarm Display lists active alarms chronologically; events that are not set to be saved in the history can still appear on both, which is exactly why neither is the archive.

Keep the bar for operator notification and bind a separate Event Display for diagnostics, showing the date and time of each row, with the state column added when you log both transitions. If you embed variables in the message text, a stored row can show the variable's current value instead of its value at event time; why HMI alarm history shows live embedded variable values explains that trap and its fix.

Why does the alarm bar work while the history stays empty? #

Because saving is a per-event setting: events that are not set to be saved in the history can still be displayed by the Alarm Bar or Alarm Display, so a single memorization checkbox elsewhere is not enough. Work through the causes in this order:

  • Reopen "Event (Alarm) Log" and confirm the save-to-history selection is on for every event you expect to retrieve.
  • Confirm the page object is an Event Display reading that log, not one of the notification objects.
  • Force the trigger for one event and expect a new row on the display.
  • If rows appear but their times are wrong, the log is fine; the clock is the fault, and the next two sections fix it.

How do you set the panel's date and time? #

Set the clock before commissioning, using the panel's system date and time setup screen, or numeric-entry objects bound to the documented date and time system registers from the register table for your exact model. Those registers sit in the system register area around LW9000; take the exact addresses for year, month, day, hour, minute and second from the register table in the EasyBuilder Pro User Manual, because an address typed from memory is not a specification.

The table also gives the field limits you must reproduce as input limits on the entry objects: the year field accepts 2000 to 2035, the AM/PM field of the 12-hour format takes 0 for AM and 1 for PM, and the day-of-week field runs 0 to 6 for Sunday to Saturday. It lists these clock fields among the PLW/PLB registers that can be set, each a 16-bit word, so numeric-entry objects bound to them write the clock directly.

Two rules for the clock page. Restrict it to a maintenance access level, because every event logged afterward inherits whatever is typed there. And enter the whole date and time in one pass during a quiet interval, not field by field while alarms are active. If a macro is part of your clock handling, read why macro variables never appear in the LW address map before pointing anything at an LW number you chose yourself: only the register table assigns addresses.

Why must the clock be set before the first alarm? #

Because the logger samples the clock at each transition and never re-stamps stored rows: a history begun on a wrong clock carries those wrong times permanently, and a large backward correction can place new records before older ones.

With both transitions logged, duration is subtraction. An alarm that activates at 14:32:05 and returns at 14:41:37 lasted 14:41:37 − 14:32:05 = 572 s, which is 9 min 32 s. Run the same event with the panel clock 3 min slow and the rows read 14:29:05 and 14:38:37, both shifted by 180 s, while the subtraction still returns 572 s. An offset corrupts every absolute time in the log and leaves durations intact, which is why the clock is set once, correctly, before commissioning, and why this panel's clock is the single authority for the history.

Where several stations log into one sequence, their records form one timeline only if the clocks agree; why an HMI trend loses history when server clocks disagree shows the failure on the logging side.

How do you verify the history end to end? #

Run five checks at commissioning: clock read-back, one forced activation, one return to normal, page-change retrieval, and a restart — each must produce the row or reading you expect before you trust the log. Force test bits only with the machine in a safe state, on the bench or during a planned stop, because the rest of the control program sees a forced alarm bit as a real alarm.

  1. Clock read-back: put a Date/Time object on a diagnostic page — it displays the current date and time in the format and font you choose — and compare it with the plant's time reference to the minute.
  2. Activation: force one configured trigger; expect one new row with the right message and the panel's current date and time.
  3. Recovery: clear the same trigger; expect a second row for the return transition, stamped after the first.
  4. Retrieval: leave the page and return once the alarm is inactive; both rows must still be listed.
  5. Restart: restart the panel through its approved procedure; the clock must still read correctly and the history must reappear. A reset clock here points to clock retention; missing rows point back to the save selection in the Event (Alarm) Log.

Questions asked

Do already stored records change when the clock is corrected later?

No. Rows already written keep the time they were logged with, so a wrong-clock interval stays wrong in the stored history. When the offset is known, record it in the maintenance log together with the affected time window, so anyone reading the history can reinterpret those rows; nothing on the panel recalculates them afterward.

What happens if someone tries to enter a year outside the documented range?

The register table documents 2000 to 2035 for the year field, and a numeric-entry object limited to that range rejects 2036 or 1999 at the keypad. That rejection is the protection you want: the clock page cannot be typed out of range. Apply the same principle to every field by copying each documented limit into its object.

Can the S7-1200 set the panel clock anyway?

Not through any supported path in this project. Time values copied from PLC memory into ordinary data registers are ignored by the event logger, because it samples the panel's real-time clock, not PLC data. If the documentation for your exact model and driver later lists a clock synchronization option, use it; until then the panel clock is the only authority the history has.

Should operators see the clock on normal screens?

Yes, read-only. Add a Date/Time object to the main screen so the time is always visible; that visibility works as free drift detection, because an operator who notices a wrong time reports it long before a timestamp dispute. Keep the entry objects confined to the restricted clock page, so visibility and editability stay separate.

Keep reading

  • Troubleshooting

    Why HMI Alarm History Shows Live Embedded Variable Values

    An alarm-history row stores the variable reference, not the value: the panel redraws each embedded variable with the current reading, so older rows drift as the process changes. Prove it with a noncritical test tag; take event-time values from the alarm export or a controller latch; keep any live number in history text explicitly labeled.

    HMI and touchscreens

  • Troubleshooting

    Why HMI operation records miss PLC start stop transitions

    An HMI operation record writes an entry only when a touch changes a value, so background transitions of PLC output Y5 never reach it. Build the start/stop history from a state-driven event log on Y5 that stores both the activation and the return transition, verify the tag reads back live, and latch in the PLC any state shorter than the panel's polling period.

    HMI and touchscreens

  • Explainer

    What a SCADA Operator Interface Must Do: Core Functions

    A SCADA operator interface carries six functions: acquisition and display of binary and analog data, alarm and event recording, a history database of process values, measurand processing for derived values, presentation through graphics, lists and reports, and command handling from binary commands to recipes. Keep alarm and event records separate from the history database: one records occurrences, the other retains values.

    HMI and touchscreens