<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to IAlarmNotifier - cannot get message from itfAlarm.GetMessage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fe4c38c86d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fe4c38c86d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/fe4c38c86d/</id><updated>2020-02-27T13:51:09.849000Z</updated><subtitle>Recent posts to IAlarmNotifier - cannot get message from itfAlarm.GetMessage</subtitle><entry><title>IAlarmNotifier - cannot get message from itfAlarm.GetMessage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fe4c38c86d/?limit=25#d071" rel="alternate"/><published>2020-02-27T13:51:09.849000Z</published><updated>2020-02-27T13:51:09.849000Z</updated><author><name>DavidCozens</name><uri>https://forge.codesys.com/u/davidcozens/</uri></author><id>https://forge.codesys.com4e59fb93b87bb4a91221126cc58e878503a5fac6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks Edwin - that worked a treat. I would never have guessed that &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>IAlarmNotifier - cannot get message from itfAlarm.GetMessage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fe4c38c86d/?limit=25#0ee5" rel="alternate"/><published>2020-02-27T13:51:09.660000Z</published><updated>2020-02-27T13:51:09.660000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com40a7e8532d110a6c0f3e018665951cec322539c9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi David,&lt;br/&gt;
The message text is empty because no visualization occurs in the project.&lt;/p&gt;
&lt;p&gt;background:&lt;br/&gt;
Without visualization, the text lists are not transferred to the control, and therefore the text can not be determined.&lt;br/&gt;
This is as designed, to fix that you Need to add a visu to your project.&lt;/p&gt;
&lt;p&gt;Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>IAlarmNotifier - cannot get message from itfAlarm.GetMessage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fe4c38c86d/?limit=25#c334" rel="alternate"/><published>2020-02-27T13:51:09.479000Z</published><updated>2020-02-27T13:51:09.479000Z</updated><author><name>DavidCozens</name><uri>https://forge.codesys.com/u/davidcozens/</uri></author><id>https://forge.codesys.com13e6bd9ee3ab8d789c59705089516c38c0e319d4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a function block that implements the IAlarmNotifier interface, I have it doing most of what I want, but I cannot get the alarm message. The key part of the execute method is below. Any ideas why GetMessage always returns a null string. I am successfully getting the name of the AlarmGroup and the AlarmClass it is just this interface function that is tripping me up.&lt;br/&gt;
{attribute '''DOCU__COMMENT' := ' Executes the action.'}&lt;br/&gt;
(&lt;em&gt; Executes the action.&lt;/em&gt;)&lt;br/&gt;
METHOD Execute&lt;br/&gt;
VAR_INPUT&lt;br/&gt;
    (&lt;em&gt; The currently processed alarm state transition. This will be&lt;br/&gt;
 evaluated in order to determine, whether the action has to be&lt;br/&gt;
 executed or not&lt;/em&gt;)&lt;br/&gt;
    eCurrTransition : AlarmStateTransition;&lt;br/&gt;
    (&lt;em&gt; The alarm, for which the action has to be performed&lt;/em&gt;)&lt;br/&gt;
    itfAlarm    : IAlarm;&lt;br/&gt;
    (&lt;em&gt; An optional pointer to a structure variable containing&lt;br/&gt;
 additional parameter&lt;/em&gt;)&lt;br/&gt;
    pbyAdditionalData   : POINTER TO BYTE;&lt;br/&gt;
END_VAR&lt;br/&gt;
VAR&lt;br/&gt;
    cbpMessage: AlarmManager.CharBufferPtr;   (&lt;em&gt; for holding the AlarmMessage &lt;/em&gt;)&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;cbpMessage := itfAlarm.GetMessage(__SYSTEM.TYPE_CLASS.TYPE_STRING);&lt;br/&gt;
StrConcatA(cbpMessage,ADR(sLastAlarm&lt;span&gt;[0]&lt;/span&gt;),USINT_TO_INT(SIZEOF(sLastAlarm)));&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>