{"id":1981,"date":"2025-04-14T12:16:47","date_gmt":"2025-04-14T12:16:47","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=1981"},"modified":"2025-06-10T09:04:24","modified_gmt":"2025-06-10T09:04:24","slug":"sx10508-more-on-serial-programming","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/","title":{"rendered":"SX10508: Serial Logging"},"content":{"rendered":"\n<p>The SX10508 allows data to be logged over a serial port.<\/p>\n\n\n\n<p>Apart from a few special commands (listed below), anything sent over the serial port will be logged to the file.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Special Commands<\/h6>\n\n\n\n<p>Commands are sent to the logger in ASCII format, wrapped in &#8220;curly braces&#8221;.&nbsp; Keyword (command) matches are generally case-insensitive, so for example&nbsp;<code>{newfile}<\/code>&nbsp; could be written as&nbsp;<code>{NEWFILE}<\/code>&nbsp;or&nbsp;<code>{nEwFiLe}<\/code>, etc.&nbsp; Matching is performed using the&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/any-serial-port\/acomrx_strfind-ppc-d28\/\">aComRx_StrFind<\/a>&nbsp;command.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">{DateStamp e\/n\/Y H:M}<\/h6>\n\n\n\n<p>&nbsp;This command instructs the logger to insert a date stamp from its current Real-Time Clock value in the given format.&nbsp; The arguments could be in any desired order, with any desired separators (?, :, etc).&nbsp; These arguments are case-sensitive.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Argument<\/strong><\/td><td><strong>Meaning&nbsp;&nbsp;&nbsp;<\/strong><\/td><td><strong>Notes<\/strong><\/td><\/tr><tr><td>a<\/td><td>Day of Week<\/td><td>Writes the abbreviated name of the current day of the week (Mon-Sun)<\/td><\/tr><tr><td>e<\/td><td>Day of Month<\/td><td>Writes the current day of the month (1-31)<\/td><\/tr><tr><td>m<\/td><td>Month 0<\/td><td>Writes the current month as a number with a leading 0 (01-12)<\/td><\/tr><tr><td>n<\/td><td>Month<\/td><td>Writes the current month as a number (1-12)<\/td><\/tr><tr><td>Y<\/td><td>Year<\/td><td>Writes the current year as a 4-digit number, epoch 2000 (2000-2099)<\/td><\/tr><tr><td>H<\/td><td>Hour<\/td><td>Writes the current hour in 24-hour format with a leading 0 (00-23)<\/td><\/tr><tr><td>l<\/td><td>12-Hour<\/td><td>Writes the current hour in 12-hour format with a leading 0 (01-12)<\/td><\/tr><tr><td>M<\/td><td>Minute<\/td><td>Writes the current minute with a leading 0 (00-59)<\/td><\/tr><tr><td>S<\/td><td>Second<\/td><td>Writes the current second with a leading 0 (00-59)<\/td><\/tr><tr><td>P<\/td><td>am\/pm<\/td><td>Writes &#8220;am&#8221; or &#8220;pm&#8221; in lower-case<\/td><\/tr><tr><td>p<\/td><td>AM\/PM<\/td><td>Writes &#8220;AM&#8221; or &#8220;PM&#8221; in upper-case<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Yes, the &#8220;P&#8221; and the &#8220;p&#8221; write &#8220;am\/pm&#8221; or &#8220;AM\/PM&#8221; in the opposite case to the &#8220;P&#8221; or the &#8220;p&#8221;.&nbsp; Full SPLat source for this &#8220;default&#8221; application is available on the website&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/05\/sx10508_default_app-1.zip\">here<\/a>, so you can adjust it if you like (or even add new keywords).<\/p>\n\n\n\n<p>The format in the heading will create a datestamp as follows:<\/p>\n\n\n\n<p><code>d\/m\/20yy HH:MM<\/code><\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<p><code>27\/11\/2019 01:23<\/code><\/p>\n\n\n\n<h6 class=\"wp-block-heading\">{NewFile}<\/h6>\n\n\n\n<p>This command instructs the logger to close the existing file and create a new file.&nbsp; There is no option to set the file name in this format: It simply increments the number of the file.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">{NewFile filename.ext}<\/h6>\n\n\n\n<p>This command is new from 17 March 2023 (firmware version 4.7, SPLatware version 2.1.5).&nbsp; It instructs the logger to close the existing file and create a new file with the configured name in 8.3 format (fewer characters is also allowable).&nbsp; If the file name matches one already on the SD card, it will overwrite the existing file.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">{FlushData}<\/h6>\n\n\n\n<p>This causes the data in the buffer to be written to the SD card.&nbsp; Use this command sparingly: It contributes to wear on the SD card.<\/p>\n\n\n\n<p>If you don&#8217;t use this, however, the data won&#8217;t be written until the 32KB buffer in the card hardware is full.<\/p>\n\n\n\n<p>Most of the above formats and comments apply for&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-xwire-logging\/\">Xwire logging<\/a>&nbsp;as well.<\/p>\n\n\n\n<p>&nbsp;See also&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-serial-logging\/\">Serial Programming<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The SX10508 allows data to be logged over a serial port. Apart from a few special commands (listed below), anything sent over the serial port&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1962,"menu_order":6,"template":"","class_list":["post-1981","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>SX10508: Serial Logging - 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=\"SX10508: Serial Logging - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"The SX10508 allows data to be logged over a serial port. Apart from a few special commands (listed below), anything sent over the serial port...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T09:04:24+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\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/\",\"name\":\"SX10508: Serial Logging - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-14T12:16:47+00:00\",\"dateModified\":\"2025-06-10T09:04:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product documentation\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Product documentation: Xwire peripherals\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"SX10508: Xwire SD Logger\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SX10508: Serial Logging\"}]},{\"@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":"SX10508: Serial Logging - 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":"SX10508: Serial Logging - SPLat Controls","og_description":"The SX10508 allows data to be logged over a serial port. Apart from a few special commands (listed below), anything sent over the serial port...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T09:04:24+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\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/","name":"SX10508: Serial Logging - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-14T12:16:47+00:00","dateModified":"2025-06-10T09:04:24+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/sx10508-more-on-serial-programming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Product documentation","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/"},{"@type":"ListItem","position":3,"name":"Product documentation: Xwire peripherals","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/"},{"@type":"ListItem","position":4,"name":"SX10508: Xwire SD Logger","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10508-xwire-sd-logger\/"},{"@type":"ListItem","position":5,"name":"SX10508: Serial Logging"}]},{"@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\/1981","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\/1962"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=1981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}