<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CoDeSys V2.3 Visualization "Button"</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/bbd9afff34/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/bbd9afff34/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/bbd9afff34/</id><updated>2020-02-27T19:27:10.686000Z</updated><subtitle>Recent posts to CoDeSys V2.3 Visualization "Button"</subtitle><entry><title>CoDeSys V2.3 Visualization "Button"</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bbd9afff34/?limit=25#4647" rel="alternate"/><published>2020-02-27T19:27:10.686000Z</published><updated>2020-02-27T19:27:10.686000Z</updated><author><name>spfeif</name><uri>https://forge.codesys.com/u/spfeif/</uri></author><id>https://forge.codesys.com87e57557941cf5700838ca462bb142a9a73ed2fc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I think what you are asking is directly from the button itself, during design time. Try this.&lt;/p&gt;
&lt;p&gt;A button is on the screen for a user event so set the variable that you want to toggle under CATEGORY-INPUT, Check toggle variable and place a boolean in the variable entry box. Now when ever that variable is TRUE the color variable under CATEGORY-COLORVARIABLES-FILL COLOR ALARM will be used.&lt;/p&gt;
&lt;p&gt;CATEGORY-COLORVARIABLES-FILL COLOR is changing the default gray color to a color of your choice when there is no alarm and no alarm fill color selected.&lt;/p&gt;
&lt;p&gt;So if you tie the toggle variable to PLC_PRG.a, and set FILL COLOR ALARM to 16#0000FF00 the button will fill completely green when ever a := TRUE;&lt;/p&gt;
&lt;p&gt;If you want to set the button frame color then that is found and selected under CATEGORY-BITMAP-ALARM COLOR.&lt;/p&gt;
&lt;p&gt;I use this sometimes because the CoDeSys button is very hard to tell that it is actually depressed so I color it to exaggerate the alarm.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys V2.3 Visualization "Button"</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bbd9afff34/?limit=25#5f26" rel="alternate"/><published>2020-02-27T19:27:09.404000Z</published><updated>2020-02-27T19:27:09.404000Z</updated><author><name>JAPIB</name><uri>https://forge.codesys.com/u/japib/</uri></author><id>https://forge.codesys.com1e7c9d818985f947ac39ec78fd7c960a260f9a4d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Idea n°1 :&lt;/p&gt;
&lt;p&gt;VAR_GLOBAL&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt; &lt;span class="nt"&gt;Bool1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

 &lt;span class="nt"&gt;Color1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;PROGRAM&lt;/p&gt;
&lt;p&gt;IF Bool1 THEN&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt; &lt;span class="nt"&gt;Color1&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;16&lt;/span&gt;&lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;00808080&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;ELSE&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt; &lt;span class="nt"&gt;Color1&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;16&lt;/span&gt;&lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;00FF0000&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_IF;&lt;/p&gt;
&lt;p&gt;Configuration of the button :&lt;/p&gt;
&lt;p&gt;Category Input : Toggle variable : .Bool1&lt;/p&gt;
&lt;p&gt;Category Colorvariables : Fill Color : .Color1&lt;/p&gt;
&lt;p&gt;Idea n°2 :&lt;/p&gt;
&lt;p&gt;Use a rectangle instead of a button, You will lose the draft of the button on the click but the color change is easier to configure !&lt;/p&gt;
&lt;p&gt;J hope this can help you&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys V2.3 Visualization "Button"</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bbd9afff34/?limit=25#62fe" rel="alternate"/><published>2020-02-27T19:27:05.917000Z</published><updated>2020-02-27T19:27:05.917000Z</updated><author><name>anni-reddy</name><uri>https://forge.codesys.com/u/anni-reddy/</uri></author><id>https://forge.codesys.comeb7b3d4f1c42912f7ef5487271c28d9282e18d1a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;How to change the color for "Button". In CoDeSys V2.3 (Visualization) tool&lt;/p&gt;
&lt;p&gt;"Color Change" option is disabled.&lt;/p&gt;
&lt;p&gt;Please let me know if anybody knows.&lt;/p&gt;
&lt;p&gt;best&lt;/p&gt;
&lt;p&gt;Anil&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>