<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/</id><updated>2020-12-15T07:53:59.424000Z</updated><subtitle>Recent posts to Initialize VAR variable</subtitle><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#5463" rel="alternate"/><published>2020-12-15T07:53:59.424000Z</published><updated>2020-12-15T07:53:59.424000Z</updated><author><name>smarmiroli</name><uri>https://forge.codesys.com/u/smarmiroli/</uri></author><id>https://forge.codesys.coma086aa6f4cee3219e08a350512de0ee1068306ab</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am sorry but my team has communicated the problem to me wrong, it is not that the initialization does not work as illustrated, on the contrary, it works very well, the problem is that it is not possible to initialize it because, the same view is loaded in different frames, it must be initialized differently, someone of us is thinking about a method like FB_init or some similar else.&lt;br/&gt;
BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#e123/1230" rel="alternate"/><published>2020-12-14T16:04:10.615000Z</published><updated>2020-12-14T16:04:10.615000Z</updated><author><name>Morberis</name><uri>https://forge.codesys.com/u/morberis/</uri></author><id>https://forge.codesys.com34b883309a40ec3690d79c50eed97c1323a9a380</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Perhaps you can make a small project implementing only what is going wrong and then share that. Definitely the variable in the visualizations header, an element where it is used to change the bitmap ID, the bitmaps, and whatever is writing to it.&lt;/p&gt;
&lt;p&gt;Just copy paste that all into a new project then you don't have to share anything you're not allowed.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#e123" rel="alternate"/><published>2020-12-14T15:47:54.263000Z</published><updated>2020-12-14T15:47:54.263000Z</updated><author><name>smarmiroli</name><uri>https://forge.codesys.com/u/smarmiroli/</uri></author><id>https://forge.codesys.com26a82b9f5e87a175b084dacc76137565207984b6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm sorry but, the project is too complex to be posted, it should be explained, I'll try again for the last time.&lt;br/&gt;
I have an image that uses a bitmap ID variable so configured:&lt;br/&gt;
VAR&lt;br/&gt;
bitmapID: STRING: = 'red_left_arrow';&lt;br/&gt;
END_VAR&lt;br/&gt;
'red_left_arrow' is a bitmap ID, that, in my project, representing a red arrow to the left.&lt;br/&gt;
the variable is contained in the visualization that contains the image, and can only be modified by the input configuration of objects that are in the same visualization. At the beginning of the process I expect, however, there will be displayed the image that represent a red left arrow images but it is displayed a blank image as long as an event does not modify the bitmap making it , for example, bitmapID := 'green_circle' and magically appears a green circle image.&lt;br/&gt;
the problem, of course, is the initial blank image.&lt;br/&gt;
BR&lt;br/&gt;
Stefano Marmiroli&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#b144" rel="alternate"/><published>2020-12-14T06:17:50.013000Z</published><updated>2020-12-14T06:17:50.013000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.coma681e9fa7a639cff64f4e56f0536790486d79af1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello &lt;a class="user-mention" href="/u/smarmiroli/"&gt;@smarmiroli&lt;/a&gt;,&lt;br/&gt;
that definitly works.&lt;/p&gt;
&lt;p&gt;If you got an issue, please attach an example project.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#92ad" rel="alternate"/><published>2020-12-11T21:02:18.992000Z</published><updated>2020-12-11T21:02:18.992000Z</updated><author><name>smarmiroli</name><uri>https://forge.codesys.com/u/smarmiroli/</uri></author><id>https://forge.codesys.comf7d27ad2f0f3187f30882c3a2ac723e2b67f84e4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;br/&gt;
1)It is in the header of a visualization&lt;br/&gt;
2) the variable is used as bitmap ID in an element of the visualization&lt;br/&gt;
3)The variable is written only by the input events in the visualization&lt;br/&gt;
4)the variable is initialized only by the code in the way already exposed .. but it doesn’t work.&lt;br/&gt;
BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#5170" rel="alternate"/><published>2020-12-11T18:56:09.090000Z</published><updated>2020-12-11T18:56:09.090000Z</updated><author><name>Morberis</name><uri>https://forge.codesys.com/u/morberis/</uri></author><id>https://forge.codesys.com91c76ff331c824d3e46b71edfe0ff7a4eba25f55</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Absolutely that works, I use it all the time. But that doesn't mean you're crazy or I'm crazy.&lt;/p&gt;
&lt;p&gt;These are my questions for you&lt;br/&gt;
1)Is this a variable in the header of a visualization, global variable list, or POU?&lt;br/&gt;
2)Is the variable being used anywhere in your program and if it's in a POU is the POU in your task tree? It matters for variables being used by a fieldbus at least&lt;br/&gt;
3)Is that variable being written to by something? If so that will overwrite your initialized value&lt;br/&gt;
4)Did you change the initialization value on the variable on a simulation or live system? It won't change until you do a cold/warm restart. Depending on if it's a retain value.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Initialize VAR variable</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/110b2f4467/?limit=25#1c2b" rel="alternate"/><published>2020-12-11T14:02:44.318000Z</published><updated>2020-12-11T14:02:44.318000Z</updated><author><name>smarmiroli</name><uri>https://forge.codesys.com/u/smarmiroli/</uri></author><id>https://forge.codesys.com46f8514ab270a0b1cb4a09e32a3893ef11383e91</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;br/&gt;
for reasons too long to explain I would need to initialize a frame instance variable:&lt;br/&gt;
VAR&lt;br/&gt;
    myStringVariable : STRING: = 'this is the initial value';&lt;br/&gt;
END_VAR&lt;br/&gt;
but this system doesn't work, it seems that the variable is not actually initialized, any idea how to make it?&lt;br/&gt;
BR&lt;br/&gt;
Stefano Marmiroli&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>