{"id":2876,"date":"2019-03-25T17:41:38","date_gmt":"2019-03-25T20:41:38","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/"},"modified":"2020-01-20T17:19:16","modified_gmt":"2020-01-20T20:19:16","slug":"how-to-create-a-basic-loginlogout-system-for-elipse-scada","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/","title":{"rendered":"How to create a basic login\/logout system for Elipse SCADA."},"content":{"rendered":"<div style=\"text-align: justify;\">To create a basic login\/logout system for users of Elipse SCADA, you must first make sure that users have been created. To do so, just open the Organizer and, at <span style=\"font-weight: bold;\">Users <\/span>menu, create as many users as needed.<br \/>\n<br style=\"font-weight: bold;\" \/><br style=\"font-weight: bold;\" \/><span style=\"font-weight: bold;\">LOGIN and LOGOUT browsing buttons<\/span><\/p>\n<p>Create a <span style=\"font-weight: bold;\">momentary <\/span>button on your application&#8217;s Initial Screen with the message &#8220;LOGIN&#8221;. Write the following script at this button&#8217;s <span style=\"font-style: italic;\">OnPress <\/span>event:<\/p>\n<p><span style=\"font-family: Courier New; color: #000000;\">Aplication.Login()<\/span><\/p>\n<p>This function opens up a box for inserting usernames and passwords. When pressing <span style=\"font-weight: bold;\">OK<\/span>, if the information is correct, the application will understand there is a user logged in the system.<\/p>\n<p>Then, create &#8220;LOGOUT&#8221; buttons on the other screens in the application. They must display the following script (also at <span style=\"font-style: italic;\">OnPress <\/span>event):<\/p>\n<p><span style=\"font-family: Courier New; color: #000000;\">Aplication.Logout()<\/span><\/p>\n<p>When clicking one of these buttons, the application understands there is no user logged in the system.<\/p>\n<p><br style=\"font-weight: bold;\" \/><span style=\"font-weight: bold;\">Login and logout actions <\/span><\/p>\n<p>The next step is to choose the course of action to be taken when logging in or out the application. In the example, a new screen is open whenever a user logs in the application and the initial screen returns when they log out the application.<\/p>\n<p>At the Organizer, create a script at Application&#8217;s <span style=\"font-style: italic;\">OnUserLogin <\/span>event:<\/p>\n<p><span style=\"font-family: Courier New; color: #000000;\">Screen2.Activate()<\/span><\/p>\n<p>In this case, the login will cause the other screen to open.<\/p>\n<p>Then, write the following script at Application&#8217;s <span style=\"font-style: italic;\">OnUserLogout <\/span>event:<br \/>\n<br style=\"font-family: Courier New; color: #000000;\" \/><span style=\"font-family: Courier New; color: #000000;\">InitialScreen.Activate()<\/span><\/p>\n<p>In this case, the logout will cause the Initial Screen to open; thus, the user will have to use the former button to log in, and then continue browsing the other screens.<\/p>\n<p><span style=\"font-weight: bold;\">Error message for incorrect login <\/span><\/p>\n<p>If you type an incorrect username and\/or password, the application&#8217;s <span style=\"font-style: italic;\">Login()<\/span> function&#8217;s default behavior is to do nothing. But you can add an error message to this system, so it will have a clearer outlook.<\/p>\n<p>Elipse SCADA&#8217;s Global Manager has a property called <span style=\"font-style: italic;\">lastError<\/span>, which will return values according to the action executed in the login box. <span style=\"font-style: italic;\">Login()<\/span> function also returns values that can be used in this situation.<\/p>\n<p>However, to keep this system simple, we will create an internal tag indicating whether there is a user logged in. Its values are <span style=\"font-weight: bold;\">0 <\/span>(no user logged in) and <span style=\"font-weight: bold;\">1 <\/span>(a user logged in).<\/p>\n<p>To do so, create a RAM tag called <span style=\"font-weight: bold;\">LoggedUser<\/span>. Then, add the following line at the Application&#8217;s <span style=\"font-style: italic;\">OnUserLogin <\/span>event:<\/p>\n<p><span style=\"font-family: Courier New; color: #000000;\">LoggedUser = 1<\/span><\/p>\n<p>Do the same at <span style=\"font-style: italic;\">OnUserLogout <\/span>event, but use value 0 instead.<\/p>\n<p><span style=\"font-family: Courier New; color: #000000;\">LoggedUser = 0<\/span><\/p>\n<p>Then, add a script to &#8220;LOGIN&#8221; button to test the tag&#8217;s value, checking for the presence of logged in users. If there are no users logged in, it will display the following error message:<br \/>\n<br style=\"font-family: Courier New; color: #000000;\" \/><span style=\"font-family: Courier New; color: #000000;\">Application.Login()<\/span><br style=\"font-family: Courier New; color: #000000;\" \/><span style=\"font-family: Courier New; color: #000000;\">IF LoggedUser == 0<\/span><br style=\"font-family: Courier New; color: #000000;\" \/><span style=\"font-family: Courier New; color: #000000;\">\u00a0\u00a0\u00a0\u00a0 MessageBox (&#8220;Username or password incorrect! &#8220;)<\/span><br style=\"font-family: Courier New; color: #000000;\" \/><span style=\"font-family: Courier New; color: #000000;\">ENDIF<\/span><br style=\"font-family: Courier New; color: #000000;\" \/><\/p>\n<p><span style=\"font-weight: bold;\">Final Remarks<\/span><\/p>\n<p>This article has demonstrated how relatively easy it is to create a basic login\/logout system for your application, as long as proper care is taken during <span style=\"text-decoration: underline;\">screen browsing<\/span>. For example, make sure the logout will open the main screen, so it does not become impossible for the user to log in again later.<\/p>\n<p>Also, several other features can be implemented, such as displays showing the logged in user&#8217;s username and access level, among others. For these, we suggest you refer to Elipse SCADA&#8217;s <span style=\"font-weight: bold;\">User&#8217;s Manual<\/span>, installed alongside the software.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>To create a basic login\/logout system for users of Elipse SCADA, you must first make sure that users have been created. To do so, just open the Organizer and, at&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[770,775],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create a basic login\/logout system for Elipse SCADA. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create a basic login\/logout system for Elipse SCADA.\" \/>\n<meta property=\"og:description\" content=\"To create a basic login\/logout system for users of Elipse SCADA, you must first make sure that users have been created. To do so, just open the Organizer and, at&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:41:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-20T20:19:16+00:00\" \/>\n<meta name=\"author\" content=\"Elipse Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elipse Software\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\"},\"author\":{\"name\":\"Elipse Software\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\"},\"headline\":\"How to create a basic login\/logout system for Elipse SCADA.\",\"datePublished\":\"2019-03-25T20:41:38+00:00\",\"dateModified\":\"2020-01-20T20:19:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\"},\"wordCount\":543,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Elipse Scada\",\"Other\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\",\"name\":\"[:pt]How to create a basic login\/logout system for Elipse SCADA.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:41:38+00:00\",\"dateModified\":\"2020-01-20T20:19:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create a basic login\/logout system for Elipse SCADA.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\",\"name\":\"Elipse Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"caption\":\"Elipse Software\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create a basic login\/logout system for Elipse SCADA. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]How to create a basic login\/logout system for Elipse SCADA.[:] - Elipse Knowledgebase","og_description":"To create a basic login\/logout system for users of Elipse SCADA, you must first make sure that users have been created. To do so, just open the Organizer and, at&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:41:38+00:00","article_modified_time":"2020-01-20T20:19:16+00:00","author":"Elipse Software","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elipse Software","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/"},"author":{"name":"Elipse Software","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87"},"headline":"How to create a basic login\/logout system for Elipse SCADA.","datePublished":"2019-03-25T20:41:38+00:00","dateModified":"2020-01-20T20:19:16+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/"},"wordCount":543,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Elipse Scada","Other"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/","url":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/","name":"[:pt]How to create a basic login\/logout system for Elipse SCADA.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:41:38+00:00","dateModified":"2020-01-20T20:19:16+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/how-to-create-a-basic-loginlogout-system-for-elipse-scada\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"How to create a basic login\/logout system for Elipse SCADA."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87","name":"Elipse Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","caption":"Elipse Software"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/2876"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=2876"}],"version-history":[{"count":2,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/2876\/revisions"}],"predecessor-version":[{"id":9801,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/2876\/revisions\/9801"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=2876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=2876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=2876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}