473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

OPC Server in Python

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
4 8406
>>>>> "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
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
"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Patrick Useldinger | last post by:
Hi all, after my unsuccessful try to run Apache 2 with mod_python and Python 2.3, I am looking for an alternative approach. My aim is to write a small web-based application: Python - the...
0
by: Dave | last post by:
I have been trying an example from the Python Programming on Win32 book on the lastest versions of python (2.3.3) and win32all (build 163). I create the COM object and try to call it from VB but i...
2
by: Phil | last post by:
I am using a Pascal like language (Wealth-Lab) on W2K and call this server: class HelloWorld: _reg_clsid_ = "{4E797C6A-5969-402F-8101-9C95453CF8F6}" _reg_desc_ = "Python Test COM Server"...
0
by: Phillip J. Eby | last post by:
PEP: 333 Title: Python Web Server Gateway Interface v1.0 Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/08/27 17:30:09 $ Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To:...
4
by: manatlan | last post by:
In an intranet/lan, i'd like to put a "python server script" (which run forever) on a computer A... On another computer B, I'd like to send smtp-email to the computer A ... (send to...
6
by: placid | last post by:
Hi all, Ive been reading about creating a HTTP server like the one pydoc creates (and studying pydoc source code). What i want to know, is it possible to create server that creates a webpage...
2
by: seb | last post by:
Hi, this simple server (time protocol) does not respond after a few hours, even when it is restarted. The behaviour looks to me like a firewall blocking but I have desabled the firewall. Using...
4
by: dbee | last post by:
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted...
7
by: Yansky | last post by:
I asked my hosting company if they would upgrade Python on my server to the latest version. They responded with: "Sorry no. We tend to stick with what comes packaged with the unix distribution...
1
by: manasonnet | last post by:
ava.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.