<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Image variable / invisible - not boolean variable (expression)</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/</id><updated>2020-02-27T18:15:09.290000Z</updated><subtitle>Recent posts to Image variable / invisible - not boolean variable (expression)</subtitle><entry><title>Image variable / invisible - not boolean variable (expression)</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/?limit=25#0e3f" rel="alternate"/><published>2020-02-27T18:15:09.290000Z</published><updated>2020-02-27T18:15:09.290000Z</updated><author><name>mjuzwiak</name><uri>https://forge.codesys.com/u/mjuzwiak/</uri></author><id>https://forge.codesys.com3cb5541b8e19e9a3a18d5c3f1c81c5ba689b83e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank You,&lt;/p&gt;
&lt;p&gt;We're switching to newest codesys in this case&lt;/p&gt;
&lt;p&gt;Topic can be closed&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Image variable / invisible - not boolean variable (expression)</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/?limit=25#cab3" rel="alternate"/><published>2020-02-27T18:15:06.142000Z</published><updated>2020-02-27T18:15:06.142000Z</updated><author><name>e.kislov</name><uri>https://forge.codesys.com/u/e-kislov/</uri></author><id>https://forge.codesys.com1d7499ef161d7afd44006d4b60404b105ef9bddd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi. I check it and it works for me.&lt;/p&gt;
&lt;p&gt;I add in my library property LanguageModelAttribute with value qualified-access-only and I can use enums of library as part of expression in visu elements.&lt;/p&gt;
&lt;p&gt;Seems like you get a bug which fixed in SP11:&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 15" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4421"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Image variable / invisible - not boolean variable (expression)</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/?limit=25#68a5" rel="alternate"/><published>2020-02-27T18:15:05.059000Z</published><updated>2020-02-27T18:15:05.059000Z</updated><author><name>mjuzwiak</name><uri>https://forge.codesys.com/u/mjuzwiak/</uri></author><id>https://forge.codesys.comea3ce14c8ca948fa3beefc753b8a01d3916e6181</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks! I checked that, and You are right, it's working, but only until t_ECODE is declared in project or library with not required qualified access. &lt;br/&gt;
If t_ECODE is declared in library with qualified access only, it's not working any longer... Can You check that? If Project Information in included library have property 'LanguageModelAttribute' with value 'qualified-access-only' it's not working any longer (always evaluated to FALSE).&lt;/p&gt;
&lt;p&gt;I tried assigning to variable with and without library prefix:&lt;/p&gt;
&lt;p&gt;PLC_PRG.myVar &amp;lt;&amp;gt; MyLib.t_ECODE.NO_ERROR&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;PLC_PRG.myVar &amp;lt;&amp;gt; t_ECODE.NO_ERROR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Image variable / invisible - not boolean variable (expression)</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/?limit=25#d9e6" rel="alternate"/><published>2020-02-27T18:15:03.980000Z</published><updated>2020-02-27T18:15:03.980000Z</updated><author><name>e.kislov</name><uri>https://forge.codesys.com/u/e-kislov/</uri></author><id>https://forge.codesys.com3f60c69b111d57559f95b2429d73b760e160ed9f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;br/&gt;
I use CODESYS V3.5 SP11 Patch 5 and it works for me.&lt;br/&gt;
Maybe you forgot about namespaces?&lt;/p&gt;
&lt;p&gt;You should use it like:&lt;/p&gt;
&lt;p&gt;PLC_PRG.myVar &amp;lt;&amp;gt; t_ECODE.NO_ERROR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Image variable / invisible - not boolean variable (expression)</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/a0b909b8b3/?limit=25#61ee" rel="alternate"/><published>2020-02-27T18:15:00.899000Z</published><updated>2020-02-27T18:15:00.899000Z</updated><author><name>mjuzwiak</name><uri>https://forge.codesys.com/u/mjuzwiak/</uri></author><id>https://forge.codesys.comddafc2aadd00355c55336f0bc1cde858527ead3c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Using Codesys V3.5 SP10 Patch 3+&lt;br/&gt;
It is possible to (and how to) use expression in 'invisible' or 'variable' field for Image/Frame on Visualisation?&lt;/p&gt;
&lt;p&gt;What I want to do, is make LED (simple light indicator) connected to variable of custom type (ENUM) eg: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;TYPE&lt;/span&gt; &lt;span class="n"&gt;t_ECODE&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;NO_ERROR&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;E_SUPPLY_FAULT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;E_ANALOG_INPUT_FAULT&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;BYTE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_TYPE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I need LED (indicator) switched off at NO_ERROR and switched on at any other value.&lt;/p&gt;
&lt;p&gt;What I tried already:&lt;br/&gt;
1. Set 'variable' field of standard lamp to '   myVar &amp;lt;&amp;gt; t_ECODE.NO_ERROR    '&lt;br/&gt;
2. Put two images one on top of each other, one with LED on, second with LED off, set 'Invisible' field to   '   myVar &amp;lt;&amp;gt; t_ECODE.NO_ERROR   ', second to '   myVar = t_ECODE.NO_ERROR   '&lt;/p&gt;
&lt;p&gt;Any of these methods is not working, I get invalid referece error or other errors.&lt;/p&gt;
&lt;p&gt;Is there any solution other than dedicated program that will evaluate booleans from ENUM variables? It will make my code very hard to use, as I then cannot pass whole structures to visualisations...&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>