{"id":2197,"date":"2025-04-15T08:16:32","date_gmt":"2025-04-15T08:16:32","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2197"},"modified":"2025-05-02T06:08:07","modified_gmt":"2025-05-02T06:08:07","slug":"fanin-c-d18","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/","title":{"rendered":"fAnIn c+ [D>=18]"},"content":{"rendered":"\n<p><code>W = (analog in c)<\/code><\/p>\n\n\n\n<p>Reads analog input channel&nbsp;<code>c<\/code>&nbsp;as a normalized floating point number.<\/p>\n\n\n\n<p>The analog value is returned in W as a normalized number. That means it is always between 0 and 1, representing a fraction of full scale value. For example, if the analog input range is 0-10V, 5V will give a value of 0.5. The actual number obtained is the closest approximation available given the resolution and accuracy of the analog input. The higher the resolution of the analog input, the closer the approximation will be.<\/p>\n\n\n\n<p>This instruction breaks with our past practice of using letter designations for analog inputs and outputs. Instead we use numeric channel numbers. The correspondence between letter designation and channel number is simply that A=0, B=1, C=2 etc. The analog window in SPLat\/PC from V7.18.0 shows both schemes.<\/p>\n\n\n\n<p>Analog I\/O using normalized floating point numbers has three advantages:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>It handles analog resolution greater than 8 bits. Because the old AnIn and Anout work through&nbsp;<a href=\"https:\/\/www.splatco.com\/skb\/352.htm#o3808\">X<\/a>, and X is an 8-bit register, they are limited to 8-bit I\/O.<\/li>\n\n\n\n<li>If you write your program using only floating point analog I\/O, if and when you switch to a SPLat controller with higher analog resolution, you program will work exactly as before but return higher resolution results.<\/li>\n\n\n\n<li>The instructions can be\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3499\">jndexed<\/a>.<\/li>\n<\/ol>\n\n\n\n<p>If you write your program using only floating point analog I\/O, if and when you switch to a SPLat controller with higher analog resolution, your program will work exactly as before but return higher resolution results. However, this instruction cannot deliver more analog resolution than the board hardware is capable of. Please see the documentation for your particular board.<\/p>\n\n\n\n<p>The channel number\u00a0<code>c<\/code>\u00a0will be jndexed when executed inside a\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-multitrack\/\">MultiTrack<\/a>\u00a0task and will be indexed if the instruction is preceded by the\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/precodes\/iasj-precode-d16\/\">IasJ<\/a><a href=\"https:\/\/www.splatco.com\/skb\/3497.htm\">:<\/a><\/code>\u00a0precode.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.splatco.com\/skb\/352.htm#o2825\">Dialect<\/a>&nbsp;exclusions: Not available in dialects before 18<\/p>\n\n\n\n<p>See also\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/anin\/\">AnIn<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/anout\/\">AnOut<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanout-c-d18\/\">fAnOut<\/a><\/code><\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>W = (analog in c) Reads analog input channel&nbsp;c&nbsp;as a normalized floating point number. The analog value is returned in W as a normalized number&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2193,"menu_order":2,"template":"","class_list":["post-2197","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>fAnIn c+ [D&gt;=18] - 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=\"fAnIn c+ [D&gt;=18] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"W = (analog in c) Reads analog input channel&nbsp;c&nbsp;as a normalized floating point number. The analog value is returned in W as a normalized number....\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-02T06:08:07+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\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/\",\"name\":\"fAnIn c+ [D>=18] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-15T08:16:32+00:00\",\"dateModified\":\"2025-05-02T06:08:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/#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\":\"Analog instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"fAnIn c+ [D&gt;=18]\"}]},{\"@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":"fAnIn c+ [D>=18] - 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":"fAnIn c+ [D>=18] - SPLat Controls","og_description":"W = (analog in c) Reads analog input channel&nbsp;c&nbsp;as a normalized floating point number. The analog value is returned in W as a normalized number....","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/","og_site_name":"SPLat Controls","article_modified_time":"2025-05-02T06:08:07+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\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/","name":"fAnIn c+ [D>=18] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-15T08:16:32+00:00","dateModified":"2025-05-02T06:08:07+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/#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":"Analog instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/"},{"@type":"ListItem","position":5,"name":"fAnIn c+ [D&gt;=18]"}]},{"@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\/2197","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\/2193"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}