{"id":3130,"date":"2025-04-17T08:49:03","date_gmt":"2025-04-17T08:49:03","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=3130"},"modified":"2025-06-10T12:40:13","modified_gmt":"2025-06-10T12:40:13","slug":"fstsincemark-d22","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/","title":{"rendered":"fSTSinceMark [D>=22]"},"content":{"rendered":"\n<p>Calculates the time elapsed since the last\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/multitrack-instructions\/marktime-d16\/\">MarkTime<\/a><\/code>\u00a0in\u00a0<em>the current task<\/em>. The result is returned as a floating point number in W. This will be an integer value in the range 0 to 16,777,215 times 10mS. This instruction may only be used a\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/\">MultiTrack<\/a>\u00a0task. It is based on the assumption that there was a prior\u00a0<code><code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/multitrack-instructions\/marktime-d16\/\">MarkTime<\/a><\/code><\/code>\u00a0instruction in this task (failing which the result is unpredictable).<\/p>\n\n\n\n<p>From dialect 20 some controllers allow you to program the 10mS basic &#8220;tick&#8221; interval over the range 1mS to 255mS via a setting in the\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o431\">CPU<\/a>\u00a0device. See the CPU device documentation for your controller.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Note<\/strong><br>SPLat 8 bit controllers (green boards) do not support the use of task timers if Multitrack multi-tasking is not running.&nbsp; In addition, on these controllers you cannot use Pause, WaitOnT, WaitOffT or WaitOnKT between a MarkTime and its corresponding fSTSinceMark or LoopIfTiming.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>SPLat 32 bit controllers (black boards) have none of these restrictions.&nbsp; So you can use task timers on a SPLat 32 bit controller even if you are single tasking and can use any of the Pause or Wait instructions together with MarkTime and its siblings.<\/p>\n\n\n\n<p>See\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/\">MultiTrack tutorial<\/a>.<\/p>\n\n\n\n<p><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o2825\">Dialect<\/a>\u00a0exclusions: Not available in dialects before 22.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example:<\/h6>\n\n\n\n<p>The following program has two tasks.\u00a0<code>Timer<\/code>\u00a0measures the duration of an &#8220;On press&#8221; of the push button on input 16 of an\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-controllers\/ms120-product-documentation\/ms120-operator-interface\/\">MS120<\/a>\u00a0and displays it on the LCD. Blinker blinks the LED on output 11 once per second as long as the button is depressed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><br>        On              20              ;Backlight<br>        LaunchTask      Timer<br>        LaunchTask      Blinker<br>        RunTasksForever<br> <br>;Measure and display button on-time        <br>Timer:<br>        WaitOn          16<br>        MarkTime                        ;Start timing<br>        WaitOff         16<br>        fSTSinceMark                    ;Get the elapsed time<br>        fLoadQ          10<br>        fMul<br>        OBLCD_SetCur    0,0<br>        OBLCD_fDispW    8,0<br>        OBLCD_Text      \"mS\"<br>        GoTo            Timer  <br>        <br>;Blink a LED while the button is on<br>Blinker:                       <br>        Off             11<br>        WaitOn          16<br>Blinker2:        <br>        On              11<br>        WaitOffT        16,5<br>        GoIfT           Blinker<br>        Off             11<br>        WaitOffT        16,95<br>        GoIfT           Blinker<br>        GoTo            Blinker2<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Calculates the time elapsed since the last\u00a0MarkTime\u00a0in\u00a0the current task. The result is returned as a floating point number in W. This will be an integer&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3129,"menu_order":0,"template":"","class_list":["post-3130","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>fSTSinceMark [D&gt;=22] - 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=\"fSTSinceMark [D&gt;=22] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Calculates the time elapsed since the last\u00a0MarkTime\u00a0in\u00a0the current task. The result is returned as a floating point number in W. This will be an integer...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T12:40:13+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\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/\",\"name\":\"fSTSinceMark [D>=22] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-17T08:49:03+00:00\",\"dateModified\":\"2025-06-10T12:40:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/#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\":\"Timing instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Elapsed Timers\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Task Timers\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/\"},{\"@type\":\"ListItem\",\"position\":7,\"name\":\"fSTSinceMark [D>=22]\"}]},{\"@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":"fSTSinceMark [D>=22] - 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":"fSTSinceMark [D>=22] - SPLat Controls","og_description":"Calculates the time elapsed since the last\u00a0MarkTime\u00a0in\u00a0the current task. The result is returned as a floating point number in W. This will be an integer...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T12:40:13+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\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/","name":"fSTSinceMark [D>=22] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-17T08:49:03+00:00","dateModified":"2025-06-10T12:40:13+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/fstsincemark-d22\/#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":"Timing instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/"},{"@type":"ListItem","position":5,"name":"Elapsed Timers","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/"},{"@type":"ListItem","position":6,"name":"Task Timers","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/"},{"@type":"ListItem","position":7,"name":"fSTSinceMark [D>=22]"}]},{"@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\/3130","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\/3129"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}