{"id":2256,"date":"2020-02-18T20:41:20","date_gmt":"2020-02-18T20:41:20","guid":{"rendered":"http:\/\/bryceautomation.com\/?p=2256"},"modified":"2020-02-18T20:41:22","modified_gmt":"2020-02-18T20:41:22","slug":"calculate-sunrise-and-sunset","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/","title":{"rendered":"Calculate Sunrise and Sunset"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Why Calculate Sunrise and Sunset in a PLC?<\/h3>\n\n\n\n<p>In the olden days, you used a photo resistor to detect when the sun has risen or set.   The problem with this are obvious.   You are adding an extra component that will degrade over time.   Not to mention the fact that cloudy days will affect what time the sensor is triggered.<\/p><div id=\"bryce-3296546532\" class=\"bryce-afterfirst bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"7728240895\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n\n<p>Obviously, the sun does not rise or set at the same time each day.   We must use an algorithm to determine these times.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Different Methods to Calculate Sunrise and Sunset<\/h3>\n\n\n\n<p>If you have a microprocessor that supports complex math equations, you could use a method such as this one:  <a href=\"https:\/\/edwilliams.org\/sunrise_sunset_algorithm.htm\">https:\/\/edwilliams.org\/sunrise_sunset_algorithm.htm<\/a><\/p>\n\n\n\n<p>As can be seen, the math might be a little hard to follow for most people.  However, once you have it working, and the processor clock is set, simply provide an output that indicates when &#8220;Night Mode&#8221; is active.<\/p>\n\n\n\n<p>In ControlLogix, the sample library has a very good add-on instruction that you can use in your ControlLogix project.  Simply set your clock, and enter your Longitude and Latitude values.<\/p>\n\n\n\n<p>Older processors, however, do not support complex math formulas easily.   With this in mind, we must use more &#8220;rudimentary&#8221; methods of finding the sunrise and sunset times.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SLC-500 \/ PLC-5 Approach<\/h3>\n\n\n\n<p>Because the older processors do not easily do complex math, my approach was to use a 12-sided figure 8.   To summarize, I set up data tables containing Sunrise and Sunset values for the first day of each month.  Although, we could enter values for each day of the year, I wanted this approach to be easy for maintenance due to the earth&#8217;s wobble, or if I need to modify the logic for another location.  My goal here is to roughly calculate the difference between times for this month and the next month.  Then figure out how far we are through the month.   At this point we can calculate an estimated sunrise and sunset for the current date.   By all means, this is not a perfect method, but it should get us within a few minutes each day.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create the Data Tables<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"144\" height=\"106\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrisetables.png\" alt=\"\" class=\"wp-image-2258 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 144px; --smush-placeholder-aspect-ratio: 144\/106;\" \/><\/figure>\n\n\n\n<p>I have set up six data tables.   N50 is for Sunrise Hours, N51 for Sunrise Minutes.  Then I created two more tables:  N52 for Sunset Hours, and N53 for Sunset Minutes.   I also created N54 as an integer workspace, and F55 as a floating point workspace.   Each of these data tables had 15 elements to give me some extra room.  For each data table, enter the corresponding value for each month:  For example.   The Sunrise Hour for January 1 will be placed into N50:0.   Since I&#8217;m using indirect addressing for some of the calculations, I also enter this value into N50:13.  (This is used when I calculate December (12) + 1 Month.  Here is an example of the N50 data file:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"590\" height=\"227\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrisehour.png\" alt=\"\" class=\"wp-image-2257 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrisehour.png 590w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrisehour-300x115.png 300w\" data-sizes=\"(max-width: 590px) 100vw, 590px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 590px; --smush-placeholder-aspect-ratio: 590\/227;\" \/><\/figure>\n\n\n\n<p>It&#8217;s very important to note:  I&#8217;m entering all values in STANDARD TIME only.   Although that is easy to do, to keep it simple, I&#8217;m not accounting for DST in this post.   Be sure to fill out all 13 values for each of the first four data tables, and don&#8217;t forget to repeat January&#8217;s value on element #13.  Search for the values for your own location own location at <a href=\"https:\/\/sunrise-sunset.org\/\">sunrise-sunset.org.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Write the Logic<\/h3>\n\n\n\n<p>In the first rung of logic, I&#8217;m simply moving the current month and the next month into the N54 data file as shown.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"478\" height=\"264\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise0.png\" alt=\"\" class=\"wp-image-2260 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise0.png 478w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise0-300x166.png 300w\" data-sizes=\"(max-width: 478px) 100vw, 478px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 478px; --smush-placeholder-aspect-ratio: 478\/264;\" \/><\/figure>\n\n\n\n<p>Secondly, we&#8217;ll need to know how far we are through the month.   Again, this method is not perfect, but will get us pretty close.   For simplicity, we&#8217;ll assume there are 30 days in a month.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"476\" height=\"109\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise1.png\" alt=\"\" class=\"wp-image-2261 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise1.png 476w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise1-300x69.png 300w\" data-sizes=\"(max-width: 476px) 100vw, 476px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 476px; --smush-placeholder-aspect-ratio: 476\/109;\" \/><\/figure>\n\n\n\n<p>Thirdly, for comparison, we need to convert the sunrise times for this month and next month to decimal.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"479\" height=\"267\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise2.png\" alt=\"\" class=\"wp-image-2262 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise2.png 479w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise2-300x167.png 300w\" data-sizes=\"(max-width: 479px) 100vw, 479px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 479px; --smush-placeholder-aspect-ratio: 479\/267;\" \/><\/figure>\n\n\n\n<p>Likewise, we will convert the sunset times to decimal.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"482\" height=\"271\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise4.png\" alt=\"\" class=\"wp-image-2263 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise4.png 482w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise4-300x169.png 300w\" data-sizes=\"(max-width: 482px) 100vw, 482px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 482px; --smush-placeholder-aspect-ratio: 482\/271;\" \/><\/figure>\n\n\n\n<p>Fourthly, we need to convert the current time to decimal for easy comparison.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"476\" height=\"137\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise6.png\" alt=\"\" class=\"wp-image-2264 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise6.png 476w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise6-300x86.png 300w\" data-sizes=\"(max-width: 476px) 100vw, 476px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 476px; --smush-placeholder-aspect-ratio: 476\/137;\" \/><\/figure>\n\n\n\n<p>Fifth, we need to know the differences between this month and next month for both Sunrise, and Sunset.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"477\" height=\"303\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise7.png\" alt=\"\" class=\"wp-image-2266 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise7.png 477w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise7-300x191.png 300w\" data-sizes=\"(max-width: 477px) 100vw, 477px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 477px; --smush-placeholder-aspect-ratio: 477\/303;\" \/><\/figure>\n\n\n\n<p>Finally, we will calculate the sunrise and sunset times for today in floating point.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"480\" height=\"277\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png\" alt=\"\" class=\"wp-image-2267 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png 480w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9-300x173.png 300w\" data-sizes=\"(max-width: 480px) 100vw, 480px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 480px; --smush-placeholder-aspect-ratio: 480\/277;\" \/><\/figure>\n\n\n\n<p>At last, if we are between sunset and sunrise, set a bit to indicate that we are in night mode!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"477\" height=\"180\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise11.png\" alt=\"\" class=\"wp-image-2268 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise11.png 477w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise11-300x113.png 300w\" data-sizes=\"(max-width: 477px) 100vw, 477px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 477px; --smush-placeholder-aspect-ratio: 477\/180;\" \/><\/figure>\n\n\n\n<p>Summary<\/p>\n\n\n\n<p>To emphasize, this method uses standard time only, and is not perfect, but should get you within a few minutes per day.   All values here must be entered in Standard Time in your data tables, so be sure to account for that when you enter them from a website.  If you wish to change your processor clock to Daylight Saving time, simply subtract one hour from the current time calculated, and use that value for your comparisons.   Remember, all of these posts are examples only.   Feel free to write comments, and suggestions or corrections.<\/p>\n\n\n\n<p>Feel free to visit the<a href=\"https:\/\/bryceautomation.com\/index.php\/category\/slc500\/\"> SLC-500<\/a> category page, or the <a href=\"https:\/\/bryceautomation.com\/index.php\/category\/plc-5\/\">PLC-5<\/a> category page!<\/p>\n\n\n\n<p>&#8212; Ricky Bryce<\/p>\n<div id=\"bryce-2627038900\" class=\"bryce-after-content bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"4667596182\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Why Calculate Sunrise and Sunset in a PLC? In the olden days, you used a photo resistor to detect when the sun has risen or set. The problem with this are obvious. You are adding an extra component that will degrade over time. Not to mention the fact that cloudy days will affect what time <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":2267,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[167,130],"tags":[179,180],"class_list":{"0":"post-2256","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-plc-5","8":"category-slc500","9":"tag-sunrise","10":"tag-sunset","11":"czr-hentry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Calculate Sunrise and Sunset in the SLC-500 or PLC-5<\/title>\n<meta name=\"description\" content=\"Calculate Sunrise and Sunset using a simple method of entering values for each month, and setting a night mode based on percentage through the month.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calculate Sunrise and Sunset in the SLC-500 or PLC-5\" \/>\n<meta property=\"og:description\" content=\"Calculate Sunrise and Sunset using a simple method of entering values for each month, and setting a night mode based on percentage through the month.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/\" \/>\n<meta property=\"og:site_name\" content=\"Bryce Automation\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ricky.bryce.7\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-18T20:41:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-18T20:41:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png\" \/>\n\t<meta property=\"og:image:width\" content=\"480\" \/>\n\t<meta property=\"og:image:height\" content=\"277\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ricky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"Calculate Sunrise and Sunset\",\"datePublished\":\"2020-02-18T20:41:20+00:00\",\"dateModified\":\"2020-02-18T20:41:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/\"},\"wordCount\":815,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/sunrise9.png\",\"keywords\":[\"Sunrise\",\"Sunset\"],\"articleSection\":[\"PLC-5\",\"SLC500\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/\",\"name\":\"Calculate Sunrise and Sunset in the SLC-500 or PLC-5\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/sunrise9.png\",\"datePublished\":\"2020-02-18T20:41:20+00:00\",\"dateModified\":\"2020-02-18T20:41:22+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"Calculate Sunrise and Sunset using a simple method of entering values for each month, and setting a night mode based on percentage through the month.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/sunrise9.png\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/sunrise9.png\",\"width\":480,\"height\":277,\"caption\":\"Sunrise Sunset Calc\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2020\\\/02\\\/18\\\/calculate-sunrise-and-sunset\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Calculate Sunrise and Sunset\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/\",\"name\":\"Bryce Automation\",\"description\":\"Automating Home and Industry...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bryceautomation.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\",\"name\":\"Ricky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"caption\":\"Ricky\"},\"sameAs\":[\"http:\\\/\\\/bryceautomation.com\",\"https:\\\/\\\/www.facebook.com\\\/ricky.bryce.7\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ricky-bryce-4367a416\\\/\"],\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/author\\\/ricky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calculate Sunrise and Sunset in the SLC-500 or PLC-5","description":"Calculate Sunrise and Sunset using a simple method of entering values for each month, and setting a night mode based on percentage through the month.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/","og_locale":"en_US","og_type":"article","og_title":"Calculate Sunrise and Sunset in the SLC-500 or PLC-5","og_description":"Calculate Sunrise and Sunset using a simple method of entering values for each month, and setting a night mode based on percentage through the month.","og_url":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2020-02-18T20:41:20+00:00","article_modified_time":"2020-02-18T20:41:22+00:00","og_image":[{"width":480,"height":277,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png","type":"image\/png"}],"author":"Ricky","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"Calculate Sunrise and Sunset","datePublished":"2020-02-18T20:41:20+00:00","dateModified":"2020-02-18T20:41:22+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/"},"wordCount":815,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png","keywords":["Sunrise","Sunset"],"articleSection":["PLC-5","SLC500"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/","url":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/","name":"Calculate Sunrise and Sunset in the SLC-500 or PLC-5","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png","datePublished":"2020-02-18T20:41:20+00:00","dateModified":"2020-02-18T20:41:22+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"Calculate Sunrise and Sunset using a simple method of entering values for each month, and setting a night mode based on percentage through the month.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2020\/02\/sunrise9.png","width":480,"height":277,"caption":"Sunrise Sunset Calc"},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2020\/02\/18\/calculate-sunrise-and-sunset\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"Calculate Sunrise and Sunset"}]},{"@type":"WebSite","@id":"https:\/\/bryceautomation.com\/#website","url":"https:\/\/bryceautomation.com\/","name":"Bryce Automation","description":"Automating Home and Industry...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bryceautomation.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7","name":"Ricky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","url":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","caption":"Ricky"},"sameAs":["http:\/\/bryceautomation.com","https:\/\/www.facebook.com\/ricky.bryce.7","https:\/\/www.linkedin.com\/in\/ricky-bryce-4367a416\/"],"url":"https:\/\/bryceautomation.com\/index.php\/author\/ricky\/"}]}},"_links":{"self":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/2256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/comments?post=2256"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/2256\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/2267"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=2256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=2256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=2256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}