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

How to get Device Error (Exception) in Runtime

  • audi0615

    audi0615 - 2020-07-27


    Is there a way to know if device errors such as memory access violation occur in Runtime (without Codesys Development System)?
    It seems CmpLog library does not provide such a feature.
    I'd like to notify any critical errors to my user when runtime stops.


  • Morberis

    Morberis - 2020-07-28

    Hmmm. Would "Behaviour for outputs while in stop - Execute Program" in the PLC settings tab be helpful? Maybe combined with the CAA Device Diagnosis library? Or maybe with this Codesys Forge Library, Debug Logger.

    This post might also be helpful to you, in adding extra logging to the normal log. If the normal log file isn't overwritten/wiped when that executed program (as above) is started you could have it copy the log file somewhere.

    Depending on what you want you might be satisfied with setting all outputs to default, where doing so turns on an alarm light or triggers an autodialer etc.


    Last edit: Morberis 2020-07-28
  • audi0615

    audi0615 - 2020-07-29

    Thank you so much

    I would check the options mentioned.
    Probably one of them could be the answer.

    • Morberis

      Morberis - 2020-07-29

      @aliazz has a good post here as well that you might find helpful.

      aliazz's post
      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.

      Last edit: Morberis 2020-07-29

Log in to post a comment.