CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Thu Oct 17, 2019 11:40 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Sep 14, 2013 6:53 am 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
All,

I want to do some emergency actions when my application is 'killed' e.g. '> sudo pkill codesys'.
Does CoDeSys provide a way to 'catch' a 'kill' event?

I found the callback library. And I tried:
Code:
cbNew.eEvent := CB.EVENT.STOP;
cbNew.eClass := CB.EVENT_CLASS.ONLINE_EVENTS;
cbNew.eSource := CB.EVENT_SOURCE.ALL_SOURCES;
cbNew.pPOUFunc := ADR(CallbackON_EVENT_STOP);
CB.RegisterCallback(cbNew := cbNew, peError := ADR(eError));


This catches the transition to the STOP state.
What parameters do I use to catch a CoDeSys 'kill'?
I searched in the CB.EVENT, CB.EVENT_CLASS and CB.EVENT_SOURCE enumerations, but cannot find anything.

Regards,
Edwin.


Top
   
PostPosted: Mon Sep 16, 2013 12:01 pm 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
I found these values:
Code:
dwSpec dwParam dwSource action
03E90001 00000022 00000004 stop
03E90001 00000022 00000003 div by zero
03E90001 00000022 00000001 kill


Regards,
Edwin.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 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 Limited