<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Validation of a global variable</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cdc24f778/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cdc24f778/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/7cdc24f778/</id><updated>2020-02-27T13:48:56.042000Z</updated><subtitle>Recent posts to Validation of a global variable</subtitle><entry><title>Validation of a global variable</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cdc24f778/?limit=25#65f6" rel="alternate"/><published>2020-02-27T13:48:56.042000Z</published><updated>2020-02-27T13:48:56.042000Z</updated><author><name>DaveW</name><uri>https://forge.codesys.com/u/davew/</uri></author><id>https://forge.codesys.com68150b36835edf2c48aeb984168cee2eab4381e9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry that I can't help you but I too would like to know the answer. I have a different application in mind. I would like to read the value of global variables, but first I need to resolve if the name exists.&lt;/p&gt;
&lt;p&gt;So I would like to use a variable name string to find the variable.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;DaveW&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Validation of a global variable</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cdc24f778/?limit=25#a743" rel="alternate"/><published>2020-02-27T13:48:55.887000Z</published><updated>2020-02-27T13:48:55.887000Z</updated><author><name>rahulnshinde</name><uri>https://forge.codesys.com/u/rahulnshinde/</uri></author><id>https://forge.codesys.com73a6b75b2034004e5c8440eb1ed65d03608993e5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I wish to check if a string name communicated to the codesys controller is a valid global variable &lt;br/&gt;
For e.g. In myController (Codesys)&lt;/p&gt;
&lt;p&gt;Type myDataType:&lt;br/&gt;
  a : INT ;&lt;br/&gt;
  b : STRING ;&lt;br/&gt;
END_TYPE&lt;/p&gt;
&lt;p&gt;VAR_GLOBAL&lt;br/&gt;
       myVar : myDataType ;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;The external system (another controller) is not aware of existence of 'myVar'. It will simply pass the name in the form of STRING for e.g. var_name = 'myVar'.&lt;br/&gt;
Is it possible that codesys program can check whether such a global variable exists?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Rahul.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>