{"id":2547,"date":"2025-04-16T05:27:06","date_gmt":"2025-04-16T05:27:06","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2547"},"modified":"2025-06-10T11:19:27","modified_gmt":"2025-06-10T11:19:27","slug":"setbacklight","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/","title":{"rendered":"# SetBacklight()"},"content":{"rendered":"\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Valid For<\/th><td>#HMI<\/td><\/tr><tr><th>Applies To<\/th><td>HMI430<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This instruction configures the LCD backlight, both its brightness and time between switching between high, medium and off levels.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Function Prototype<\/h6>\n\n\n\n<pre class=\"wp-block-preformatted\">SetBacklight(<br>   h:HighLevel,<br>   m:MediumLevel,<br>   md:DelayFromLastPressToMediumLevel,<br>   od:DelayFromMediumLevelToLowLevel,<br>   p: IgnoreButtonPressWhenDim )<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Parameter<\/th><th>Option<\/th><th>Description<\/th><\/tr><tr><th>h<\/th><td>optional<\/td><td><strong>High<\/strong>&nbsp;backlight level as a normalised float, ie, 0.0 (off) thru 1.0 (max).&nbsp; Default is 1.0.<\/td><\/tr><tr><th>m<\/th><td>optional<\/td><td><strong>Medium<\/strong>&nbsp;backlight level as a normalised float, ie, 0.0 (off) thru 1.0 (max).&nbsp; Default is 0.3.<\/td><\/tr><tr><th>md<\/th><td>optional<\/td><td><strong>Medium Delay<\/strong>&nbsp;in seconds from the last touch until the medium level becomes active.&nbsp; A value of 0 means the medium level won&#8217;t be used at all.&nbsp; Buttons may be pressed while the display is at the medium level.&nbsp; Default time is 120s.<\/td><\/tr><tr><th>od<\/th><td>optional<\/td><td><strong>Off Delay<\/strong>&nbsp;in seconds from the time the medium level began.&nbsp; Buttons are ignored while the display is off.&nbsp; The first touch will simply &#8220;wake&#8221; the screen, restoring it to the high level.&nbsp; Default time is 10 minutes.&nbsp;&nbsp;&nbsp;<\/td><\/tr><tr><th>p&nbsp;&nbsp;&nbsp;<\/th><td>optional&nbsp;&nbsp;&nbsp;<\/td><td><strong>Ignore Press<\/strong>&nbsp;set to 1 to ignore any button press whilst the backlight is at the medium level.&nbsp; Hence the first press will restore the backlight to the high level and the second press will then act on the button.&nbsp; Default is 0, meaning the press is acted on.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Backlights have a limited life span, keep them on maximum and they&#8217;ll only run for a few thousand hours.&nbsp; So this instruction allows you to greatly increase the life of your backlight by turning it on only while someone is touching the screen. The backlight will be at the high level when the screen is touched.&nbsp; A set time after the last touch, it will then drop to the medium level.&nbsp; If it&#8217;s touched while at the medium level, buttons will respond and the backlight will return to the high level.&nbsp; However if it&#8217;s at the medium level and still not touched, it will then turn off.&nbsp; When off, the LCD will also turn off to help prevent pixel burn-in (which can actually happen to LCDs).<\/p>\n\n\n\n<p>It&#8217;s typical to set your backlight preferences at the start of your application.&nbsp; However, this instruction may be called at any time to alter the backlight settings.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Examples<\/h6>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetBacklight( h:1.0, m:0.3, md:30, od:60, p:0 )<\/pre>\n\n\n\n<p>Sets the backlight to maximum brightness, dimming to 30% after 30 seconds, then turning off after a further minute.&nbsp; Any press whilst the backlight is dim will be acted on.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetBacklight()<\/pre>\n\n\n\n<p>This will &#8220;kick&#8221; the backlight, forcing it to its high level and restarting the delay timers.&nbsp; No parameters will be changed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetBacklight( h:0.8, md:0, od:0 )<\/pre>\n\n\n\n<p>Sets the backlight to 80% and leaves it there forever.&nbsp; This isn&#8217;t a great idea as your backlight will die an early death.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Valid For #HMI Applies To HMI430 This instruction configures the LCD backlight, both its brightness and time between switching between high, medium and off levels&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2505,"menu_order":18,"template":"","class_list":["post-2547","spl_knowledgebase","type-spl_knowledgebase","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title># SetBacklight() - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"# SetBacklight() - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Valid For #HMI Applies To HMI430 This instruction configures the LCD backlight, both its brightness and time between switching between high, medium and off levels....\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T11:19:27+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/\",\"name\":\"# SetBacklight() - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-16T05:27:06+00:00\",\"dateModified\":\"2025-06-10T11:19:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming reference\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Instructions arranged by function\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"# Hash commands and functions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"# HMI Controller Instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"# SetBacklight()\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"# SetBacklight() - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"# SetBacklight() - SPLat Controls","og_description":"Valid For #HMI Applies To HMI430 This instruction configures the LCD backlight, both its brightness and time between switching between high, medium and off levels....","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T11:19:27+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/","name":"# SetBacklight() - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-16T05:27:06+00:00","dateModified":"2025-06-10T11:19:27+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/setbacklight\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Programming reference","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/"},{"@type":"ListItem","position":3,"name":"Instructions arranged by function","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/"},{"@type":"ListItem","position":4,"name":"# Hash commands and functions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/"},{"@type":"ListItem","position":5,"name":"# HMI Controller Instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/hash-commands-and-functions\/hmi-controller-instructions\/"},{"@type":"ListItem","position":6,"name":"# SetBacklight()"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/2547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/spl_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/2505"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}