<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/</id><updated>2020-02-27T18:05:53.488000Z</updated><subtitle>Recent posts to Logic syntax inside visualization</subtitle><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#e27a" rel="alternate"/><published>2020-02-27T18:05:53.488000Z</published><updated>2020-02-27T18:05:53.488000Z</updated><author><name>mprestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.comb6440a3c9ecb4a12e68d91d2045fd1c84b4a0fff</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;yannickasselin1 hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
It works with a simple rectangle but it does not work inside of a table.&lt;br/&gt;
Calling a function inside a table to update color works. But text does not work. Could it be a bug?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why not update the data for the table instead of converting the displayed value each cycle?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#499a" rel="alternate"/><published>2020-02-27T18:05:50.462000Z</published><updated>2020-02-27T18:05:50.462000Z</updated><author><name>Comingback4u</name><uri>https://forge.codesys.com/u/comingback4u/</uri></author><id>https://forge.codesys.com4af2b2e680cbd7de3e9915bb3e89f0baa84b3985</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Could you just add a rectangle element to the visu to call one function for the entire visu page you are working on. Then use that one function to update all the elements (tables, buttons, text, etc) colors or other logic you need on the page.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#1b96" rel="alternate"/><published>2020-02-27T18:05:49.395000Z</published><updated>2020-02-27T18:05:49.395000Z</updated><author><name>yannickasselin1</name><uri>https://forge.codesys.com/u/yannickasselin1/</uri></author><id>https://forge.codesys.coma54804d92a87fb44453be6a10af3acfd967d4d96</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It works with a simple rectangle but it does not work inside of a table.&lt;br/&gt;
Calling a function inside a table to update color works. But text does not work. Could it be a bug?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#b6a0" rel="alternate"/><published>2020-02-27T18:05:46.371000Z</published><updated>2020-02-27T18:05:46.371000Z</updated><author><name>mprestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com4377ddeede8d137c61b24ebc5893ceeb27a67ba8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You need to put the function call inside the text variable (requires %s inside Texts)&lt;br/&gt;
See attached screenshots&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: FunctionString.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5084"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#bdc6" rel="alternate"/><published>2020-02-27T18:05:45.305000Z</published><updated>2020-02-27T18:05:45.305000Z</updated><author><name>yannickasselin1</name><uri>https://forge.codesys.com/u/yannickasselin1/</uri></author><id>https://forge.codesys.coma319a12a05f82c351c44b0d71ebc3aea25cfa6bc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I tried to do the same thing but for text and I cannot make it work.&lt;/p&gt;
&lt;p&gt;I am not able to call the Function from the text property. It kind of makes sense. It just prints whatever I put in there instead of calling the function.&lt;br/&gt;
Is there a way to call the function from the text property?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#f79c" rel="alternate"/><published>2020-02-27T18:05:44.242000Z</published><updated>2020-02-27T18:05:44.242000Z</updated><author><name>yannickasselin1</name><uri>https://forge.codesys.com/u/yannickasselin1/</uri></author><id>https://forge.codesys.com054e1535aa884e535312d39a4a1b4680ddc32cc5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the advice.&lt;/p&gt;
&lt;p&gt;I created a function that returns a color. I call this function right from the visu and it works great. Even for setting colors of each cells in a table!&lt;/p&gt;
&lt;p&gt;You need to have a target or web visu for it to work. (In TwinCAT. I did not try with Codesys).&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#8548" rel="alternate"/><published>2020-02-27T18:05:41.212000Z</published><updated>2020-02-27T18:05:41.212000Z</updated><author><name>mprestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com7502da2a4a5e9921f6000ca92a9d73ff4f98dd73</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;you can only do the things you can do in a normal assignment.&lt;br/&gt;
But you can call a function and do more complex logic in there and depending on that return different colors.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#117f" rel="alternate"/><published>2020-02-27T18:05:40.134000Z</published><updated>2020-02-27T18:05:40.134000Z</updated><author><name>yannickasselin1</name><uri>https://forge.codesys.com/u/yannickasselin1/</uri></author><id>https://forge.codesys.com41e586a8e4666d647a9614aee0fc44e20f2f6b8d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It looks like it is called cyclically because as soon as I update one of the variable (word1 or word2) the rectangle filled color changes.&lt;/p&gt;
&lt;p&gt;I was wondering if I could do some more complex logic right inside the visu.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#1bdf" rel="alternate"/><published>2020-02-27T18:05:37.112000Z</published><updated>2020-02-27T18:05:37.112000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com5108f67bbcdf733719e50ebbb77b0db879c6caf9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;You can use code when a button is pressed.&lt;/p&gt;
&lt;p&gt;But when I need that the code runs every cycle, I create a method wich returns 0, and I put the method in absolute_movement or relative_movement in x or y.&lt;/p&gt;
&lt;p&gt;I don't know if it is possible to call code ciclicaly in other form.&lt;/p&gt;
&lt;p&gt;Sent from my Moto G (5S) Plus using Tapatalk&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Logic syntax inside visualization</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/381a9a8b57/?limit=25#dfed" rel="alternate"/><published>2020-02-27T18:05:36.023000Z</published><updated>2020-02-27T18:05:36.023000Z</updated><author><name>yannickasselin1</name><uri>https://forge.codesys.com/u/yannickasselin1/</uri></author><id>https://forge.codesys.com7d25da3c67c1ac4849baa532d98e7bd70964e4a2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I know that if I use variables inside a visu I can do some logic. For exemple if I declare 2 DWORD (word1 and word2) I can do a logical 'OR' for the 'Fill color' property of a rectangle. Like this:&lt;/p&gt;
&lt;p&gt;At runtime, if I set word1 to 16#FFFF0000 and word2 to 16#FF00FF00, the rectangle becomes yellow. This means I can do some logic inside the VISU.&lt;/p&gt;
&lt;p&gt;Now, my question is: How can I make more complex logic like IF THEN ELSE?  What would be the syntax? Where can I find it in the help?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: FillColor.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=5083"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>