Jump to content

Time Remaining HOUR function


Recommended Posts

Hi.

You did not mention OPLC model. Next explanation is for Unitronics Enhanced Vision Series.

VisiLogic have no such embedded function.

Easiest way is to show remaining time between current RTC (Real Time Clock) HH:MM and indirect off-time HH:MM, when current time is inside on-off interval.

But representation of both is different:

Indirect time function use HexaDecimal(BCD) format. 12:45 is 0h1245.

SI 31 contains RTC current time HH:MM in a Decimal format. 12:45 is 1245.

Timer preset contains a number of 10 mSec intervals (ticks).

UTC counts in ceconds from pre-defined date. *See UTC help.

You need to fill start and stop time in format of RTC, like SI 30 - SI 33 use.

Use RTC-to-UTC conversion of start, stop and RTC, you will find remaining time between RTC and off-time in seconds.

Then display this remaining time is trivial.

B.R.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.