Day's elapsed Minutes Value into a Variable - 0 to 1439

Posted on
Sun Dec 08, 2019 6:33 am
eric offline
Posts: 59
Joined: Dec 22, 2014

Day's elapsed Minutes Value into a Variable - 0 to 1439

There are 1440 minutes in a day and I would like to be able to have this number in a variable, starting with 0 at midnight and counting up from there and resetting again to zero at the next midnight, and updated every minute. I would be using this to drive a series of vintage slave impulse clocks ("school clocks") which increment one minute per switch closure.

To to this I would simple need (the value of the %H timestamp value) x 60 + (the value of the %M timestamp value) inserted in a variable.

The timestamp into variable function does not seem to allow any math operations. Or does it?

Any ideas as to how I can do this?

Eric

Posted on
Sun Dec 08, 2019 8:27 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Day's elapsed Minutes Value into a Variable - 0 to 1439

If my Clock Plugin doesn’t allow this already, it will in about half an hour.


Sent from my iPad using Tapatalk Pro

Posted on
Sun Dec 08, 2019 9:20 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Day's elapsed Minutes Value into a Variable - 0 to 1439

viewtopic.php?f=282&t=20601

Added to ClockDisplay plugin.

Posted on
Sun Dec 08, 2019 10:33 am
eric offline
Posts: 59
Joined: Dec 22, 2014

Re: Day's elapsed Minutes Value into a Variable - 0 to 1439

Fantastic - thank you!

Just tried this and It works great.

The idea behind my impulse clock logic is simply to enter the the displayed time on the clock (in day's elapsed minutes) in one variable and have the actual (desired) time in the other variable and to compare the two at a short interval. If they are different then increment the clock. Generally these clocks only increment and don't decrement. This will allow fairly simple recovery from reboots, daylight savings etc. If the check interval is five seconds then it will take a few minutes for the clock to catch up to real time for each hour of offset.

Since you are en expert with clocks and time, let me know if you have any other suggestions.

Thanks again.

Posted on
Mon Dec 09, 2019 2:38 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Day's elapsed Minutes Value into a Variable - 0 to 1439

So let me understand.

These clocks would sit showing the same time all day if you didn’t send them a pulse?

The only control you have of them is to send a pulse? Is this a “move forward one minute” pulse, or a “set your time to $ThisMinuteOfDay” pulse?

OR, do you have both those options, a “move forward” and a “reset”?

How does Indigo know what time the clock says?


Sent from my iPhone using Tapatalk Pro

Posted on
Mon Dec 09, 2019 9:16 pm
eric offline
Posts: 59
Joined: Dec 22, 2014

Re: Day's elapsed Minutes Value into a Variable - 0 to 1439

Correct. Slave clocks are generally one-way communication. One pulse per minute. Mine are Italian Solari train station flap clocks and require a bipolar pulse. Several individuals make “impulsers” which you install inside the clocks to make them autonomous. I want them to keep to Internet-accurate time and hence indigo seems like a good solution.

Like their initial application in rail stations and schools, I tell indigo what the clock face says, entering it in one variable. Then indigo brings it to the correct time, pulsing it until it matches the time variable. Then it updates once per minute.

I’m considering adding a dry contact at midnight which will allow indigo to automatically set the clock after a power failure but since the clocks only pulse forward this could take a long time, and it would be easier to just enter the clock face reading into a variable manually.

Here’s a YouTube video showing the type of clock I have being manually pulsed:

https://youtu.be/1PziDQtwte8

These were used in airports etc. and were driven by a master pulse source with dedicated hard wiring to each clock. All the clocks were therefore in perfect sync.

Posted on
Tue Dec 10, 2019 12:24 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Day's elapsed Minutes Value into a Variable - 0 to 1439

Ok, let me play.


Sent from my iPhone using Tapatalk Pro

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests