Export AlarmStorage to CSV

LooijmansR
2020-08-13
2020-10-09
  • LooijmansR - 2020-08-13

    Hi all,

    I'll come straight to the point.

    1. Is it possible to (programmatically) export the alarm storage to CSV?
    2. If so - how can I achieve this?

    I am able to export them manually (as shown in the screenshot), but I assume that there's also a function block or function call to export the alarms in ST or something like AlarmManager.exportToCSV(filename, args=[..]);

    If there is no such thing yet, is it possible 'out of the box'? I have seen the example code in the Codesys Store regarding Alarms, but that's pretty deep already.

    Thanks in advance!

    Regards,
    Reno

     
  • m.prestel - 2020-08-13

    Hey
    this is a feature of the IDE, not the IEC code.

    To be honest I am not sure if you are able to execute the command via scripting.

    Best regards,
    Marcel

     
  • LooijmansR - 2020-08-17

    Hi Marcel,

    Thanks for your reply! However I am still looking for a definitive answer. Could someone please either confirm or deny whether this is possible?

    Kind regards,
    Reno

     
    • mandeepahujaifm - 2020-08-21

      Look into AlarmStorageReaderConsumer

      We wrote a library that does exactly what you want. Export the Alarm data to CSV pragmatically. If you are interested we can come up with a license arragement.

       
      πŸ‘
      1
      • aliazzz

        aliazzz - 2020-08-21

        Are you willing to share it on an MIT licensed basis?
        The projects or libraries corner would be an ideal place for you to showcase and share the code. Looking forward to it!

         
        πŸ‘
        2
      • LooijmansR - 2020-08-22

        MIT license based would be preffered of course, as more people within the CS community would benefit from it.

        I'm interested in it whatsoever. If you would kindly message me on info [at] renolooijmans [dot] nl with your terms, we could possibly come to an arrangement.

         
        πŸ‘
        1
  • m.prestel - 2020-08-17

    That was a definitive answer ;)

    You cannot really execute CODESYS IDE commands via ST code, since the IDE may not be running, is not reachable from the PLC etc etc

    Best regards
    Marcel

     
  • LooijmansR - 2020-10-09

    I am still looking for a possibility to export alarms without logging into the IDE. The user who said they already made this piece of software isn't replying to messages.

    At least I know it is possible (out of the box). I have too less experience to work with the interfaces provided by CODESYS (it also isn't documented).

    Any help is appreciated.

    Reno

     
    πŸ‘
    1

Log in to post a comment.