Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Using Callback Function

Help
2011-05-25
2013-05-30
  • First, great project. Thanks for sharing. I'm kinda new to python but so far this has been very similar to OPCDAAuto that i've been using for a few years (with VB6). The only thing I haven't been able to figure out is how to use the callback, OnDataChange. Couldn't find an example in the docs so if someone could post an example that would be great. Thanks

     
  • I don't think it's available.  OpenOPC functions somewhat as a 'master / slave' tool… where OpenOPC (via your program or whatever you code it to do) is the master, and your OPC Server (and associated devices) are the slave.  You tell OpenOPC to do something, it does it, and then returns a value.  The end… loop…. do it again, or do something else…

    OnDataChange would require that OpenOPC (well, your program using OpenOPC) sit there and wait in a limbo state until some new event was triggered by the OPC Server.  This is more of a multi-master environment, which I don't think is the case with OpenOPC.