Python Forum

Full Version: OPC AE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey y'all,

Does any of you happen to know how to connect to an OPC Alarm & Event server?
I can find enough examples on how to connect to an OPC UA or OPC DA server, but not to an Alarm & Event server.

Reason I ask is because i'd like to build my own A&E client, but I'm kind of new to Python.
So before I take the trouble of learning the language thoroughly, I'd like to know if it even is possible at all to achieve this..
(I'm convinced it is possible only I don't know how)

If you have any hints, tips or tricks I'd very much appreciate it!

Thanks guys!
I used one time FreeOpcUa as a client, but for handling variables in a DB.
If you have a S7-1500, you can run on the PLC an OPC UA Server. If you have this possibility, you should use it.

What I never used are Events/Alarms, but in the description the implementation should support it.
Hey DeaD_EyE,

Thanks for the help.
Unfortunately it's not possible to implement an OPC UA server.
I'm afraid that OPC UA and OPC AE differ to much from each other since UA is fairly new compared to the A&E which has been around for a very long time, but if you say it should support it, I'll check it out!

I have the specifications of the A&E server, but it is written in C/C++.
Do know if there is a way in Python to still utilize the A&E server's methods and properties although it is written in C/C++?

In other words, is it possible to combine C/C++ and python in a way?

Thanks!

By the way:
Love your quote in your signature! totally agree with that one! ;)
Oh, thanks :-)

This is one super power of Python. You have access to C-Level.
With ctypes, which is in the stdlib of Python, you can call C/C++ functions.

I'll look tomorrow if FreeOpcUa supports and works with AE. We have enough plc's in our company to test.
This is also for me a learning lesson. Never made something with Alarms and Events.