- Data Access Patterns
Reading, writing and observing datapoint values follows four patterns. Which one to use is a decision about confirmation and timing, not about the value itself. Historical values are a topic of their own and are covered at the end of the page.
- Data Types
WinCC OA has its own type system. The Python API maps between Python native types and WinCC OA types automatically where possible.
- Error Handling
Errors are reported as exceptions. A call that returns has succeeded, a call that fails raises. There is no return code to inspect and no equivalent of the CTRL function getLastError() that has to be queried after every statement.
- Logging
The Python API does not define a log API of its own. Messages are written with the standard logging module of Python, and the manager forwards them to the WinCC OA log system.
- Manager Lifecycle
The Manager class is the entry point for all interactions with WinCC OA. It manages the connection to the runtime system, the event loop, and graceful shutdown.
- CTRL Interoperation
A Python manager can run CTRL code. This gives access to the CTRL function set and to the script libraries that already exist in a project, without having to port them.
- Manager Service API (MSA)
The Manager Service API (MSA) lets managers call each other. One manager offers a service, another manager calls its methods through a stub. MSA works across all manager programming languages, so a Python manager can call a service written in CTRL, C++, C# or TypeScript, and vice versa.
- Security
This page collects the security topics that are specific to writing and running Python code in WinCC OA. It is an orientation, not a complete treatment. The
WinCC OA Security Guideline is the authoritative document for securing a project. Most of the mechanisms described here belong to the project configuration rather than to the Python code.