About Time

One of the great features of Bartimaeus is the “Ortomate” automation system which brings together the controls for many of the important things on the boat.  There is a handy control panel near the stern doors.  I can also easily access it using my phone when we are on board and, with a little more fiddling, from anywhere with a network connection.

The system behind the panel also looks after various timers, the most obvious being the central heating.  When we first got on board I noticed that the time displayed was a couple of minutes behind.  That meant that if I set the heating to start on the hour, it would be a couple of minutes past before it kicked in.  It was no big deal though, narrowboat life isn’t usually run to the nearest minute.

I noticed that when we got back on board the clock was now over four minutes slow.  The boat is over four years old now, so I think it must be losing about a minute a year.  In the very wet weather I started to investigate what was going on.  I followed one of the little used menus and found myself even more confused.

Control panel.  A screenshot of a control panel displaying large amounts of esoteric information.  There are rings around the time displayed in various formats - not all sayiing the same time.
Screenshot at Which Time?

The screenshot is from my phone.  The time shown at the top left is the correct time according to my phone.  The time on the right is also correct, but wasn’t when I first started to investigate.

I gradually began to understand that there were two clocks involved.  One is part of the gadget that screen is part of.  This is a Weintek HMI (Human Machine Interface).  I had noticed that this was supposedly synchronised with NTP (Network Time Protocol), but certainly was not.  I had started experimenting with the editor for the program running on the HMI.  I spotted the setting to use NTP was switched off, so I switched it on.  Very soon the time on the HMI was correct.

But this is not the clock displayed on the screen and used to control the heating etc.  It turns out that is built in to the Siemens PLC (Portable Logic Controller) which actually does the work of turning things on and off.  I don’t have very good documentation for any of the parts of this puzzle, but I thought I might have just enough.

I can edit the configuration of the panel on my laptop and then upload the new version to the panel.  The upload takes a minute or so, and seems to chew up most of the network bandwidth on board.  After repeated experiments I discovered that I could write a macro (a mini program) to run on the HMI and update the time on the clock in the PLC to match the (synchronised) one in the HMI.  A bug sent the boat back to the sixties at one point, but eventually I made a reliable version of the macro.  I have now set it to run once a day, so the time displayed should now stay accurate to the nearest second in future.

We were impressed that the clock at the Weedon Bec Depot was still running and showing the right time after 200 years.  I suspect it needs some manual attention though.

Clock tower.  A white tower showing a dark clock face sprouts from the roof of an imposing brick building.  There is a weather vane above the clock.  The sky behind is blue and cloud free.
Clock Running Since Napoleon’s Time

While I was exploring the time settings, I also started noticing some other aspects of the display that had been niggling at me on and off.

One of these was the display showing the level in our waste tank.  It always showed in a yellow (warning) state whether the tank was full or empty.  The water and diesel levels usually show green.  They go to yellow and then (flashing) red as they get closer to empty.  I eventually realised that the tank levels are reported in tenths of a litre, so the controller has to divide this number by ten before displaying.  Once I’d understood that the critical levels have to be entered in the right units, I was able to make the appropriate change.

Having got the annoying yellow number off the screen, I then started looking at some of the other items usually displayed.  I decided I liked the idea of the important numbers on the panel displaying in green if things were good, and yellow or red if not.  I can now see at a glance that the tanks and the battery are all in good shape.

Control panel.  There ar three columns of information about electrical devices.  There is also information about tank levels and there are buttons to press for various operations.
Updated Control Panel