<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Webvisu - webserver - client counter</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/0489280e64/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/0489280e64/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/0489280e64/</id><updated>2020-02-27T17:58:16.564000Z</updated><subtitle>Recent posts to Webvisu - webserver - client counter</subtitle><entry><title>Webvisu - webserver - client counter</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/0489280e64/?limit=25#30ea" rel="alternate"/><published>2020-02-27T17:58:16.564000Z</published><updated>2020-02-27T17:58:16.564000Z</updated><author><name>miczieli</name><uri>https://forge.codesys.com/u/miczieli/</uri></author><id>https://forge.codesys.comef54697c6e35c8a596421a7b1663c9c04bc08db0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank u a lot for your answear but I'm a newbie so I need some more explanation &lt;/p&gt;
&lt;p&gt;As I understood this part:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
PROGRAM CountClients&lt;br/&gt;
VAR&lt;br/&gt;
       pClient: POINTER TO VisuElems.VisuElemBase.VisuStructClientData;&lt;br/&gt;
       countWebvisu: INT;&lt;br/&gt;
       countAll: INT;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Stood for a structure (DUT) named CountClients.&lt;/p&gt;
&lt;p&gt;The second part stands for POU named g_ClientManager. &lt;/p&gt;
&lt;p&gt;But if i want to add CountClients to VISU_TASK as a call the program goes into the exception. &lt;br/&gt;
And if i would like to add a g_ClientManager as a call in VISU_TASK i can't because its type is TYPE. &lt;/p&gt;
&lt;p&gt;What have i done wrong?&lt;/p&gt;
&lt;p&gt;I tried with VISU_NO_EXCEPTION_HANDLING but it failed, with 42 errors like Problem during creating a client: we are out of memory.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Webvisu - webserver - client counter</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/0489280e64/?limit=25#ee18" rel="alternate"/><published>2020-02-27T17:58:13.532000Z</published><updated>2020-02-27T17:58:13.532000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.come737b11f5a50d84110758d7ad69e1fe65b3f1fc8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;try it that way:&lt;/p&gt;
&lt;p&gt;You Need to call this in visutask context 'VISU_TASK'&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;PROGRAM&lt;/span&gt; &lt;span class="nt"&gt;CountClients&lt;/span&gt;
&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt; &lt;span class="nt"&gt;pClient&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;POINTER&lt;/span&gt; &lt;span class="nt"&gt;TO&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VisuElemBase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VisuStructClientData&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt; &lt;span class="nt"&gt;countWebvisu&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt; &lt;span class="nt"&gt;countAll&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;Implementation&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;_&lt;/em&gt;&lt;/strong&gt;__&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;countWebvisu := 0;&lt;br/&gt;
countAll := 0;&lt;br/&gt;
g_ClientManager.BeginIteration();&lt;br/&gt;
&lt;br/&gt;
WHILE (pClient := VisuElems.VisuElemBase.g_ClientManager.GetNextClient()) &amp;lt;&amp;gt; 0 DO&lt;br/&gt;
       IF pClient^.GlobalData.ClientType = VisuElems.VisuElemBase.Visu_ClientType.WebVisualization THEN&lt;br/&gt;
             countWebvisu := countWebvisu + 1;&lt;br/&gt;
       END_IF&lt;br/&gt;
&lt;br/&gt;
       countAll := countAll + 1;&lt;br/&gt;
END_WHILE&lt;/p&gt;
&lt;p&gt;```BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Webvisu - webserver - client counter</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/0489280e64/?limit=25#62a3" rel="alternate"/><published>2020-02-27T17:58:12.474000Z</published><updated>2020-02-27T17:58:12.474000Z</updated><author><name>miczieli</name><uri>https://forge.codesys.com/u/miczieli/</uri></author><id>https://forge.codesys.com7c4f7fa6f778bebd4bee48e853aed5843369dc4d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I'm using Codesys v. 3.5 SP7 with Berghof IEC 2250, and I've got one question.&lt;br/&gt;
I've read somewhere that webserver can support up to 100 clients. I want to test it. I've prepared a visualisation already. &lt;br/&gt;
My question: is there any counter or method to count number of clients currently connected to webvisu via browser?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>