<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to build a visualization with Responsive Design?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/</id><updated>2020-06-26T21:09:41.572000Z</updated><subtitle>Recent posts to How to build a visualization with Responsive Design?</subtitle><entry><title>How to build a visualization with Responsive Design?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/?limit=50#9317" rel="alternate"/><published>2020-06-26T21:09:41.572000Z</published><updated>2020-06-26T21:09:41.572000Z</updated><author><name>asnik</name><uri>https://forge.codesys.com/u/asnik/</uri></author><id>https://forge.codesys.com8d20b42b358f9fe78e19ad252daf318ab17ee789</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This example uses only client's resolution as above mentioned. But for now the idea is not working nice:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;IsSmartphone&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="k"&gt;IF&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;_clientSize&lt;/span&gt;.&lt;span class="nv"&gt;iWidth&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;380&lt;/span&gt; &lt;span class="nv"&gt;AND&lt;/span&gt; &lt;span class="nv"&gt;_clientSize&lt;/span&gt;.&lt;span class="nv"&gt;iHeight&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;...
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now smartphones have the resolution bigger than 24" monitors.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to build a visualization with Responsive Design?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/?limit=25#9d65" rel="alternate"/><published>2020-06-26T19:24:51.726000Z</published><updated>2020-06-26T19:24:51.726000Z</updated><author><name>JAPIB</name><uri>https://forge.codesys.com/u/japib/</uri></author><id>https://forge.codesys.com274b1055cba5ef8a7febb13edfab7c5d603412f3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
Now, there is a way to do responsive design.&lt;br/&gt;
You can find a Responsive Design Example in the CODESYS Store : ;https://store.codesys.com/responsive-design-example.html&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to build a visualization with Responsive Design?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/?limit=50#d5bc" rel="alternate"/><published>2020-06-26T13:39:37.133000Z</published><updated>2020-06-26T13:39:37.133000Z</updated><author><name>asnik</name><uri>https://forge.codesys.com/u/asnik/</uri></author><id>https://forge.codesys.com589fe1d5c057ea5999b2e87c14f6b44633527eab</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;some years of silence... the same problem.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to build a visualization with Responsive Design?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1afacfaa3/?limit=25#b83b" rel="alternate"/><published>2020-02-27T17:54:20.353000Z</published><updated>2020-02-27T17:54:20.353000Z</updated><author><name>pedro-ant</name><uri>https://forge.codesys.com/u/pedro-ant/</uri></author><id>https://forge.codesys.comd52fb8a8e51c18cc66798e143137d836317270cf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Let's give some context:&lt;/p&gt;
&lt;p&gt;Let's say we have an industrial plant controlled by a PLC programmed with CODESYS V3 and we want to develop a Web Visualisation that works as the SCADA/HMI for the plant.  &lt;/p&gt;
&lt;p&gt;It's desirable to develop this visualisation in a way that allows the proper control of the plant using interchangeably a desktop PC, a _ or a smartphone. &lt;/p&gt;
&lt;p&gt;To achieve that is necessary to chose a different user interface philosophy for each category of devices in order to make the use of the SCADA as smooth as possible for each device.&lt;/p&gt;
&lt;p&gt;Once we have this 3 user interfaces designed and developed, we need to present one of them to the user depending on the device used to access to the PLC's web server. &lt;/p&gt;
&lt;p&gt;I see two ways of implement this:&lt;/p&gt;
&lt;p&gt;1) Provide 3 differents urls, for example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;      &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;192&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;168&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;110&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webvisu_desktop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;htm&lt;/span&gt;

      &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;192&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;168&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;110&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;htm&lt;/span&gt;

      &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;192&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;168&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;110&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webvisu_smartphone&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;htm&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And instruct the user to use each of them depending on the device of choice.&lt;/p&gt;
&lt;p&gt;2) Automate this selection of user interface through a routine in the PLC.&lt;/p&gt;
&lt;p&gt;Obviously I would prefer to use the second option. The problem is that I haven't been able to figure it out yet in a satisfactory way. &lt;/p&gt;
&lt;p&gt;I based my attempts in 2 sources:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;      &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;The&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;"Responsive Design Example"&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;codesys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;responsive&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;design&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;CODESYS&lt;/span&gt; &lt;span class="n"&gt;Store&lt;/span&gt;
      &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;The&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;"Sophisticated visualization with Responsive Design"&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fi&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;03&lt;/span&gt;&lt;span class="n"&gt;_CUC2016_Sophisticated&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;Visualization&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;Responsive&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;Design_en&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pdf&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;FILE&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;03&lt;/span&gt;&lt;span class="n"&gt;_CUC2016_Sophisticated&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;Visualization&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;Responsive&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;Design_en&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;conference&lt;/span&gt; &lt;span class="n"&gt;give&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="n"&gt;S&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Smart&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The example it's not functional or at least I haven't been able to make it work as expected.&lt;/p&gt;
&lt;p&gt;However, tinkering with the methods mentioned in that 2 sources I managed to list all the clients connected to the Web Visualisation and to access to their VisuElems.VisuStructClientData structure.&lt;/p&gt;
&lt;p&gt;Within this data I've only found one thing useful: the resolution of the client.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://ibb.co/eyH80m" rel="nofollow"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With this I can select the user interface depending on the resolution of the device screen (using a philosophy similar to the Store example). But this is useless giving that resolution is not necessarily related with screen size. For example, I've tried with these devices:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;       &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;Toshiba&lt;/span&gt; &lt;span class="n"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1366&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="mi"&gt;768&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="ss"&gt;"&lt;/span&gt;
&lt;span class="ss"&gt;       - iPad Air: 1536 x 2048 - 9.4"&lt;/span&gt;
       &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;BQ&lt;/span&gt; &lt;span class="n"&gt;Aquaris&lt;/span&gt; &lt;span class="n"&gt;E5&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Smartphone&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="mi"&gt;1280&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="mi"&gt;720&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I mean, I also need the pixel density in orden to determine the screen size or getting the screen size directly.&lt;/p&gt;
&lt;p&gt;So, do you know a way of getting this data from CODESYS?&lt;/p&gt;
&lt;p&gt;If you think there is a better way to do this I would be pleased to read it too.&lt;/p&gt;
&lt;p&gt;Thank you in advance for your help.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="https://preview.ibb.co/i5Cxt6/pClients.jpg"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>