By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,270 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,270 IT Pros & Developers. It's quick & easy.

OPC Server in Python

P: n/a
Hi all,

I consider writing a control application in Python (realtime stuff would run
on hw, i.e. a PCI card). If I decide to do so, I'd like to provide access to
the control app's data for OPC clients. This means writing an OPC Server
(OPC DA).

Could I do this in Python too? At the core an OPC Server is a COM server,
isn't it? Did anyone in this group do anything like that already? And if so,
are you willing to share your experience?

Right now I'm trying to get more info about OPC, i.e. there are some
additional issues like OPC Groups and OPC Items and Browsing etc.

Any books you would recommend? Other stuff to get me started quickly?

Any hint welcome!

Kind regards
Franz GEIGER

Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
>>>>> "Geiger" == F GEIGER <fg*****@datec.at> writes:

Geiger> Could I do this in Python too? At the core an OPC Server
Geiger> is a COM server, isn't it? Did anyone in this group do
Geiger> anything like that already? And if so, are you willing to
Geiger> share your experience?

I've written an OPC client (in C++), and used a Wintech OPC client
library (proprietary). I kinda regret that I didn't use the OPC COM
interface directly, but I didn't know enough Python at the time (and
didn't have the Python for win32 book). I guess technically OPC uses
DCOM, but it ought to work the same way...

Geiger> Any hint welcome!

OPC is rather unpleasant. Systems that use OPC should rather use
CORBA, which is an open standard. Many people in automation industry
seem to be rather backward in the sense that they consider Windows,
COM and such things "standard" in some perverse fashion.

I would expose the variables that you do in your OPC server in some
more open fashion (CORBA is great w/ Python), and then implement a
small wrapper application that exposes the variables to OPC clients.
--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #2

P: n/a
F. GEIGER wrote:
Hi all,

I consider writing a control application in Python (realtime stuff would run
on hw, i.e. a PCI card). If I decide to do so, I'd like to provide access to
the control app's data for OPC clients. This means writing an OPC Server
(OPC DA).

Could I do this in Python too? At the core an OPC Server is a COM server,
isn't it? Did anyone in this group do anything like that already? And if so,
are you willing to share your experience?
I've tried to write an OPC server in Python, just for testing, I had a
few bugs that I struggled to iron out but in the end I didn't need it so
I never finished it, but it's definitely doable.
The nice thing is you could then write an OPC client in Python to test
it as well...

Right now I'm trying to get more info about OPC, i.e. there are some
additional issues like OPC Groups and OPC Items and Browsing etc.

Any books you would recommend? Other stuff to get me started quickly?
I would recommend looking at Lab43's LightOPC which is a C
implementation of OPC code available under LGPL, you can use it as
examples... Start with a simple server, look at the OPC
groups/items/browsing later...

Any hint welcome!

Kind regards
Franz GEIGER


Would be good to hear how you progress...

David
Jul 18 '05 #3

P: n/a
"Ville Vainio" <vi***@spammers.com> schrieb im Newsbeitrag
OPC is rather unpleasant. Systems that use OPC should rather use
CORBA, which is an open standard. Many people in automation industry
seem to be rather backward in the sense that they consider Windows,
COM and such things "standard" in some perverse fashion.


Thanks for the hint, Ville!

Kind regards
Franz GEIGER


Jul 18 '05 #4

P: n/a

"David Fraser" <da****@sjsoft.com> schrieb im Newsbeitrag
news:c8**********@ctb-nnrp2.saix.net...
I would recommend looking at Lab43's LightOPC which is a C
implementation of OPC code available under LGPL, you can use it as
examples... Start with a simple server, look at the OPC
groups/items/browsing later...
I've already encountered LightOPC. Now, as its recommended here, I'll have a
look into it. Thanks!
Would be good to hear how you progress...


I'll keep this group informed, but it certainly will take its time until
then...

Many thanks and kind regards
Franz GEIGER

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.