OpenOPC for Python is a free, open source OPC (OLE for Process Control) toolkit designed for use with the popular Python programming language. The unique features that set it apart from the many commercially available OPC toolkits include...
Easy to use Because the OpenOPC library implements a minimal number of Python functions which may be chained together in a variety of ways, the library is simple to learn and easy to remember. In its simplest form, you can read and write OPC items as easily as any variable in your Python program... print opc['Square Waves.Int4'] opc['Square Waves.Real8'] = 100.0
Cross platform support OpenOPC works with both Windows and non-Windows platforms. It has been tested with Windows, Linux, and Mac OS X.
Functional programming style OpenOPC allows OPC calls to be chained together in an elegant, functional programming style. For example, you can read the values of all items matching a wildcard pattern using a single line of Python code! opc.read(opc.list('Square Waves.*'))
Designed for dynamic languages Most OPC toolkits today are designed for use with static system languages (such as C++ or C#), providing a close mapping to the underlying Win32 COM methods. OpenOPC discards this cumbersome model and instead attempts to take advantage of the dynamic language features provided by Python. OpenOPC is also one of the very few OPC-DA toolkits available for any dynamic language, and future support is planned for Ruby.
EXAMPLE: Minimal working program import OpenOPC opc = OpenOPC.client() opc.connect('KepServerEx') print opc['Square Waves.Real8'] opc.close()
This project utilizes the de facto OPC-DA (Win32 COM-based) industrial automation standard.
Basic License OpenOPC for Python is freely available under the terms of the GNU GPL. However, the OpenOPC library module is licensed under the "GPL + linking exception" license, which generally means that programs written using the OpenOPC library may be licensed under any terms.
Linking Exception The following linking exception applies only to the OpenOPC for Python library module (OpenOPC.py). It does not apply to any other files or programs included as part of the OpenOPC project.
As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obliged to do so. If you do not wish to do so, delete this exception statement from your version.
License Intent You can use the OpenOPC library in any open source or commercial application without restriction. However, any improvements or changes you make to the OpenOPC library code itself must be given back to this project and/or the open source community for the benefit of everyone.