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

Showing Devicelog content in a visu

aliazzz
2020-03-21
2020-04-01
  • aliazzz

    aliazzz - 2020-03-21

    Hi there,

    Is there a way to show the contents of the device log in a visu? So showing the current devicelog content in a visu as similar like an alarmtable. I have searched the help for it but could not any straight answers.

    Hoping to hear from the community on some tips, workarounds or solutions!

     
  • aliazzz

    aliazzz - 2020-03-25
     
  • i-campbell

    i-campbell - 2020-03-26

    Device Log like the forge project? Or standard log when you double click your device and select the log tab?

     
    • aliazzz

      aliazzz - 2020-03-26

      The standard log when you double click your device and select the log tab (i.e. PLC DeviceLog)

      Currently I let CfUnit write every message to the standard PLC DeviceLog.
      I am thinking about writing a webinterface to show the produced log in a "more" user friendly manner then the current log.

      The current log is not bad, dont get me wrong, but if I can make it even more user-friendly, that will lower the threshold for CfUnit usage even further.

      This new feature will be added in CfUnit after I finish integration of the new xUnit xml reporter module which I am currently developing for TcUnit.

      An alternative is to implement the IEC DeviceLog into CfUnit. That will take some extra rework...

       
  • i-campbell

    i-campbell - 2020-03-29

    Not that I could figure out. Refactor to write all messages to an array and display that.

     
  • m.prestel - 2020-03-31

    You could use the text editor to display the plc-log file on the plc.

    Best regards,
    Marcel

     
    • aliazzz

      aliazzz - 2020-03-31

      Hi, this sounds interesting, with plc-log you mean the Plc Device Log?
      Would you explaning / showing this?

      Thank you :)

       
      • m.prestel - 2020-03-31

        Hey,

        you sould be able to write the plc log to file with the following settings.

        [CmpLog]
        Logger.0.Name=PlcLog
        Logger.0.Filter=0xFFFFFFFF
        Logger.0.Enable=1
        Logger.0.Backend.0.ClassId=0x00000104   ;writes logger messages in a file
        

        Not sure if you can open this file with the texteditor (due to security concerns when accessing files outside of the $visu$ folder) but you could try.

        Best regards,
        Marcel

         
  • aliazzz

    aliazzz - 2020-03-31

    Currently we have a seperate CfUnit log file in place.

    The only concern I have is that CfUnit MUST be able to run on every CODESYS compatible device.

     
  • aliazzz

    aliazzz - 2020-03-31

    Hi,

    I have found the following features in the CODESYSControl.cfg;

    ;Logger.0.Backend.2.ClassId=0x00000135 ;sends logger messages as UDP syslog

    Would you care to explain this cvery very interesting option, as I want to send an xml formatted file to a CI/CD environment

     
    • m.prestel - 2020-04-01

      @i-campbell you got any example for this?

       
      • i-campbell

        i-campbell - 2020-04-01

        "CfUnit MUST be able to run on every CODESYS compatible device."
        "CODESYSControl.cfg; ;Logger.0.Backend.2.ClassId=0x00000135"
        "@i-campbell you got any example for this?"
        No. refactor all of your log writings to write to an array (as well as / instead of). You have a single POU for your logs, so you only have to change it in one spot, right?

         

Log in to post a comment.