Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Get alarm infos from history during runtime

Anonymous
2017-01-05
2022-10-05
  • Anonymous - 2017-01-05

    Originally created by: KevinR

    Dear Community,

    I'm looking for a solution, to get alarm infos during the runtime. I need the user entered ID, the timestamp last active, and the text message. I tried out the example from the Codesys Store "Alarm Manager", but it doesn't work for me.

    I use the IAlarm interface to get infos from active alarms. The new "Alarm storage API" is not the right way to fix it, because I don't want to access the storage, just only the history list. There are some methods for the IAlarm interface to get all the necessary infos.

    I tried following code to get the ID, timestamp and the Message Text.

    I can't get the Message and the ID, but the timestamp can be retrieved.

    I tried it as the docu describes the method:

    The ID is a little bit confusing, because there are two ids, but none of them are the user entered IDs (?).

    I used the "GetID" Method to retrieve the ID as descriebed below, it says that the GetID method doesn't return the user entered it, so I've no idea to access them, because the ALARM_ID Enum also includes the same ID as GetID returns:

    Any idea to get this fixed?

    Thank you in advance!

    Best Regards,
    Kevin

    IMG: Bild

    IMG: Bild

    IMG: Bild

    IMG: Alarming.JPG

    IMG: Alarming IAlarm Get Message.JPG

    IMG: Alarming IAlarm Get ID.JPG

     
  • duvanmoreno - 2022-10-05

    mate do you know how I can save the history of the alarms in a CSV file in a SD card every month

     

Log in to post a comment.