Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Categories
  • Forums
  • Knowledge Center
  • Blogs
  • Ideas
  • Events & Webinars
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Share Your Feedback – Help Us Improve Search on Community!
Please take a few minutes to participate in our Search Feedback Survey. Your insights will help us deliver the results you need faster and more accurately.
Click here to take the survey

Sigma - Program to calculate the Sunrise time / Sunset time

Building Automation Knowledge Base

Schneider Electric Building Automation Knowledge Base is a self-service resource to answer all your questions about EcoStruxure Building suite, Andover Continuum, Satchwell, TAC…

Search in

Improve your search experience:

  • Exact phrase → Use quotes " " (e.g., "error 404")
  • Wildcard → Use * for partial words (e.g., build*, *tion)
  • AND / OR → Combine keywords (e.g., login AND error, login OR sign‑in)
  • Keep it short → Use 2–3 relevant words , not full sentences
  • Filters → Narrow results by section (Knowledge Base, Users, Products)
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Building Automation Knowledge Base
  • Sigma - Program to calculate the Sunrise time / Sunset time
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close

Related Forums

  • Intelligent Devices Forum

Previous Next
Contributors
  • CraigEl
    CraigEl

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Building Automation Knowledge Base
Start a Topic
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
1742 Views

Link copied. Please paste this link to share this article on your social media post.

Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

Sigma - Program to calculate the Sunrise time / Sunset time

Picard Product_Support
‎2018-09-10 10:43 PM

Last Updated: Administrator CraigEl Administrator ‎2025-10-07 11:38 PM

Issue

Customer requires a program to calculate sunrise and sunset times for Sheffield using Sigma programmable objects.

Product Line

Satchwell BAS & Sigma

Environment

Satchwell BAS & Sigma

Cause

There is no built-in function in Sigma to calculate sunrise/sunset times. A custom program is needed to determine these values based on date and location.

Resolution

To review sunrise/sunset times for a specific location:

  1. Visit the Sunrise/Sunset Almanac Tool.
  2. Enter the desired location and click GO.
  3. Select Almanac > Sunrise/Sunset.
  4. Choose the required month to view the data.

Alternatively, use the following Sigma programmable objects to calculate these values directly.


Programmable Objects

Object 1 – Day of the Year Calculation

10  XInt = DAY
20  IF MONTH >= 2 THEN XInt = XInt + 31
30  XFlo = FLOAT(YEAR)
40  XFlo = XFlo / 4.00000
50  XFlo = FRAC(XFlo)
60  IF XFlo = 0.000000 THEN YInt = 1 ELSE YInt = 0
70  IF YInt = 0 AND MONTH >= 3 THEN XInt = XInt + 28
80  IF YInt = 1 AND MONTH >= 3 THEN XInt = XInt + 29
90  IF MONTH >= 4 THEN XInt = XInt + 31
100 IF MONTH >= 5 THEN XInt = XInt + 30
110 IF MONTH >= 6 THEN XInt = XInt + 31
120 IF MONTH >= 7 THEN XInt = XInt + 30
130 IF MONTH >= 8 THEN XInt = XInt + 31
140 IF MONTH >= 9 THEN XInt = XInt + 31
150 IF MONTH >= 10 THEN XInt = XInt + 30
160 IF MONTH >= 11 THEN XInt = XInt + 31
170 IF MONTH >= 12 THEN XInt = XInt + 30
180 RETURN VIA TEXT
200 VALUE XInt

Object 2 – Sunrise Time Calculation

10  XFlo = POINT 0|1
20  YFlo = FLOAT(YEAR)
30  YFlo = YFlo / 4.00000
40  YFlo = FRAC(YFlo)
50  IF YFlo = 0.000000 THEN YInt = 1 ELSE YInt = 0
60  IF YInt = 1 AND MONTH >= 3 THEN XFlo = XFlo - 1.00000
70  ZFlo = LOOKUP(1001, XFlo)
80  ZFlo = ZFlo / 60.0000
90  YFlo = FRAC(ZFlo)
100 ZFlo = ZFlo - YFlo
110 YFlo = YFlo * 60.0000
120 YFlo = YFlo / 100.000
130 ZFlo = ZFlo + YFlo
140 RETURN VIA TEXT
203 VALUE ZFlo

Object 3 – Sunset Time Calculation

(Same logic as Object 2, using different lookup values)


Object 4 – Sunrise/Sunset Interlock

10  XFlo = POINT 0|2
20  YFlo = FRAC(XFlo)
30  XFlo = XFlo - YFlo
40  YFlo = YFlo * 100.000
50  IF HOUR >= INT(XFlo + 1.00000) THEN GOTO 90
60  IF HOUR = INT(XFlo) THEN GOTO 100
70  XInt = 0
80  RETURN FALSE "Plant Off"
90  XInt = 1
100 IF MINUTE >= INT(YFlo) THEN XInt = 1
110 XFlo = POINT 0|3
120 YFlo = FRAC(XFlo)
130 XFlo = XFlo - YFlo
140 YFlo = YFlo * 100.000
150 IF HOUR >= INT(XFlo) THEN GOTO 170
160 GOTO 180
170 IF HOUR >= INT(XFlo + 1.00000) OR MINUTE >= INT(YFlo) THEN XInt = 0
180 IF XInt = 1 THEN RETURN TRUE "Plant On"
190 RETURN FALSE "Plant Off"

Attachments

  • Sunrise-Sunset Times.zip – Includes lookup table and object files.
Labels (1)
Labels:
  • Satchwell BAS & Sigma
Attachments
Sunrise-Sunset Times.zip
Tags (2)
  • Find more articles tagged with:
  • 8392
  • CraigEllis25
Was this article helpful? Yes No
No ratings

Link copied. Please paste this link to share this article on your social media post.

You’ve reached the end of your document

WHAT’S NEXT?

Ask our Experts

Didn't find what you are looking for? Ask our experts!

My Dashboard

Check out the new Feeds and activities that are relevant to you.

To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support

    Ask our Experts

    Have a question related to our products, solutions or services? Get quick support on community Forums

    Email Us

    For Community platform-related support, please email us

Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

Welcome!

Welcome to your new personalized space.

of

Explore