<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CmpLog from within an IEC application</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/839ae379dd/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/839ae379dd/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/839ae379dd/</id><updated>2020-02-27T21:41:38.405000Z</updated><subtitle>Recent posts to CmpLog from within an IEC application</subtitle><entry><title>CmpLog from within an IEC application</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/839ae379dd/?limit=25#a191" rel="alternate"/><published>2020-02-27T21:41:38.405000Z</published><updated>2020-02-27T21:41:38.405000Z</updated><author><name>PeteB123</name><uri>https://forge.codesys.com/u/peteb123/</uri></author><id>https://forge.codesys.come9b772f4392d6f99278f0e16da69a610cd25a32b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I have been trying to post information to the log from within my IEC application, I have done this using the function call below&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;LogRes&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;LogAdd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CmpLog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;STD_LOGGER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'CmpProgram'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;UDINT_TO_DINT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CmpLog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LogClass&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LOG_ERROR&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Invalid input'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This posts the error message to the log successfully but when I look at the log under the component column, all I get is "&amp;lt;1000&amp;gt;" whereas I would like to get the name of the IEC library that the error has come from. i.e 'CmpProgram'.&lt;br/&gt;
Is this possible from within an IEC application?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br/&gt;
Pete.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>