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

information plc error events

2010-04-20
2010-04-23
  • cor.burggraaf - 2010-04-20

    I am Using codesys 2.3 on a wago plc 758-870

    I want to log plc errors when a plc crashes for debugging purposes

    divide by zero, watchdog errors etc.

    and try to get in formation about

    witch error caused the crasch

    witch pou or task caused the crash

    I am expirimenting with the library syslibcallback.lib

    witch enables the posibility to catch an error event

    by triggering a function registered with a function in the syslibcallback library

    but i dont have a clou how to get information in witch task or pou the problem ocurred

    has anybody more experience with error logging or a better way

    to solve this problem

    kind regards Cor

     
  • shooter - 2010-04-22

    when a task starts i will print something on screen or have a light go on.

    like 'starting pou init'

    when complex i can numbers in it like 'for loop number '

    i do not like to use syslibcallback a i do not know what happens when running.

    you must make a program hufterproof even when it are blocks or functions.

    see also the oscat lib. very handy and tested.

     
  • cor.burggraaf - 2010-04-23

    Gezien de reactie op het onderwerp in het nederlands

    SysCallback.lib is een library welke kan reageren op system events

    zoals deling door nul before reset io error enz enz

    desgewenst kan door een zelf te maken functie te registreren met

    de functie SysCallbackRegister() een te definiΓ«ren event deze functie te triggeren

    wel moet deze functie de volgende ingangs parameters hebben

                        FUNCTION Callback : DWORD
    
                        VAR_INPUT
    
                            dwEvent:DWORD;
    
                            dwFilter:DWORD;
    
                            dwOwner:DWORD;
    
                        END_VAR
    

    met de input dwEvent kun je kiezen op welk event de functie getriggert

    wordt

    over de 2 andere parameters tast ik nog in het duister

    en weet ik nog niet exact wat ik daar mee aan moet.

    Als iemand het wel weet hoor ik het graag

    in deze functie kun je dan zelf het een en ander programmeren

    Ik heb ook even gekeken naar de open source Oscat library

    Dit is best interessant inmiddels al gedownload

    en in deze schatkist aan het graven

    ik ben benieuwd of een aantal functies ook werken op een wago target

    mijn core busyness

    ondanks dat alle targets op Codesys draaien hebben de meeste toch hun onhebbelijkheden

    in ieder geval bedankt voor de info

    Groeten Cor

     
  • shooter - 2010-04-23

    as the board is english i will answer in english although i do speak dutch.

    have you found resources.

    that is one level above the library.

    yes i do lots with 750-841 and in modbus.

    i am _ in measuring and controlling temperatures.

     
  • TimvH

    TimvH - 2010-04-23

    For preventing division by zero or accessing Arrays out of it's bounds, 3S-Software developed the check.lib.

    You only need to add this library to your project to "hide" programming errors.

    Unfortuntely you cannot find exactly where and when this happens.

    Therefore you can also write these functions yourself and add them to the project.

    Here you can add your own code and set breakpoints to find out when or where it happens.

    Attached is a zip file with export files which you can import in your project.

    About the Callback functionality: 3S-Software has made some example projects which I also Attached.

    Callback.zip [15.16 KiB]

    CHECK_export.zip [1.64 KiB]

     

Log in to post a comment.