{"id":3317,"date":"2025-04-18T04:50:16","date_gmt":"2025-04-18T04:50:16","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=3317"},"modified":"2025-06-10T09:24:58","modified_gmt":"2025-06-10T09:24:58","slug":"multitrack-advanced-multi-channel-operations","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/","title":{"rendered":"MultiTrack (Advanced): Multi-channel operations"},"content":{"rendered":"\n<p>An extremely innovative feature of MultiTrack is its special support for multi-channel operations. Say for example you have 4 identical channels of lighting controls. The multi-channel feature will allow you to use one single copy of your program and very easily process the 4 channels independently.<\/p>\n\n\n\n<p>The magic is done using a special register called J. With J you can launch several copies (called&nbsp;<em>instances<\/em>) of a task, each with a different value of J. When an instance of a task is executed, the J value for the particular instance is&nbsp;<em>automatically added<\/em>&nbsp;to all&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o414\">RAM<\/a>&nbsp;and I\/O addresses referenced by the task.<\/p>\n\n\n\n<p>The syntax for launching an instance of a task with a specified value of J is<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\tLaunchTask\tMyTask,3<\/pre>\n\n\n\n<p>This will launch an instance of&nbsp;<code>MyTask<\/code>&nbsp;with J set to&nbsp;<code>3<\/code>. In LaunchTask the J argument is optional. If you leave it out (which is what we&#8217;ve been doing up to this point), J is set to 0 and has no effect.<\/p>\n\n\n\n<p>You can also use the&nbsp;<code>LaunchTaskX<\/code>&nbsp;instruction, which takes the J value from the&nbsp;<a href=\"https:\/\/www.splatco.com\/skb\/352.htm#o3808\">X<\/a>&nbsp;register and pops the register stack.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\tLaunchTaskX\t MyTask<\/pre>\n\n\n\n<p>This will launch an instance of&nbsp;<code>MyTask<\/code>&nbsp;with J set to whatever number is in X.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example:<\/h6>\n\n\n\n<p>The following program is my boring old light on\/light off example. Each time a button on input 0 is pressed, a light on output 4 will alternate its state, i.e. if it&#8217;s off it turns on, if it&#8217;s already on it turns off:<\/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\">        LaunchTask      Toggle\n        RunTasksForever\n\nToggle:\n        WaitOnK         0\n        On              4\n        WaitOnK         0\n        Off             4\n        GoTo            Toggle<\/pre>\n\n\n\n<p>All I have to do to change this to a 4-channel switch, controlling 4 lights, is to launch 4 separate instances of&nbsp;<code>Toggle<\/code>, each with a different J value. The program still only contains one copy of&nbsp;<code>Toggle<\/code>, but there are 4 instances running, with each instance accessing different I\/O points. Here it is &#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">        LaunchTask      Toggle,0  ;Handles input 0, output 4\n        LaunchTask      Toggle,1  ;Handles input 1, output 5\n        LaunchTask      Toggle,2  ;Handles input 2, output 6\n        LaunchTask      Toggle,3  ;Handles input 3, output 7\n        RunTasksForever\n\nToggle:\n        WaitOnK         0\n        On              4\n        WaitOnK         0\n        Off             4\n        GoTo            Toggle<\/pre>\n\n\n\n<p>Copy this program into SPLat\/PC and study its operation. Display the registers (menu Window&gt;Registers or CTRL+R) and you will see the J register. As you single-step the program you will see J changing. For each of the instructions that access I\/O, J is added to the I\/O address in the instruction.<\/p>\n\n\n\n<p>If you are familiar with SPLat&#8217;s index register, I (as in letter &#8216;eye&#8217;), the principle of J will be fairly familiar. If not, don&#8217;t worry. The index register can be used with selected RAM and I\/O instructions to alter which address is actually accessed. The number in I gets added to the instruction address. This is called\u00a0<em>indexed addressing<\/em>. Similarly, in a MultiTrack task J gets added to addresses. Hence we call it\u00a0<em><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3499\">jndexed<\/a>\u00a0addressing<\/em>\u00a0(pronounce that however you like, I say &#8220;jindexed&#8221;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An extremely innovative feature of MultiTrack is its special support for multi-channel operations. Say for example you have 4 identical channels of lighting controls. The&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3299,"menu_order":13,"template":"","class_list":["post-3317","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>MultiTrack (Advanced): Multi-channel operations - 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=\"MultiTrack (Advanced): Multi-channel operations - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"An extremely innovative feature of MultiTrack is its special support for multi-channel operations. Say for example you have 4 identical channels of lighting controls. The...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T09:24:58+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=\"3 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-multitrack\/multitrack-advanced-multi-channel-operations\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/\",\"name\":\"MultiTrack (Advanced): Multi-channel operations - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-18T04:50:16+00:00\",\"dateModified\":\"2025-06-10T09:24:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/#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: MultiTrack\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"MultiTrack (Advanced): Multi-channel operations\"}]},{\"@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":"MultiTrack (Advanced): Multi-channel operations - 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":"MultiTrack (Advanced): Multi-channel operations - SPLat Controls","og_description":"An extremely innovative feature of MultiTrack is its special support for multi-channel operations. Say for example you have 4 identical channels of lighting controls. The...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T09:24:58+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/","name":"MultiTrack (Advanced): Multi-channel operations - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-18T04:50:16+00:00","dateModified":"2025-06-10T09:24:58+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/multitrack-advanced-multi-channel-operations\/#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: MultiTrack","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/"},{"@type":"ListItem","position":4,"name":"MultiTrack (Advanced): Multi-channel operations"}]},{"@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\/3317","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\/3299"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}