CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version Spanish version French version
It is currently Fri Aug 01, 2014 2:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Apr 20, 2010 9:40 pm 
Offline

Joined: Tue Apr 13, 2010 8:28 am
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2010 7:46 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 673
Location: holland
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.

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype paul.deelen
phone +31736139136


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2010 9:36 am 
Offline

Joined: Tue Apr 13, 2010 8:28 am
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2010 11:10 am 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 673
Location: holland
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.

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype paul.deelen
phone +31736139136


Top
 Profile  
 
 Post subject: check
PostPosted: Fri Apr 23, 2010 3:20 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 287
Location: Netherlands
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.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Andreas Kehrer and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group