{"id":3762,"date":"2025-04-21T09:08:25","date_gmt":"2025-04-21T09:08:25","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=3762"},"modified":"2025-06-10T05:42:43","modified_gmt":"2025-06-10T05:42:43","slug":"4d_nackeventhandler-hash-function","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/","title":{"rendered":"# 4D_NackEvent(Handler) hash function"},"content":{"rendered":"\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-fixed-layout\"><tbody><tr><td>This is stuff you can safely ignore if it is hard to understand. It is really only needed if you need to trouble-shoot erratic communications with the 4D display<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>If something goes wrong in the communications between the SPLat and the 4D display (caused, for example, by a loose connection or some electrical noise), the 4D may send a NACK (Negative ACKnowledge) message to the SPLat. Two things happen if this occurs:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The SPLat (courtesy of the under-the-hood code generated by the hash functions) will attempt to repair the communication link by generating a special sequence of messages to the 4D display.<\/li>\n\n\n\n<li>If you have a\u00a0<code>4D_NackEvent(Handler)<\/code>\u00a0hash function in your program, a\u00a0<code>GoSub Handler<\/code>\u00a0will be executed. You can then have a subroutine with the label\u00a0<code>Handler<\/code>\u00a0(or whatever you want to call it) that does something useful, like for example count the number of NACKs for debugging purposes.<\/li>\n<\/ol>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>Say that somewhere in your program you have the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># 4D_ViSi  4D_NackEvent(evGotNack)\t;Declare the event handler for 4D NACK events\n<\/pre>\n\n\n\n<p>You could then have an event handler subroutine that looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o4952\">Event<\/a> handler for 4D NACK events<br>evGotNack:     IncM        bNACKcount    ;Count NACKs<br>               Return<br>bNACKcount:    defBYTE<\/pre>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-fixed-layout\"><tbody><tr><td>The protocol handler in SPLat does not have a retry-on-NACK mechanism. Our experience is that if a NACK occurs there has most likely been a loss of message sync, and the most important thing is to re-synchronise the communications.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This is stuff you can safely ignore if it is hard to understand. It is really only needed if you need to trouble-shoot erratic communications&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3756,"menu_order":4,"template":"","class_list":["post-3762","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># 4D_NackEvent(Handler) hash function - 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=\"# 4D_NackEvent(Handler) hash function - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"This is stuff you can safely ignore if it is hard to understand. It is really only needed if you need to trouble-shoot erratic communications...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T05:42:43+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/\",\"name\":\"# 4D_NackEvent(Handler) hash function - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-21T09:08:25+00:00\",\"dateModified\":\"2025-06-10T05:42:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deprecated\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"# 4D_ViSi hash command &#8211; MultiTrack+ only!\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"# 4D_NackEvent(Handler) hash function\"}]},{\"@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":"# 4D_NackEvent(Handler) hash function - 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":"# 4D_NackEvent(Handler) hash function - SPLat Controls","og_description":"This is stuff you can safely ignore if it is hard to understand. It is really only needed if you need to trouble-shoot erratic communications...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T05:42:43+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/","name":"# 4D_NackEvent(Handler) hash function - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-21T09:08:25+00:00","dateModified":"2025-06-10T05:42:43+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/4d_nackeventhandler-hash-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Deprecated","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/"},{"@type":"ListItem","position":3,"name":"# 4D_ViSi hash command &#8211; MultiTrack+ only!","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/4d_visi-hash-command-multitrack-only\/"},{"@type":"ListItem","position":4,"name":"# 4D_NackEvent(Handler) hash function"}]},{"@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\/3762","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\/3756"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}