OPC Server in Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • F. GEIGER

    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



  • Ville Vainio

    #2
    Re: OPC Server in Python

    >>>>> "Geiger" == F GEIGER <fgeiger@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

    Comment

    • David Fraser

      #3
      Re: OPC Server in Python

      F. GEIGER wrote:[color=blue]
      > 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?[/color]

      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...
      [color=blue]
      >
      > 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?[/color]

      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...
      [color=blue]
      >
      > Any hint welcome!
      >
      > Kind regards
      > Franz GEIGER
      >[/color]

      Would be good to hear how you progress...

      David

      Comment

      • F. GEIGER

        #4
        Re: OPC Server in Python

        "Ville Vainio" <ville@spammers .com> schrieb im Newsbeitrag
        [color=blue]
        > 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.[/color]

        Thanks for the hint, Ville!

        Kind regards
        Franz GEIGER




        Comment

        • F. GEIGER

          #5
          Re: OPC Server in Python


          "David Fraser" <davidf@sjsoft. com> schrieb im Newsbeitrag
          news:c8a59n$7s5 $1@ctb-nnrp2.saix.net. ..
          [color=blue]
          > 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...[/color]

          I've already encountered LightOPC. Now, as its recommended here, I'll have a
          look into it. Thanks!
          [color=blue]
          > Would be good to hear how you progress...[/color]

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

          Many thanks and kind regards
          Franz GEIGER



          Comment

          Working...