IMDTouchKnowledge BaseShop main store

Troubleshooting

Setting hh and mm on an HMI week timer minutes word

HMI and touchscreens Published 7 min read

Short answer

The week timer word holds the time of day as minutes since midnight, so 01:10 is entered as 70 (1 × 60 + 10); a clock-style 110 switches at 01:50. Prove the encoding with test writes, limit the tag to the proven range, and split the entry into an hour field (0-23) and a minute field (0-59) combined by a calculation at entry, or move the math into the controller program, since the week timer block accepts only fixed parameters.

On this page
  1. Read the word as minutes since midnight
  2. Prove the encoding and the valid range on the target
  3. Where the hh and mm split can live
  4. Refuse impossible entries at the field
  5. Faults that look like conversion errors but are not
  6. Handover test on the bench
  7. Which arrangement to build
  8. Questions asked

Your customer is right to expect clock numbers, and the panel can deliver them — the tag just has to be driven the way it reads. A week timer word configured as a Word holds the time of day as minutes elapsed since midnight: 01:10 must be written as 70, from 1 × 60 + 10, and a clock-style entry of 110 lands at 110 minutes, which the timer shows as 01:50. Nothing is broken; the field is being fed a format it does not use. The block will not absorb the arithmetic either — the weekly timer keeps its on and off switching times as fixed parameters and accepts no reference to a calculated variable, so the conversion belongs at the panel: verify the encoding, put hard limits on the field, and split the entry into an hour and a minute.

Read the word as minutes since midnight #

Read the tag as a single integer: the minutes that have elapsed since 00:00. The forward conversion is

minutes = hh × 60 + mm

and the reverse is a division by 60, with the whole-number part giving the hour and the remainder giving the minute.

Worked example for 17:45: 17 × 60 = 1020, then 1020 + 45 = 1065, so the word has to hold 1065. Reading it back: 1065 ÷ 60 = 17 with a remainder of 45, which is 17:45 — the arithmetic closes in both directions.

Intended time Word value A clock-style entry instead produces
01:10 70 110 minutes, so the timer switches at 01:50
06:30 390 630 minutes, so the timer switches at 10:30
17:45 1065 1745 minutes, which is 29 hours and 5 minutes — no clock carries it
23:59 1439 2359 minutes, far outside one day

Every number in the table follows from the formula alone. What the block does with a value of 1440 or more is its own behavior, so the next section proves it on the target and the field's high limit then keeps operators out of it.

Prove the encoding and the valid range on the target #

Five writes settle everything the screen design depends on. Put one I/O field on a test screen, write to the tag from the panel, and read the timer on the controller's display or in the programming software's online monitoring:

  • Write 60. Expected: 01:00. That confirms the word counts minutes since midnight.
  • Write 70. Expected: 01:10. That confirms there is no offset in the mapping — the count starts at midnight.
  • Write 1439. Expected: 23:59. The whole day is reachable.
  • Write 1440 and record what the block does: accept, wrap, or reject it. That behavior, whatever it is, defines the high limit the panel has to enforce.
  • Write 0. Expected: 00:00. The lower bound is confirmed.

If a write lands at some other time, the tag points at the wrong address or the wrong timer parameter; correct the mapping in the tag table before changing any screen. With the range proven, enforce it on the tag so the entry field refuses out-of-range values — on a basic panel the limits are set in the Inspector window under Properties > Properties > Range. Set the low limit to 0 and the high limit to the highest value the test proved safe: 1439 when the block takes the full day.

Where the hh and mm split can live #

The timer parameter cannot take a variable reference, so the arithmetic has to run where variables are allowed: at the panel's entry event, or inside the controller program. Work the options in this order:

  • Two fields and a calculation at entry. Create two internal tags, one for the hour and one for the minute, and give each its own entry field. Open the function list behind the field's entry event and look for the arithmetic or calculation-type system function offered for this panel class; basic panels carry a reduced function set compared with Comfort panels and offer no script engine to fall back on, so confirm the function exists in your version before promising the split entry. When it is there, let it compute hour × 60 + minute on the confirm event and write the result to the timer word. The operator sees hh and mm; the word receives minutes.
  • No calculation function available. Do not force the conversion into linear scaling. Scaling applies one gain and one offset to one tag, and this conversion needs a second, independent input, so no gain and offset pair can produce it. Go to the next option.
  • Move the arithmetic into the controller. Let the panel write the hour and the minute into two controller memory words, form the minutes with a math block, and drive the switching decision from comparisons against those words instead of the week timer's fixed parameters. The panel already talks to a 0BA7 through the S7-200 driver — the configuration is laid out in configuring a KTP600 HMI with a LOGO! 0BA7 using the S7-200 driver. This branch needs the program to obtain the current time of day as a value a comparison can use; check the device's block list first and build the schedule from comparisons only once that is confirmed. On the 0BA8 generation the same goal is reached by writing the timer through VM mapping, which setting a LOGO! 0BA8 timer from a KP400 HMI via VM mapping walks through end to end.
  • Fallback: keep the minutes field. Keep the single limited entry field, label it in plain words as minutes after midnight, and keep a printed conversion table beside the panel. If the controller computes a decoded hour and minute of its own, show those as read-only values so every entry is confirmed immediately.

A date/time display format does not help here: it renders tags of the date/time type, and this word is a plain integer of minutes, so no clock format applies to it unless your engineering software explicitly offers one for this tag type.

Refuse impossible entries at the field #

Splitting the entry invites split mistakes: an hour of 24, a minute of 75, a 1:75 that no clock has ever shown. Hard limits on the two internal tags close all of these at the field itself — 0 to 23 on the hour, 0 to 59 on the minute, set with the same range limits as during the range test. Without them, hour × 60 + minute still returns a number, but it names a different time than the operator typed, and any result above the day's maximum lands in the region the range test flagged.

Faults that look like conversion errors but are not #

When the screen still misbehaves after the split, the cause is usually one of these:

Symptom Mechanism Fix
Entry reads right, wrong after a power cycle The internal tags wake at zero while the controller word keeps its last write Initialize the hour and minute tags from the word on screen open, or make them retentive if the panel offers it
Fields show 1 and 10, timer still switches at 01:50 The entry event wrote the raw clock number, 1 × 100 + 10, not minutes Correct the calculation to hour × 60 + minute
Timer changes but the screen shows the old time The display tag's acquisition cycle is slower than the write path Shorten the display tag's acquisition cycle so the readback keeps up
Values from 1440 upward behave unpredictably No high limit reaches the field Apply the limit proven in the range test

Handover test on the bench #

Run the finished screen through these cases before the customer sees it:

  • Enter 1 and 10. Expected: the word at 70, the controller showing 01:10.
  • Enter 17 and 45. Expected: the word at 1065, matching the worked example.
  • Enter 23 and 59. Expected: the word at the day's maximum, 23:59 on the controller.
  • Enter 24, then 60. Expected: both refused by their limits, word unchanged.
  • Power-cycle the panel and reopen the screen. Expected: the timer's current setting appears as hh and mm, decoded from the word by the arrangement you built.

Prove the off entries as well as the on ones while the driven load is isolated — a week timer that switches a pump on schedule can just as easily fail to switch it off.

Which arrangement to build #

Two checks decide it, not preference:

  • Calculation-type function present in the entry event list: build the two-field entry, hour limited to 0 through 23 and minute to 0 through 59, and write the minutes at entry. This ends the customer's arithmetic.
  • No calculation function, but the program can compare a minutes-of-day value: write the hour and the minute into controller memory words and rebuild the schedule from math and comparisons there.
  • Neither: keep the single minutes field with the proven limits, label it as minutes after midnight, and keep the printed conversion table beside the panel — the operator still converts, but the table or a decoded readback catches the 110-for-1:10 mistake before it becomes a 01:50 switch.

Questions asked

What number stands for 12:00 noon in the minutes word?

Noon is 720. The conversion is the same as for any other time of day: 12 × 60 = 720 minutes after midnight, so the word holds 720. By the same rule, 06:30 in the morning becomes 390. Anything from 1440 upward leaves one day, so the entry field's high limit has to refuse it before it reaches the timer.

Is midnight entered as 0 or as 1440?

Write 0. The word counts minutes after midnight, so 00:00 is the zero point and 1440 already belongs to the next day, outside the range the timer expects. The range test shows the difference: a write of 0 reads back as 00:00, while what the block does at 1440 is its own behavior and must stay behind the field's high limit.

What happens if the minute field still accepts 75?

The calculation still returns a number: 1 × 60 + 75 = 135 minutes, so the timer switches at 02:15 instead of the time the operator imagined. No error is raised, because 135 is a legal word value. That is why the minute tag carries its own hard limit of 0 through 59, enforced at the field rather than left to the operator's care.

Do the off times and the other cams use the same encoding?

Yes. Every switching point of the weekly timer is stored as minutes after midnight, on and off alike, and the block's documentation describes three cams on each weekly timer with a hysteresis configurable for each cam. Verify an off entry exactly like an on entry: write the minutes from the panel, then read the time back on the controller display before the screen reaches the customer.

Keep reading

  • How-to

    Setting a LOGO! 0BA8 timer from a KP400 HMI via VM mapping

    Map the B002 timer's writable setpoint to a VM word with LOGO! Parameter VM Mapping in LOGO!Soft Comfort, then point the KP400's WinCC Basic I/O field at that word — a LOGO! 0BA8 exposes only its VM memory over the S7 connection, so a block number is unreachable from the panel; the worked example lands the setpoint in VW4; counter B004 follows the same route only if the mapping lists its threshold as writable.

    HMI and touchscreens

  • How-to

    How to configure a DF1 PLC connection in Vijeo Designer Basic

    Copy the PLC's DF1 mode, half-duplex station number, full serial framing and addressing base into the Vijeo Designer Basic driver, then prove the link by displaying one known PLC integer before building screens. A matched link transacts in tens of milliseconds, so slow or absent updates point at configuration, not line speed.

    HMI and touchscreens

  • Troubleshooting

    Why an HMI sends email in simulation but not from the panel

    Email that leaves from PC simulation but never from the physical panel means the project logic works and the panel's own send path is broken. Work the panel's chain in order: count and send condition, gateway, DNS and mail-server reachability, then the deployed project's email options, changing one option at a time. In the case behind this pattern, one checked option in the panel's email settings was the entire fault.

    HMI and touchscreens

How to reset a startup bit after two minutes in Vijeo Designer