<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to OPC-UA Server, Symbol Set: Raise an error: Object reference not set to an instance of an object.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f3d13b1f88/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f3d13b1f88/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/f3d13b1f88/</id><updated>2024-08-08T14:49:45.881000Z</updated><subtitle>Recent posts to OPC-UA Server, Symbol Set: Raise an error: Object reference not set to an instance of an object.</subtitle><entry><title>OPC-UA Server, Symbol Set: Raise an error: Object reference not set to an instance of an object.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f3d13b1f88/?limit=25#2c4c" rel="alternate"/><published>2024-08-08T14:49:45.881000Z</published><updated>2024-08-08T14:49:45.881000Z</updated><author><name>alimans</name><uri>https://forge.codesys.com/u/alimans/</uri></author><id>https://forge.codesys.com9276835875e20194990697ee374823a1741fbfc8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi everyone,&lt;br/&gt;
I just created a very simple library without any code and, added it to my very simple project. after adding this library, I get an error when I try to open "Symbol Set" in "OPC UA Server" in "Communication Manager". &lt;/p&gt;
&lt;p&gt;Here is the code of my POU in the library:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;FUNCTION_BLOCK&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;POU&lt;/span&gt;
&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;eCommand&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;CMD_NONE&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;CMD_RESET&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;CMD_NONE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Attached is the error that I get.&lt;br/&gt;
I also noticed that by removing the enumeration variable above (eCommand), I can open the "Symbol Set" again. &lt;br/&gt;
Anybody has any idea why this error is raised and how could I use enumeration variables without error in "OPC UA Symbol Set"?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>