Troubleshooting
Why an HMI trend loses history when server clocks disagree
Short answer
An OPC UA trend that shows live values but no history is usually a clock offset between the HMI client and the server. Make both devices NTP clients of one external source over UDP port 123, and use the controller's system REST API only as a scheduled fallback.
On this page
- Does a live value with no trend history mean the connection is broken?
- Why does a clock offset empty the trend when values still arrive?
- Can the controller act as the NTP server for the panel?
- How do you put both devices on one time source?
- Example: how far does a free-running clock drift in a week, and what offset empties the trend?
- Which pitfalls recreate the offset after the fix?
- How do you verify the clocks agree and the history is back?
- Questions asked
An OPC UA trend that plots live values but draws no history is a time problem, not a communication problem: the data reaches the panel, but the panel cannot place it on a time axis when its own clock and the server's timestamps disagree. The fix is to make the HMI and the controller NTP clients of one external time source, then reload the trend. The same mechanism applies to any OPC UA client and server pair, not only the ctrlX CORE and a Unified Comfort Panel.
Does a live value with no trend history mean the connection is broken? #
No: live values prove the OPC UA session, certificates, node mapping and subscription all work, so the fault is confined to time-dependent functions such as trend history and archiving. Anything that orders samples on a time axis fails together. Check the clocks before touching the connection settings; if values were missing or bad quality entirely, this diagnosis would not apply.
Why does a clock offset empty the trend when values still arrive? #
OPC UA attaches two timestamps to every value: the source timestamp, set where the value originated, and the server timestamp, set when the server handled it. The trend on the panel places those samples on a time axis using the panel's own local clock and selects the history to display with a time window. When the clocks disagree, samples fall outside the window being queried or appear to lie in the future, so the query returns nothing even though current values arrive normally.
Two defects look identical. A clock offset is a difference in absolute time. A time-zone or daylight-saving mismatch is a representation difference: OPC UA carries UTC, and a device configured in local time with a wrong zone offset shifts every timestamp by whole hours. Check both, and note that an offset which grows over days points to free-running clocks with no NTP correction.
Can the controller act as the NTP server for the panel? #
No. ctrlX OS has no integrated NTP server today; the feature is planned for a future release, and the controller can only run as an NTP client. The workable design is therefore external: both the controller and the panel become NTP clients of the same switch, router with an NTP service, or plant time server, so neither automation device has to serve time to the other. NTP distributes time over UDP port 123, so that port must be open from both device subnets to the server.
How do you put both devices on one time source? #
- Pick the NTP source: a managed switch or router that offers an NTP service, or a plant time server. Record its address and confirm it is reachable from the subnets of both the controller and the panel.
- On the controller, configure automatic time synchronization in the ctrlX OS time settings and enter that server address; the same window sets the time zone.
- In the panel's device configuration, point its time synchronization at the same NTP server and make the time zone and daylight-saving setting match the controller.
- Let both clients synchronize. NTP slews or steps a clock depending on the offset size, so a large initial error may take a step or several poll intervals to clear.
- Reload the HMI runtime or reopen the trend once the clocks agree, so it queries a clean time base instead of the stale window.
If no NTP source can exist on that network, the fallback is a scheduled script against the ctrlX OS System REST API, which can read and set the controller time. It gives no continuous correction, so oscillator drift reopens the offset between runs; schedule it and take the reference from a trusted source. The exact endpoints and authentication are in the ctrlX OS System API documentation from Bosch Rexroth. Once the trend's time base is stable, confirm the history it will actually retain with the checks in verifying HMI historical trend retention.
Example: how far does a free-running clock drift in a week, and what offset empties the trend? #
Take a controller oscillator with a typical uncorrected error of 20 parts per million (an illustrative figure, not a specification). One week is 7 x 24 x 3600 = 604,800 s, so the drift is 604,800 x 20 / 1,000,000 = about 12 s per week. If the panel trend queries a history window that ends at the panel's current time and the server stamps its values 12 s ahead, every sample is stamped in the future and the window returns nothing. A clock offset of a few seconds is therefore enough to blank a trend with a short window, which is why one-shot manual time sets fail within days and only continuous NTP correction holds.
Which pitfalls recreate the offset after the fix? #
- Pointing the two devices at different NTP servers that are not mutually synchronized recreates the offset; use one source for both.
- Entering a local-time value where a device expects UTC, or the reverse, leaves a whole-hour shift that NTP does not correct.
- A firewall blocking UDP port 123 between the machine network and the time server fails silently: the devices keep their free-running clocks with no obvious alarm.
- Fixing the clocks but not reloading the trend leaves the old, invalid history window in use.
- Waiting for a controller-side NTP server feature is not a plan; design around the external source now.
How do you verify the clocks agree and the history is back? #
- Read the controller time and the panel time at the same moment. Expected: the difference is within the accuracy your trend resolution needs, and the zone and UTC offsets are identical.
- Check the NTP status on each device. Expected: the configured server shows as reachable and the device reports synchronization, not a free-running clock.
- Power-cycle the panel and let the controller run. Expected: the clocks stay in agreement after restart, with no step back to a stale value. The same daily-set-and-verify discipline described for setting HMI clock time from PC and PLC applies to any fallback you add.
- Move an axis through a known position change and open the trend. Expected: the curve plots the move on the real time axis and stays populated as time passes, not only at the live end.
If the trend now fills but you also need to confirm the direction the data itself flows over OPC UA, the roles are covered in HMI OPC UA server vs client.
Questions asked
Why does the trend recover only after the HMI runtime is reloaded?
The trend keeps its old, invalid time window until the runtime restarts. After both clocks agree, reload the panel runtime or reopen the trend so it queries history on the corrected time base.
Does a blocked NTP port raise an alarm on the HMI?
No. When UDP port 123 is blocked between the machine network and the time server, the devices keep their free-running clocks silently and the trend stays empty. Confirm reachability of the server from both subnets before trusting the configuration.
Can the controller serve time to the panel instead?
Not on ctrlX OS: it has no integrated NTP server today; that feature is planned for a future release, and the controller only runs as an NTP client. Use a switch, router or plant time server as the common source.