The IEC 61131-3 standard provides a vendor-independent, standardized programming interface for PLCs and automation controllers by defining five programming languages, along with rules for syntax and semantics. Using the languages and structure set out in IEC 61131-3, programmers and developers can more easily and efficiently define and build control software specific to their markets or applications. However, IEC 61131-3 does not address the actual programming of PLC applications. This is where OSCAT — the Open Source Community for Automation Technology — comes in. OSCAT brings consistency and efficiency to PLC programming by providing open-source libraries for common operations and functions.
The libraries provided by OSCAT contain functions and function blocks that adhere to the IEC 61131-3 standard. Unlike libraries provided by device vendors, which do not make the underlying code available, OSCAT libraries are completely open-source, meaning the source code is available and can be modified as needed to fit a specific application or process. And because the libraries are vendor- and hardware-independent, they can be implemented on any PLC or device that is compatible with IEC 61131-3.
OSCAT currently offers three libraries: Basic (containing over 500 functions and function blocks), Network (for file handling and Ethernet communication), and Building (for building controls such as heating and ventilation). Examples of operations and functions covered by OSCAT files are mathematic operations, networking and communication, string handling, and automation (including profile generation and control tuning), among many others. OSCAT libraries are tested extensively on a variety of hardware systems from multiple vendors, and they’re tested with other libraries as well. However, as an open-source product, OSCAT libraries carry no guarantee of functionality, but extensive support is available in the OSCAT user forum.
Functions and function blocks are types of program organization units (POUs) defined in IEC 61131-3. Functions are subprograms (typically equations) that return a value when they’re invoked, or performed, by the program. Function blocks are segments of reusable code that have internal memory and return an output that is conditional on the previous output of the function block and the current state of the process or action.
How do OSCAT libraries relate to CODESYS?
CODESYS is an integrated development environment that complies with the IEC 61131-3 standard and supports the development and debugging of code for PLCs and automation controllers. The CODESYS environment can be adapted to meet specific system requirements through the use of plugins, profiles, custom libraries, and external libraries. The OSCAT libraries described above are a type external library that can be used in the CODESYS development environment to standardize programming, making it more efficient and extensible.
It’s important to note that OCSCAT libraries are compatible with other development environments besides CODESYS, including PCWorx from Phoenix Contact and TwinCAT from Beckhoff, although CODESYS is arguably the most widely-used development environment under IEC 61131-3.