MusashiAharon - 2012-11-27

I am trying to display a one-line alarm message at the top of the visualization whenever there is an alarm. All it has to do is display the message text.

My question is, how do I access the last alarm message? I am using Codesys's Alarm Configuration and Alarm Table.

Poking around in SysLibAlarmTrend turned up GETLASTRECORD, which looks promising:

FUNCTION GetLastRecord : BOOL
VAR_INPUT
Β  Β pData: POINTER TO BYTE;
Β  Β pstResult: POINTER TO STRING(255);
Β  Β pdiSize : POINTER TO DINT;
END_VAR
VAR
Β  Β pTemp : POINTER TO BYTE;
Β  Β pstTemp : POINTER TO STRING(255);
Β  Β iCurPos : DINT;
Β  Β ppstResult: BOOL;
END_VAR

But, I have no idea how to use it, and there is no documentation on the function. Is this the right function? What should pData and pdiSize point to, exactly? What are they?