CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun Jun 25, 2017 6:22 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Feb 06, 2012 5:14 pm 
When I am reading through the documentation for the PLC Handler, there is a derivative class for listening for any state change information from the PLC. However, the documentation does not provide any information on how to use this class. The documentation states that the PLCHandler state changes will call the Notify() method of the class.

What is the correct way to listen for these notification messages? Do I need to overload the class to create my own notification method? Since I am writing my application is Visual C++, I would like to create an event handler to raise an event on the Notify method.

Can you please provide any documentation or examples on how to use this class?


Top
   
PostPosted: Mon Feb 06, 2012 6:55 pm 
UPDATE:

So I found that you do need to overload the class as the Notify() and Destructor() methods are virtual. Then you can write your own code for the Nofity() method to handle whatever special cases you are looking for.

In the end, I think the best thing will be to create an event handler for my form control class to listen for Notify() events and then handle them as I need.


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 1 guest


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