<root>
<document scada='0' projtype='1' schema='103' license='1,FREE_VERSION,TCW03R' title='New Embedded Project' description='' fcversion='720896' target='ESP.ESP32.ESP32_WROOM_32' >
	<config data='' clkspd='240000000' simspd='0' usewdt='0' constif='0' commport='6' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='1' head='#include &lt;esp_http_server.h&gt;
#include &lt;esp_wifi.h&gt;
#include &lt;esp_log.h&gt;
#include &lt;ctype.h&gt;
#include &lt;string.h&gt;
#include &quot;nvs_flash.h&quot;
#include &quot;nvs.h&quot;
#include &quot;freertos/FreeRTOS.h&quot;
#include &quot;freertos/task.h&quot;

#define MAX_FIELDS 15
#define NVS_NAMESPACE &quot;storage&quot;

const char Logo_Data_Global[] = MY_LOGO_DATA;
int G_NUM_FIELDS = 0;      
int G_FIELD_SIZES[MAX_FIELDS]; 
char G_LABELS[MAX_FIELDS][32]; 
char G_DEVICE_NAME[32]; 
httpd_handle_t server = NULL;

void url_decode(char *dst, const char *src) {
    char a, b;
    while (*src) {
        if ((*src == &apos;%&apos;) &amp;&amp; ((a = src[1]) &amp;&amp; (b = src[2])) &amp;&amp; (isxdigit(a) &amp;&amp; isxdigit(b))) {
            if (a &gt;= &apos;a&apos;) a -= &apos;a&apos; - &apos;A&apos;;
            if (a &gt;= &apos;A&apos;) a -= (&apos;A&apos; - 10); else a -= &apos;0&apos;;
            if (b &gt;= &apos;a&apos;) b -= &apos;a&apos; - &apos;A&apos;;
            if (b &gt;= &apos;A&apos;) b -= (&apos;A&apos; - 10); else b -= &apos;0&apos;;
            *dst++ = 16 * a + b; src += 3;
        } else if (*src == &apos;+&apos;) { *dst++ = &apos; &apos;; src++; }
        else { *dst++ = *src++; }
    }
    *dst++ = &apos;\0&apos;;
}

esp_err_t scan_handler(httpd_req_t *req) {
    wifi_scan_config_t scan_config = { .ssid = 0, .bssid = 0, .channel = 0, .show_hidden = false };
    esp_wifi_scan_start(&amp;scan_config, true);
    uint16_t number = 12;
    wifi_ap_record_t ap_info[12];
    esp_wifi_scan_get_ap_records(&amp;number, ap_info);
    char json[1024] = &quot;[&quot;;
    for (int i = 0; i &lt; number; i++) {
        char item[128];
        snprintf(item, sizeof(item), &quot;{\&quot;s\&quot;:\&quot;%s\&quot;}%s&quot;, ap_info[i].ssid, (i == number - 1) ? &quot;&quot; : &quot;,&quot;);
        strcat(json, item);
    }
    strcat(json, &quot;]&quot;);
    httpd_resp_set_type(req, &quot;application/json&quot;);
    return httpd_resp_send(req, json, -1);
}

esp_err_t reboot_handler(httpd_req_t *req) {
    httpd_resp_sendstr(req, &quot;Rebooting...&quot;);
    vTaskDelay(pdMS_TO_TICKS(500)); 
    esp_restart();                  
    return ESP_OK;
}

esp_err_t root_get_handler(httpd_req_t *req) {
    const char* h1 = &quot;&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;meta name=&apos;viewport&apos; content=&apos;width=device-width,initial-scale=1&apos;&gt;&quot;
        &quot;&lt;style&gt;&quot;
        &quot;:root{--bg:#0f172a; --card:#1e293b; --text:#f8fafc; --sub:#94a3b8; --border:#334155; --in:#0f172a; --accent:#38bdf8; --tbtn:#334155}&quot;
        &quot;.light-mode{--bg:#e2e8f0; --card:#f1f5f9; --text:#1e293b; --sub:#475569; --border:#cbd5e1; --in:#ffffff; --accent:#0284c7; --tbtn:#cbd5e1}&quot;
        &quot;*{box-sizing:border-box} body{font-family:sans-serif; background:var(--bg); margin:0; display:flex; justify-content:center; padding:20px; color:var(--text); transition:0.3s}&quot;
        &quot;.c{background:var(--card); padding:25px; border-radius:24px; width:100%; max-width:400px; box-shadow:0 10px 25px rgba(0,0,0,0.1); border:1px solid var(--border)}&quot;
        
        
        &quot;.header-row{display:flex; justify-content:space-between; align-items: flex-start; margin-bottom:10px}&quot; /* Reduced margin to pull Title up */
        &quot;.logo-wrap{margin:0}&quot;
        &quot;.logo-img{width:60px; height:60px; border-radius:12px; object-fit:contain; background:rgba(255,255,255,0.05)}&quot;
        
        
        &quot;h2{text-align:center; margin:0; color:var(--text); line-height:1.2}&quot; 
        &quot;.sub{text-align:center; color:var(--sub); font-size:14px; margin-bottom:15px}&quot;
        
        &quot;label{font-size:11px; font-weight:700; color:var(--accent); text-transform:uppercase; display:block; margin-top:15px}&quot;
        &quot;input,select{width:100%; height:45px; padding:0 12px; margin:8px 0; background:var(--in); border:1px solid var(--border); border-radius:12px; color:var(--text)}&quot;
        &quot;.row{display:flex; gap:8px; align-items:center; margin:8px 0} .row input{flex:1; margin:0!important}&quot;
        &quot;.scan-btn{height:45px; padding:0 15px; background:var(--accent); color:#fff; border:none; border-radius:12px; cursor:pointer; font-weight:700; flex-shrink:0; display:flex; align-items:center; gap:8px}&quot;
        &quot;.spin{width:14px; height:14px; border:2px solid #fff; border-top-color:transparent; border-radius:50%; display:none; animation:r 1s linear infinite}&quot;
        &quot;@keyframes r{to{transform:rotate(360deg)}}&quot;
        &quot;.btn{width:100%; background:linear-gradient(to right, #3b82f6, #8b5cf6); color:#fff; padding:15px; border:none; border-radius:12px; font-weight:700; margin-top:20px; cursor:pointer}&quot;
        &quot;.btn-alt{width:100%; background:var(--border); color:var(--text); padding:12px; border:none; border-radius:12px; font-weight:700; margin-top:10px; cursor:pointer}&quot;
        &quot;.m{display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.85); backdrop-filter:blur(5px)}&quot;
        &quot;.m-c{background:var(--card); margin:20vh auto; padding:30px; border-radius:20px; width:80%; max-width:300px; text-align:center; border:1px solid var(--accent)}&quot;
        &quot;.tgl{display:flex; align-items:center; gap:8px; margin-top:8px; font-size:12px; color:var(--sub)} .tgl input{width:18px!important; height:18px!important; margin:0!important; cursor:pointer}&quot;
        
        
        &quot;.theme-btn{background:var(--tbtn); border:none; color:var(--text); cursor:pointer; padding:8px 14px; border-radius:20px; display:flex; align-items:center; gap:8px; font-size:10px; font-weight:700; margin-top: 5px}&quot;
        &quot;svg{width:14px; height:14px; fill:none; stroke:var(--accent); stroke-width:3; stroke-linecap:round}&quot;
        &quot;&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&quot;
        &quot;&lt;div id=&apos;m&apos; class=&apos;m&apos;&gt;&lt;div class=&apos;m-c&apos;&gt;&lt;h3&gt;Saved!&lt;/h3&gt;&lt;p&gt;Settings stored.&lt;/p&gt;&quot;
        &quot;&lt;button class=&apos;btn&apos; onclick=&apos;rb()&apos;&gt;RESTART DEVICE&lt;/button&gt;&quot;
        &quot;&lt;button class=&apos;btn-alt&apos; onclick=&apos;location.reload()&apos;&gt;BACK TO SETTINGS&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&quot;
        &quot;&lt;div class=&apos;c&apos;&gt;&lt;div class=&apos;header-row&apos;&gt;&quot;
        &quot;&lt;div class=&apos;logo-wrap&apos;&gt;&lt;img class=&apos;logo-img&apos; src=&apos;data:image/png;base64,&quot;;

    httpd_resp_sendstr_chunk(req, h1);
    httpd_resp_sendstr_chunk(req, Logo_Data_Global);
    
    const char* h2 = &quot;&apos;&gt;&lt;/div&gt;&quot;
        &quot;&lt;button type=&apos;button&apos; class=&apos;theme-btn&apos; onclick=&apos;toggleTheme()&apos;&gt;&quot;
        &quot;&lt;svg viewBox=&apos;0 0 24 24&apos;&gt;&lt;path d=&apos;M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z&apos;&gt;&lt;/path&gt;&lt;/svg&gt;&quot;
        &quot;&lt;span id=&apos;th-lbl&apos;&gt;LIGHT MODE&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&quot;
        &quot;&lt;h2&gt;&quot;;

    httpd_resp_sendstr_chunk(req, h2);
    httpd_resp_sendstr_chunk(req, G_DEVICE_NAME); 
    httpd_resp_sendstr_chunk(req, &quot;&lt;/h2&gt;&lt;div class=&apos;sub&apos;&gt;Device Configuration&lt;/div&gt;&lt;form id=&apos;f&apos; onsubmit=&apos;sv(event)&apos;&gt;&quot;);

    nvs_handle_t h; nvs_open(NVS_NAMESPACE, NVS_READONLY, &amp;h);
    char s_val[135]; size_t n_sz;

    n_sz=64; strcpy(s_val, &quot;&quot;); nvs_get_str(h, &quot;wifi_ssid&quot;, s_val, &amp;n_sz);
    char ssid_sec[700];
    snprintf(ssid_sec, sizeof(ssid_sec), 
        &quot;&lt;label&gt;Network SSID&lt;/label&gt;&lt;div class=&apos;row&apos;&gt;&lt;input name=&apos;s&apos; id=&apos;s&apos; value=&apos;%s&apos; maxlength=&apos;32&apos;&gt;&quot;
        &quot;&lt;button type=&apos;button&apos; class=&apos;scan-btn&apos; id=&apos;sb&apos; onclick=&apos;scan()&apos;&gt;&lt;div class=&apos;spin&apos; id=&apos;sp&apos;&gt;&lt;/div&gt;&lt;span&gt;SCAN&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&quot;
        &quot;&lt;select id=&apos;sl&apos; style=&apos;display:none&apos; onchange=&apos;document.getElementById(\&quot;s\&quot;).value=this.value&apos;&gt;&lt;/select&gt;&quot;, s_val);
    httpd_resp_sendstr_chunk(req, ssid_sec);

    n_sz=64; strcpy(s_val, &quot;&quot;); nvs_get_str(h, &quot;wifi_pass&quot;, s_val, &amp;n_sz);
    char pass_sec[750];
    snprintf(pass_sec, sizeof(pass_sec), &quot;&lt;label&gt;Password&lt;/label&gt;&lt;input name=&apos;p&apos; type=&apos;password&apos; id=&apos;pw&apos; value=&apos;%s&apos; maxlength=&apos;64&apos;&gt;&quot;
        &quot;&lt;div class=&apos;tgl&apos;&gt;&lt;input type=&apos;checkbox&apos; id=&apos;sh&apos; onclick=&apos;document.getElementById(\&quot;pw\&quot;).type=this.checked?\&quot;text\&quot;:\&quot;password\&quot;&apos;&gt;&quot;
        &quot;&lt;label for=&apos;sh&apos; style=&apos;margin:0; text-transform:none; color:var(--sub); font-weight:400; font-size:12px; cursor:pointer&apos;&gt;Show Password&lt;/label&gt;&lt;/div&gt;&quot;, s_val);
    httpd_resp_sendstr_chunk(req, pass_sec);

    for(int i=0; i &lt; G_NUM_FIELDS; i++) {
        char key[16]; snprintf(key, 16, &quot;f%d&quot;, i);
        n_sz = 130; strcpy(s_val, &quot;&quot;); nvs_get_str(h, key, s_val, &amp;n_sz);
        char chunk[512];
        snprintf(chunk, sizeof(chunk), &quot;&lt;label&gt;%s&lt;/label&gt;&lt;input name=&apos;v%d&apos; maxlength=&apos;%d&apos; value=&apos;%s&apos;&gt;&quot;, 
                 G_LABELS[i], i, G_FIELD_SIZES[i], s_val);
        httpd_resp_sendstr_chunk(req, chunk);
    }
    nvs_close(h);

    const char* html_end = &quot;&lt;button type=&apos;submit&apos; class=&apos;btn&apos;&gt;APPLY CONFIGURATION&lt;/button&gt;&lt;/form&gt;&lt;/div&gt;&quot;
        &quot;&lt;script&gt;&quot;
        &quot;function updateLbl(){document.getElementById(&apos;th-lbl&apos;).innerText=document.body.classList.contains(&apos;light-mode&apos;)?&apos;DARK MODE&apos;:&apos;LIGHT MODE&apos;;}&quot;
        &quot;function toggleTheme(){document.body.classList.toggle(&apos;light-mode&apos;);localStorage.setItem(&apos;thm&apos;,document.body.classList.contains(&apos;light-mode&apos;)?&apos;L&apos;:&apos;D&apos;);updateLbl();}&quot;
        &quot;if(localStorage.getItem(&apos;thm&apos;)===&apos;L&apos;){document.body.classList.add(&apos;light-mode&apos;);updateLbl();}&quot;
        &quot;function scan(){var sl=document.getElementById(&apos;sl&apos;),sp=document.getElementById(&apos;sp&apos;);&quot;
        &quot;sp.style.display=&apos;block&apos;;sl.style.display=&apos;block&apos;;sl.innerHTML=&apos;&lt;option&gt;Scanning...&lt;/option&gt;&apos;;&quot;
        &quot;fetch(&apos;/scan&apos;).then(r=&gt;r.json()).then(d=&gt;{sp.style.display=&apos;none&apos;;sl.innerHTML=&apos;&lt;option value=\&quot;\&quot;&gt;-- Select --&lt;/option&gt;&apos;;&quot;
        &quot;d.forEach(n=&gt;{var o=document.createElement(&apos;option&apos;);o.value=o.text=n.s;sl.add(o);});});}&quot;
        &quot;function sv(e){e.preventDefault(); var btn=e.target.querySelector(&apos;.btn&apos;); btn.innerHTML=&apos;Saving...&apos;; &quot;
        &quot;fetch(&apos;/save&apos;,{method:&apos;POST&apos;, body:new URLSearchParams(new FormData(e.target))}).then(r=&gt;{if(r.ok)document.getElementById(&apos;m&apos;).style.display=&apos;block&apos;;});}&quot;
        &quot;function rb(){fetch(&apos;/reboot&apos;).then(()=&gt;{setTimeout(()=&gt;{location.reload();},2000);});}&quot;
        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;

    httpd_resp_sendstr_chunk(req, html_end);
    httpd_resp_sendstr_chunk(req, NULL);
    return ESP_OK;
}

esp_err_t save_post_handler(httpd_req_t *req) {
    int total_len = req-&gt;content_len;
    char *buf = malloc(total_len + 1);
    if (buf == NULL) return httpd_resp_send_500(req);

    int ret, received = 0;
    while (received &lt; total_len) {
        ret = httpd_req_recv(req, buf + received, total_len - received);
        if (ret &lt;= 0) { free(buf); return httpd_resp_send_500(req); }
        received += ret;
    }
    buf[total_len] = &apos;\0&apos;;

    nvs_handle_t h; nvs_open(NVS_NAMESPACE, NVS_READWRITE, &amp;h);
    char *raw = malloc(512); char *clean = malloc(512);
    
    if (raw &amp;&amp; clean) {
        if (httpd_query_key_value(buf, &quot;s&quot;, raw, 512) == ESP_OK) { 
            url_decode(clean, raw); nvs_set_str(h, &quot;wifi_ssid&quot;, clean); 
        }
        if (httpd_query_key_value(buf, &quot;p&quot;, raw, 512) == ESP_OK) { 
            url_decode(clean, raw); nvs_set_str(h, &quot;wifi_pass&quot;, clean); 
        }
        for(int i=0; i &lt; G_NUM_FIELDS; i++) {
            char search_key[16], nvs_key[16];
            snprintf(search_key, sizeof(search_key), &quot;v%d&quot;, i); 
            snprintf(nvs_key, sizeof(nvs_key), &quot;f%d&quot;, i);
            if (httpd_query_key_value(buf, search_key, raw, 512) == ESP_OK) { 
                url_decode(clean, raw); nvs_set_str(h, nvs_key, clean); 
            }
        }
        nvs_commit(h);
    }
    nvs_close(h);
    free(raw); free(clean); free(buf);
    
    httpd_resp_set_hdr(req, &quot;Connection&quot;, &quot;close&quot;);
    return httpd_resp_send(req, &quot;OK&quot;, -1);
}' body='' />
	<debug />
	<traces />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='1' />
			<data name='CalculatedCommsDelay' value='1' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='0' center='1' unitscale='0' fixedscale='0' fixedx='25' fixedy='25' fixedz='25' headcode='0' />
		<definition guid='4bd61668-ae6d-42a0-8606-8c31aa6a2d8b' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' bIsWysiwyg='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='' />
		<component class_type='root' codename='ComponentRoot' panelId='-1' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
			<resources />
			<properties >
				<property name='Base64 encoded png Logo' target='Logo_CSS' typeid='11' hidden='0' locked='0' info='' expansion='MY_LOGO_DATA' initialiser='($(value))' />
			</properties>
			<values >
				<value target='Logo_CSS' data='iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IB2cksfwAAAAlwSFlzAAASdAAAEnQB3mYfeAAAENZJREFUeJzNWvlbVFe2pYf3d3RMCWoSYwaTjl++TqJSVCFOINoahZoQmQcHnGLUqIlDbOwMGidUEBCQSRABAZGgsaO+bhOTl4jGgXlGUIsa99t7n3Mvowj2D93g+Uqqbp171tlrr732qfLw6PdTmF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ogS1qARx6MDHyB59PA7Ls/fje3KOlfvzFmqKTFauX/CXW7uNpGLTY/8bRD8T0VdaMg0WrHrfYf69+zenEnpxYg8+qXt0k8b0QcXb03zc4N7EAB2tX2jIPnI2q+6XtDwO+r3Xvp8Y/nkmpfD9x4/GvVy3Z/kv8kh2uuMXbIZ7Hjv/w2A60lpVLdrjjF2+7kbgp+fDpY+ff6260qiD+H3Sp2j4QFK8gAAAAAElFTkSuQmCC' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Custom' type='T8' description='' isconst='0' isHidden='0' isinit='1' usrinit='&quot; \&quot;\&quot; &quot;' setinit='{&quot;&quot;}' >
						<array size='15' />
						<array size='128' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Status' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PASS' type='T8' description='' isconst='0' isHidden='0' isinit='1' usrinit='&quot;&quot;' setinit='&quot;&quot;' >
						<array size='32' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Config_Button' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SSID' type='T8' description='' isconst='0' isHidden='0' isinit='1' usrinit='&quot;&quot;' setinit='&quot;&quot;' >
						<array size='32' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Create_custom_fields' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='NUM' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='SIZES' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='64' />
						</param>
						<param name='LABELS' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='128' />
						</param>
						<command class_type='native' title='Code' textshow='0' ccode='G_NUM_FIELDS = FCL_NUM;
memset(G_LABELS, 0, sizeof(G_LABELS));
memset(G_FIELD_SIZES, 0, sizeof(G_FIELD_SIZES));

char bufL[512];
strncpy(bufL, (char*)FCL_LABELS, 511);
char* tokL = strtok(bufL, &quot;,&quot;);
int i = 0;
while (tokL != NULL &amp;&amp; i &lt; G_NUM_FIELDS &amp;&amp; i &lt; MAX_FIELDS) {
    strncpy(G_LABELS[i], tokL, 31);
    tokL = strtok(NULL, &quot;,&quot;);
    i++;
}

char bufS[256];
strncpy(bufS, (char*)FCL_SIZES, 255);
char* tokS = strtok(bufS, &quot;,&quot;);
int j = 0;
while (tokS != NULL &amp;&amp; j &lt; G_NUM_FIELDS &amp;&amp; j &lt; MAX_FIELDS) {
    G_FIELD_SIZES[j] = atoi(tokS);
    tokS = strtok(NULL, &quot;,&quot;);
    j++;
}' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Serial_Print' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='i' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='SSID' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;\r\n&quot;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='PASS' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;\r\n&quot;' />
						</command>
						<command class_type='loop' title='Loop' type='2' forvar='.i' exp='15' >
							<flowline >
								<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
									<argument exp='Custom[.i]' />
								</command>
								<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
									<argument exp='&quot;\r\n&quot;' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Read_Custom_field' description='' statediag='0' >
						<return name='Return' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2000' />
						</return>
						<param name='INDEX' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='native' title='Code' textshow='0' ccode='// Enter C code below this comment
nvs_handle_t my_handle;
char key[16];
snprintf(key, sizeof(key), &quot;f%d&quot;, FCL_INDEX);
if (nvs_open(&quot;storage&quot;, NVS_READONLY, &amp;my_handle) == ESP_OK) {
    size_t required_size = 128;  
    if (nvs_get_str(my_handle, key, FCR_RETVAL, &amp;required_size) != ESP_OK) {
        strcpy(FCR_RETVAL, &quot;&quot;);
    }
    nvs_close(my_handle);

} else {
    strcpy(FCR_RETVAL, &quot;&quot;);
}' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Read_Password' description='' statediag='0' >
						<return name='Return' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2000' />
						</return>
						<command class_type='native' title='Code' textshow='0' ccode='// Enter C code below this comment
nvs_handle_t my_handle;
if (nvs_open(&quot;storage&quot;, NVS_READONLY, &amp;my_handle) == ESP_OK) {
    size_t required_size = 64;    
    if (nvs_get_str(my_handle, &quot;wifi_pass&quot;, FCR_RETVAL, &amp;required_size) != ESP_OK) {
        strcpy(FCR_RETVAL, &quot;&quot;);
    }
    nvs_close(my_handle);

} else {
    strcpy(FCR_RETVAL, &quot;&quot;);
}' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Read_SSID' description='' statediag='0' >
						<return name='Return' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2000' />
						</return>
						<command class_type='native' title='Code' textshow='0' ccode='// Enter C code below this comment
nvs_handle_t my_handle;
if (nvs_open(&quot;storage&quot;, NVS_READONLY, &amp;my_handle) == ESP_OK) {
    size_t required_size = 64;    
    if (nvs_get_str(my_handle, &quot;wifi_ssid&quot;, FCR_RETVAL, &amp;required_size) != ESP_OK) {
        strcpy(FCR_RETVAL, &quot;&quot;);
    }
    nvs_close(my_handle);

} else {
    strcpy(FCR_RETVAL, &quot;&quot;);
}' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialize_nvs' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='native' title='Initialize nvs flash storage' textshow='0' ccode='// Enter C code below this comment
esp_err_t nvs_ret = nvs_flash_init();
if (nvs_ret == ESP_ERR_NVS_NO_FREE_PAGES || nvs_ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
    nvs_flash_erase();
    nvs_flash_init();
}' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Start_Webserver' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='DEVICE_NAME' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='AP_SSID' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='32' />
						</param>
						<command class_type='native' title='Code' textshow='0' ccode='esp_netif_init();
esp_netif_create_default_wifi_ap();
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
esp_wifi_init(&amp;cfg);
esp_wifi_set_mode(WIFI_MODE_APSTA);

wifi_config_t ap_cfg = { .ap = { .channel = 1, .authmode = WIFI_AUTH_OPEN, .max_connection = 4 } };
strncpy((char*)ap_cfg.ap.ssid, (char*)FCL_AP_SSID, 31);
ap_cfg.ap.ssid_len = strlen((char*)ap_cfg.ap.ssid);
esp_wifi_set_config(WIFI_IF_AP, &amp;ap_cfg);
esp_wifi_start();

memset(G_DEVICE_NAME, 0, sizeof(G_DEVICE_NAME));
strncpy(G_DEVICE_NAME, (char*)FCL_DEVICE_NAME, 31);

httpd_config_t s_cfg = HTTPD_DEFAULT_CONFIG();
s_cfg.stack_size = 20480; 
s_cfg.max_uri_handlers = 12;
s_cfg.max_resp_headers = 64;           
s_cfg.lru_purge_enable = true;         

if (httpd_start(&amp;server, &amp;s_cfg) == ESP_OK) {
    httpd_uri_t r={.uri=&quot;/&quot;, .method=HTTP_GET, .handler=root_get_handler}; 
    httpd_register_uri_handler(server, &amp;r);
    
    httpd_uri_t s={.uri=&quot;/save&quot;, .method=HTTP_POST, .handler=save_post_handler}; 
    httpd_register_uri_handler(server, &amp;s);
    
    httpd_uri_t sc={.uri=&quot;/scan&quot;, .method=HTTP_GET, .handler=scan_handler}; 
    httpd_register_uri_handler(server, &amp;sc);

    httpd_uri_t rb={.uri=&quot;/reboot&quot;, .method=HTTP_GET, .handler=reboot_handler}; 
    httpd_register_uri_handler(server, &amp;rb);
}' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='i' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='call' title='User Macro' macro='Initialize_nvs' />
						<command class_type='call' title='Component Macro' component='Switch_Push_Button1' macro='ReadState' >
							<return exp='Config_Button' />
						</command>
						<command class_type='call' title='Component Macro' component='LEDMono1' macro='TurnOff' />
						<command class_type='decision' title='Decision' exp='Config_Button' swap='0' >
							<flowline >
								<command class_type='call' title='User Macro' macro='Create_custom_fields' >
									<argument exp='15' />
									<argument exp='&quot;128,128,128,128,128,128,128,128,128,128,128,128,128,128,128&quot;' />
									<argument exp='&quot;Custom Field-1, Custom Field-2,Custom Field-3, Custom Field-4, Custom Field-5, Custom Field-6, Custom Field-7, Custom Field-8, Custom Field-9, Custom Field-10, Custom Field-11, Custom Field-12, Custom Field-13, Custom Field-14, Custom Field-15&quot;' />
								</command>
								<command class_type='call' title='User Macro' macro='Start_Webserver' >
									<argument exp='&quot;MY DEVICE&quot;' />
									<argument exp='&quot;My Device Config&quot;' />
								</command>
								<command class_type='loop' title='Loop' type='3' exp='1' >
									<flowline >
										<command class_type='call' title='Component Macro' component='LEDMono1' macro='TurnOn' />
										<command class_type='delay' title='Delay' exp='200' type='1' />
										<command class_type='call' title='Component Macro' component='LEDMono1' macro='TurnOff' />
										<command class_type='delay' title='Delay' exp='200' type='1' />
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='User Macro' macro='Read_SSID' >
							<return exp='SSID' />
						</command>
						<command class_type='call' title='User Macro' macro='Read_Password' >
							<return exp='PASS' />
						</command>
						<command class_type='loop' title='Loop' type='2' forvar='.i' exp='15' >
							<flowline >
								<command class_type='call' title='User Macro' macro='Read_Custom_field' >
									<return exp='Custom[.i]' />
									<argument exp='.i' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='Initialise' />
						<command class_type='call' title='Component Macro' component='WLAN_ESP32' macro='Initialise' />
						<command class_type='call' title='Component Macro' component='WLAN_ESP32' macro='ConnectToSSID' >
							<return exp='Status' />
							<argument exp='SSID' />
							<argument exp='PASS' />
							<argument exp='20' />
						</command>
						<command class_type='decision' title='Decision' exp='Status' swap='0' >
							<flowline >
								<command class_type='call' title='Component Macro' component='LEDMono1' macro='TurnOn' />
							</flowline>
							<flowline >
								<command class_type='call' title='Component Macro' component='LEDMono1' macro='TurnOff' />
							</flowline>
						</command>
						<command class_type='call' title='User Macro' macro='Serial_Print' />
						<command class_type='loop' title='Loop' type='3' exp='1' >
							<flowline >
								<command class_type='delay' title='Delay' exp='1' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='e2698f3e-1168-4f25-9c50-24a74ea7e34a' vmin='0' vmaj='20' codename='Switch_Push_Button1' panelId='0' x='78' y='-184' z='0' xsz='25' ysz='42.4253' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='AppDevDetected' data='0' />
					<value target='SimulationOnly' data='0' />
					<value target='Pin' data='$GPIO34' />
					<value target='Polarity' data='000' />
					<value target='debounce' data='50' />
					<value target='Latching' data='0' />
					<value target='ComponentLabel' data='000' />
					<value target='GdiText2::sText' data='Switch_Push_Button1' />
					<value target='ComponentLabelPosition' data='000' />
					<value target='ComponentLabelXPostion' data='0' />
					<value target='ComponentLabelYPostion' data='0.800000' />
					<value target='LabelColour' data='7895160' />
					<value target='ShowConnectionLabel' data='0' />
					<value target='ShowPinValue' data='0' />
					<value target='PinLabelPosition' data='001' />
					<value target='PinLabelXPostion' data='0' />
					<value target='PinLabelYPostion' data='-1.000000' />
					<value target='Style' data='000' />
					<value target='GdiSwitch1::nType' data='  2' />
					<value target='GdiSwitch1::sLabelOn' data='On' />
					<value target='GdiSwitch1::sLabelOff' data='Off' />
					<value target='FontType' data='Calibri' />
					<value target='GdiSwitch1::dScale' data='0.65' />
					<value target='GdiText2::dScale' data='0.65' />
					<value target='GdiText1::dScale' data='0.65' />
					<value target='GdiSwitch1::brOutline' data='71776119061217280' />
					<value target='GdiSwitch1::brOuterFillOn' data='251262225375821824' />
					<value target='GdiSwitch1::brFill' data='251262225375821824' />
					<value target='GdiSwitch1::brOutlineThumb' data='71917408452870144' />
					<value target='GdiSwitch1::brFillThumb' data='288090190566653952' />
					<value target='GdiSwitch1::brFillOn' data='648292728253186048' />
					<value target='GdiSwitch1::brLabelOn' data='0' />
					<value target='GdiSwitch1::brFillOff' data='648237171995574272' />
					<value target='GdiSwitch1::brLabelOff' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='44f82374-a417-40d5-bd42-23a177a390d2' vmin='0' vmaj='19' codename='LEDMono1' panelId='0' x='166' y='-200' z='1' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='AppDevDetected' data='0' />
					<value target='SimulationOnly' data='0' />
					<value target='Pin' data='$GPIO2' />
					<value target='ComponentLabel' data='000' />
					<value target='GdiText2::sText' data='LEDMono1' />
					<value target='ComponentLabelPosition' data='000' />
					<value target='ComponentLabelXPostion' data='0' />
					<value target='ComponentLabelYPostion' data='20.000000' />
					<value target='LabelColour' data='7895160' />
					<value target='Polarity' data='001' />
					<value target='ShowConnectionLabel' data='1' />
					<value target='ShowPinValue' data='0' />
					<value target='PinLabelPosition' data='001' />
					<value target='PinLabelXPostion' data='0' />
					<value target='PinLabelYPostion' data='-25.000000' />
					<value target='Shape' data='000' />
					<value target='Colour' data='000' />
					<value target='Style' data='001' />
					<value target='AutoOffColour' data='1' />
					<value target='OnColour' data='65280' />
					<value target='OffColour' data='10752' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='f0f54e46-0848-4930-9bb6-eff9a34ed229' vmin='4' vmaj='2' codename='WLAN_ESP32' panelId='0' x='78' y='-76' z='2' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Verbose' data='0' />
					<value target='SSIDScanSize' data='8' />
					<value target='RemapIndex' data='22' />
					<value target='TCP_Base1::interface' data='2' />
					<value target='TCP_Base1::ConsoleData' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='3' codename='UART1' panelId='0' x='242' y='-74' z='3' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='001' />
					<value target='cal_uart::BAUD_LIST' data='009' />
					<value target='cal_uart::BAUD' data='115200' />
					<value target='cal_uart::DBITS' data='008' />
					<value target='cal_uart::RETURN' data='001' />
					<value target='cal_uart::ECHO' data='000' />
					<value target='cal_uart::UseTX' data='1' />
					<value target='cal_uart::TX' data='$PORTA.1' />
					<value target='cal_uart::OutputPins' data='000' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::UseRX' data='1' />
					<value target='cal_uart::RX' data='$PORTA.3' />
					<value target='cal_uart::InputPins' data='001' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::FLOWEN' data='000' />
					<value target='cal_uart::RTS' data='$PORTB.2' />
					<value target='cal_uart::CTS' data='$PORTB.1' />
					<value target='label' data='UART' />
					<value target='cal_uart::ScopeTraces' data='0' />
					<value target='cal_uart::ConsoleData' data='1' />
					<value target='cal_uart::ConsoleFormat' data='000' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='000' />
					<value target='cal_uart::com_port' data='000' />
					<value target='cal_uart::Injector' data='000' />
					<value target='cal_uart::APIUseDDR' data='' />
					<value target='cal_uart::APIDDRPin' data='' />
					<value target='cal_uart::APIDDRRXState' data='' />
					<value target='cal_uart::APIUseFC' data='' />
					<value target='cal_uart::APICTSPin' data='' />
					<value target='cal_uart::APIRTSPin' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='7292207' img='' style='0' />
		<camera xe='0' ye='0' ze='585.158' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='259' dy='808' zoom='53.5565' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
		<winpos ID='7005' RectRecentFloat='1368,148,1830,1022' RectRecentDocked='0,0,259,837' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='781.66' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
		<winpos ID='7004' RectRecentFloat='1631,626,1879,1080' RectRecentDocked='0,0,259,812' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='2D Panel' type='0' >
			<winpos ID='1171' RectRecentFloat='1427,235,1824,649' RectRecentDocked='1278,183,1920,995' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
			<background fill='72057594035109759' showgrid='1' gridstyle='1' gridsize='25' gridbrush='71776119075691740' snaptogrid='0' fitcomp='0' disp_x='300' disp_y='400' scale='100' disp_col='16777215' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='240' flags='0' />
		<view type='0' name='Initialize_nvs' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Read_Custom_field' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Read_Password' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Read_SSID' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Start_Webserver' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Create_custom_fields' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Serial_Print' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA2gMAACcDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
