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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...