<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/</id><updated>2023-11-08T09:11:07.954000Z</updated><subtitle>Recent posts to Detecting if a client is connected to webvisu server</subtitle><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#c372" rel="alternate"/><published>2023-11-08T09:11:07.954000Z</published><updated>2023-11-08T09:11:07.954000Z</updated><author><name>imdatatas</name><uri>https://forge.codesys.com/u/imdatatas/</uri></author><id>https://forge.codesys.comb6bf95e97165a49909ed3cbef9a5210aa92695e8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you &lt;a class="user-mention" href="/u/dgirard/"&gt;@dgirard&lt;/a&gt;&lt;br/&gt;
Your idea and above description helped me what i was looking for.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#b8b5" rel="alternate"/><published>2020-02-27T16:47:31.488000Z</published><updated>2020-02-27T16:47:31.488000Z</updated><author><name>dgirard</name><uri>https://forge.codesys.com/u/dgirard/</uri></author><id>https://forge.codesys.comb7755bded965afb4c4f123aae708659636658b5d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Here's the workaround that I've been able to accomplish:&lt;/p&gt;
&lt;p&gt;For my application, I am only looking to see if there is a client using Webvisu or not, I am not so much concerned with how many Webvisu clients there are at any given time. I can keep count of the number of clients using Webvisu with the following: &lt;/p&gt;
&lt;p&gt;Declaration:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;pClient&lt;/span&gt;       :    &lt;span class="nv"&gt;POINTER&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;VisuStructClientData&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;ClientCount&lt;/span&gt; : &lt;span class="nv"&gt;INT&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;NoClients&lt;/span&gt;: &lt;span class="nv"&gt;BOOL&lt;/span&gt;&lt;span class="c1"&gt;; //True if there are no webvisu clients&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Program:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;BeginIteration&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;ClientCount&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;; &lt;/span&gt;
&lt;span class="k"&gt;WHILE&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pClient&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;())&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt;
    &lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;pClient&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;.&lt;span class="nv"&gt;GlobalData&lt;/span&gt;.&lt;span class="nv"&gt;ClientType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;Visu_ClientType&lt;/span&gt;.&lt;span class="nv"&gt;WebVisualization&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
      &lt;span class="nv"&gt;ClientCount&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ClientCount&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;span class="nv"&gt;END_WHILE&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;ClientCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
   &lt;span class="nv"&gt;NoClients&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;TRUE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;ELSE&lt;/span&gt;
   &lt;span class="nv"&gt;NoClients&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;FALSE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The inspiration came from the following link on the FAQ page: &lt;a class="" href="https://faq.codesys.com/display/CDSFAQ/WebVisu%3A+Reading+the+IP+Address+of+the+Client" rel="nofollow"&gt;https://faq.codesys.com/display/CDSFAQ/WebVisu%3A+Reading+the+IP+Address+of+the+Client&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#7025" rel="alternate"/><published>2020-02-27T16:47:30.573000Z</published><updated>2020-02-27T16:47:30.573000Z</updated><author><name>LyngaaNSN</name><uri>https://forge.codesys.com/u/lyngaansn/</uri></author><id>https://forge.codesys.com18ffd580ce5d225fc98c6b93e3e37fe5971f0134</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;I am doing the same thing, do you know what happens when the autologout runs out?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#53fc" rel="alternate"/><published>2020-02-27T16:47:29.636000Z</published><updated>2020-02-27T16:47:29.636000Z</updated><author><name>RodneyC</name><uri>https://forge.codesys.com/u/rodneyc/</uri></author><id>https://forge.codesys.com25ca4c0aa5aaffaa8acdcbb803f92921e684c866</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I keep forgetting to update this thread.&lt;/p&gt;
&lt;p&gt;I never did find a status bit of sorts or even a variable with number of clients connected, etc. I wasn't even able to use the client type function, since they returned nothing or ??. I did however use the auto-logoff countdown timer to determine when a client was present and used it to control a safety latch when the user is toggled into a certain run mode.&lt;/p&gt;
&lt;p&gt;If there is a simpler way to just see if a client is there or not, via a BOOL or other variable, (eg: number_of_clients = 0) please let me know.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#b747" rel="alternate"/><published>2020-02-27T16:47:26.507000Z</published><updated>2020-02-27T16:47:26.507000Z</updated><author><name>RodneyC</name><uri>https://forge.codesys.com/u/rodneyc/</uri></author><id>https://forge.codesys.com718a6699e8b3de3b66fedfd44d2f8a65855ce7e1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;maybe I'm starting to get somewhere.&lt;/p&gt;
&lt;p&gt;I can see that when I watch the auto logout timer, the time will start ticking down from 50 days one the first client login (webvisu loaded into browser) and stops when I disconnect the client from wifi. Is there a variable that will simply allow me to tell if the webvisu client is connected? Is there a timeout flag of srts that can be seen when I close my wifi connection on the client end?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#2adb" rel="alternate"/><published>2020-02-27T16:47:25.445000Z</published><updated>2020-02-27T16:47:25.445000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com9441dba0dc0beede3acecf839166382d350ac3c4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
check the examples here in the PI section:&lt;/p&gt;
&lt;p&gt;l &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=23&amp;amp;t=6247&amp;amp;x=13503&amp;amp;p=13503&amp;amp;lan=en" rel="nofollow"&gt;viewtopic.php?f=23&amp;amp;t=6247&amp;amp;p=13503#p13503&lt;/a&gt; l &lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#9bad" rel="alternate"/><published>2020-02-27T16:47:22.825000Z</published><updated>2020-02-27T16:47:22.825000Z</updated><author><name>RodneyC</name><uri>https://forge.codesys.com/u/rodneyc/</uri></author><id>https://forge.codesys.comeac15298e0e9def93b79080c06bb758de9d82b6d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Still looking for a solution to this. If anyone has any advice it would be most welcome! &lt;/p&gt;
&lt;p&gt;Google is giving me nothing, at least not with the search terms I'm coming up with.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting if a client is connected to webvisu server</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/600da82e4b/?limit=25#7d24" rel="alternate"/><published>2020-02-27T16:47:21.927000Z</published><updated>2020-02-27T16:47:21.927000Z</updated><author><name>RodneyC</name><uri>https://forge.codesys.com/u/rodneyc/</uri></author><id>https://forge.codesys.com06c1d2e432d68900722f436022658aedc55f6a60</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is there a way to detect that a client is connected and is able to communicate with webvisu? My concern is that a user loses connection over wifi and is not able to stop the plc remotely. Ideally I would like to have a variable that could be used to enable a safety latch.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>