Logging Application Events For Audit

mr337
2020-07-28
2020-07-29
  • mr337

    mr337 - 2020-07-28

    Hi!

    How is it possible to log events for auditing such as when a sensor has hit a state, user press e-stop, or event has occured?

    Does anyone have a working example of logging application events to be retained after a power cycle?

    Things I have found:
    - AC_Persist library that looks to have CmpLog [1] - cannot find any documentation and sadly sample project won't open
    - Writing to a dedicated CSV file, concerned of a bad implementation and wearing out flash storage or overwriting system files etc during runtime
    - Something like using a CAA FILE [2]
    - Some mention of an OSCAT library for network logging??

    My requirements are to just log events when they occur and be able to pull them from the PLC when needed. This would be max 1hz and would only happen when certain conditions occur. No data logging for any period of time.

    [1] - https://forge.codesys.com/u/ingo/blog/2019/05/add-own-log-messages/
    [2] - https://forge.codesys.com/forge/talk/Engineering/thread/3fca851346/

     

    Related

    Talk.ru: 1
    Talk.ru: 2

  • aliazzz

    aliazzz - 2020-07-29

    Depending on the type of solution it standard or your own flavour ;-)
    In your case, my suggestion would be the for you to take a very good look at the Devicelog solution. It is compatible with ALL Codesys runtime/and vendor hardware.
    There are many examples available that demonstrate it's usage.

    Both CfUnit and SparkplugB use this variant of logging, in fact every Runtime(!) uses this kind of logging by design allready.

     
    👍
    1
  • Morberis

    Morberis - 2020-07-28

    Check out the Datalog manager or the Alarm Manager

    Yes both of these will write to the directory where the PLC software is running from. If that is the internal flash memory on the device it could eventually wear out. That doesn't sound like it should be an issue for what you're talking about though.

    There is an Oscat Network library you can take a look at.

    I don't think any of these support saving logs to a networked location. But there are a few ways you can get that data transfered once logged. 1 of those ways is by using the CAA File Library that you listed.

     

    Last edit: Morberis 2020-07-28

Log in to post a comment.