Knowledge Base
Showing results for 
Search instead for 
Did you mean: 

Sunrise/Sunset Schedule in Menta


Control HVAC or especially lighting based on the sunrise and sunset times for a given location on a given date, even though this functionality does not exist in Vista like it does in I/NET.




Menta/Vista time schedules have no built-in sunrise/sunset capability.  If this is required, it will need to be programmed into a Menta file.


The attached Menta Macro calculates the sunrise and sunset for a given location. Click the picture to download.




Inputs - Menta Simple Blocks

  • Month
  • Date
  • Hour
  • Minute

Configurable Parameters

  • Year = Current year.  As Menta has no "Year" block, it must be calculated in the controller and should be set initially for the current year.
  • DST = Does this location participate in Daylight Savings Time?  1=Yes, 0=No.
  • TimeZone = Location's offset in hours from GMT
  • Latitude = Location's latitude in degrees. North is a positive value, south is a negative value.
  • Longitude = Location's longitude in degrees. West is a positive value, east is a negative value.

Outputs - Available Data

  • Current minutes past midnight
  • Sunset minutes past midnight
  • Sunset hour
  • Sunset minutes
  • Sunrise minutes past midnight
  • Sunrise hour
  • Sunrise minutes
  • Output integer represents minutes until next transition.  Mimics a Menta time schedule.  Positive values count down minutes until sunrise.  Negative values count down minutes until sunset.
Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-06 01:52 PM
Updated by: