User-created function blocks increase productivity
By Bill Lydon
One of the most powerful capabilities of programmable logic controllers (PLCs) that conform to the IEC 61131-3 standard is the functionality that allows application engineers to create function blocks that can be reused with confidence, increasing project efficiency and quality. In addition, the growing demands for more control system functionality can be efficiently satisfied by creating functions for applications. These include:
- real-time data links to information technology systems
- "make to order" manufacturing demands
- process synchronization
- control to optimize processes (i.e., increase quality and save energy)
- real-time maintenance information
Function blocks have inputs, defined operation, and outputs that are linked together to create applications. PLCs come with a number of functions that are standard, for example, ADD, SUBTRACT, MULTIPLY, DIVIDE, PID, TIMER, DELAY. PLCs conforming to the IEC 61131-3 standards enable control and automation engineers to create their own function blocks for applications. This is a powerful tool for improving quality and productivity. The application engineer simply defines:
- Inputs to the function, including data type for each (including field point inputs, integer data, floating-point data, string data, time, and array data)
- Logic and calculations for the function. This can be done using ladder logic, structured text, or other function blocks. The functions can be simple logic or complex calculations (e.g., scaling a nonlinear sensor, staging multiple compressors, part load control strategies, communicating your messages, overall equipment effectiveness calculations, and performance calculations).
- Output of the function, for example control outputs, constants, local variables, and global variables. The outputs can also be email messages, SMS messages, served-up web pages, and OPC UA messages communicating with enterprise systems using the standard IEC 61131-3 PLCopen/OPC Foundation functions. The communication versatility allows information to be sent to local displays for a wide range of purposes, including maintenance advisories, alarms, and machine fault information.
Once the function is created and tested, it can be reused with confidence over and over in any project. Functions can easily be shared with other application engineers on a server, via email, or using other methods. The function can be added to a library that is available for the project and for general use by other engineering staff members in the organization.
There are a number of advantages to creating function blocks for a project or general library of functions that can be reused with confidence, including:
- reusing tested code, which reduces errors and increases reliability
- self-documenting — easily understood
- developing password-protect functions, which protects intellectual property
- capturing and systemizing knowledge (information and procedures)
- lowered mean time to repair
- standardized specifications
The libraries of functions created can always be updated with improvements to the functions. If the logic and calculations of the functions are the only change, existing applications can be updated simply by changing the function library in the application project.
Increasing power and scope
Industry 4.0, Industrial Internet of Things, and smart factory applications are growing. Implementation is simplified with user-created function blocks and a range of other standards that conform to the IEC 61131-3 standard and others defined by PLCopen.
PLCopen was founded in 1992 as an independent, worldwide association for industrial suppliers and users to create specifications that increase the value and productivity of IEC 61131-3-based controllers. For example, the standards based on PLCopen OPC UA for controllers improve automation system device interoperability. This simplifies sensor-to-enterprise, cloud, and Internet communications with PLC-open web services function blocks based on the OPC UA standard. The PLCopen OPC UA functions are a universal, secure, and reliable network communication method in IEC 61131-3-based systems. This enables frictionless information exchange based on computer industry standards.
Function blocks are also available for direct machine-to-machine communications between multiple vendor controllers to coordinate automation. These new function blocks simplify the integration of packaging and other machines into these new architectures. Examples of PLCopen function certifications include:
For more information about PLCopen standards and certifications, visit www.PLCopen.org.