{"id":3374,"date":"2025-04-18T05:51:17","date_gmt":"2025-04-18T05:51:17","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=3374"},"modified":"2025-06-10T11:01:31","modified_gmt":"2025-06-10T11:01:31","slug":"simplehmi-the-trace-feature","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/","title":{"rendered":"SimpleHMI: The trace feature"},"content":{"rendered":"\n<p>In SPLat\/PC the\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o5380\">SimpleHMI<\/a>\u00a0provides a second screen for event tracing. This has its own hash command,\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi_trace-hash-command\/\">HMI_Trace<\/a><\/code>, with its own set of permitted hash functions. The trace window displays whatever is sent by the SPLat controller on a scrolling display, so it can provide a record of past events. The same information can also be saved to a disk file.<\/p>\n\n\n\n<p>Run the following program in a SPLat controller to see how tracing differs from the regular SimpleHMI screen. The trace screen is made visible by the Show Trace button in the lower righthand corner of the SimpleHMI screen. You can write the trace data to disk as it comes in; select the Settings tab to set the trace file name.<\/p>\n\n\n\n<p>Trace is designed specifically to assist in debugging. There is also a&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-logging-feature\/\">data logging<\/a>&nbsp;feature that exists in the Android version as well.<\/p>\n\n\n\n<p><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/cutting-and-pasting-code-from-the-splat-knowledge-base\/\">(Click here<\/a>&nbsp;for some tips for working around problems with copy and paste out of Internet Explorer and HTML-help&nbsp;<code>(.chm)<\/code>&nbsp;files)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">;=============== Demonstrating the trace screen in SimpleHMI =======================<br>;Demonstrating the trace screen in SimpleHMI in SPLat\/PC<br>fTimer  defFLOAT<br>hTimer  defByte<br># HMI_Trace TraceOn()             ;Enable trace output<br>#\tOpen_Serial User(38400,8,N)    ;Initialise the serial port<br>#  <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o5243\">HMI<\/a> ConnectEvent(SimpleHMI_Init)\t<br>        GoSub           SimpleHMI_Init<br>        LaunchTask      TimeTickFloat <br>        LaunchTask      TimeTickHex <br>        RunTasksForever    <br>     <br>;Generate and display a floating point time counter     <br>TimeTickFloat:<br>        Pause           20        <br>        fRecallW        fTimer<br>        fLoadQ          0.2<br>        fAdd<br>        fStore          fTimer<br># HMI Cursor(0,5) FloatVar(fTimer,6,1)<br>        GoTo            TimeTickFloat<br><br>;Generate and display an 8-bit timer counter<br>TimeTickHex:<br>        Pause           100<br>        IncM            hTimer        <br># HMI Cursor(0,15) HexVar(hTimer)<br>        GoTo            TimeTickHex<br>        <br>;Button handlers     <br>TheFloatButton:<br>#       HMI_Trace Print(\"Float Button \") FloatVar(fTimer,6,1) NL()<br>        Return<br>        <br>TheHexButton:<br>#       HMI_Trace Print(\"Hex Button \") HexVar(hTimer) NL()<br>        Return        <br><br>;----- (re-)initialise the SimpleHMI screen ---------------        <br>SimpleHMI_Init:<br># HMI Reset() HideAllButtons() SetBGColour(200,200,200) SetFGColour(0,0,128) Cls()<br># HMI ButtonEvent(,10,9,3,20,\"Click me! (Float)\",TheFloatButton)        <br># HMI ButtonEvent(,15,9,3,20,\"Click me! (Hex)\",TheHexButton)        <br>        Return   <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In SPLat\/PC the\u00a0SimpleHMI\u00a0provides a second screen for event tracing. This has its own hash command,\u00a0HMI_Trace, with its own set of permitted hash functions. The trace&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3355,"menu_order":16,"template":"","class_list":["post-3374","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>SimpleHMI: The trace feature - 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=\"SimpleHMI: The trace feature - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"In SPLat\/PC the\u00a0SimpleHMI\u00a0provides a second screen for event tracing. This has its own hash command,\u00a0HMI_Trace, with its own set of permitted hash functions. The trace...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T11:01:31+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\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/\",\"name\":\"SimpleHMI: The trace feature - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-18T05:51:17+00:00\",\"dateModified\":\"2025-06-10T11:01:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials, application notes and white papers\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Tutorial: SimpleHMI programming of SPLat controllers\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"SimpleHMI: The trace feature\"}]},{\"@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":"SimpleHMI: The trace feature - 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":"SimpleHMI: The trace feature - SPLat Controls","og_description":"In SPLat\/PC the\u00a0SimpleHMI\u00a0provides a second screen for event tracing. This has its own hash command,\u00a0HMI_Trace, with its own set of permitted hash functions. The trace...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T11:01:31+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\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/","name":"SimpleHMI: The trace feature - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-18T05:51:17+00:00","dateModified":"2025-06-10T11:01:31+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/simplehmi-the-trace-feature\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Tutorials, application notes and white papers","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/"},{"@type":"ListItem","position":3,"name":"Tutorial: SimpleHMI programming of SPLat controllers","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-simplehmi-programming-of-splat-controllers\/"},{"@type":"ListItem","position":4,"name":"SimpleHMI: The trace feature"}]},{"@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\/3374","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\/3355"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}