• By David Schultz
  • IIoT Insight

Application programming interfaces (APIs) have been used for many years to allow computer programs to exchange information, but they are not as commonly used in manufacturing systems. As more systems are connected through Industry 4.0 initiatives, APIs will be more commonly used. It will be critical for control systems engineers and technicians to be able to make requests and parse the responses from APIs. Here is how APIs can be used for smart manufacturing and Industrial Internet of Things (IIoT) applications.

An API is a set of definitions and protocols that are used for building and integrating different application software so that they can communicate with each other. It can be thought of as an agreement between an information provider and consumer. The consumer will make a call or request (ask for information), and the provider will provide a response (give the information). The API defines how to formulate the question to get the desired answer. The API also defines how the answer will be provided.

There are many types of APIs, but Representational State Transfer (REST), or RESTful APIs, are the most common. They are a defined structure using common Web protocols and data formats. When a consumer application wants information, it will make a Hypertext Transport Protocol (HTTP) request to the provider, which responds with the formatted data. Like APIs, there are many data formats that can be used, but JavaScript Object Notation (JSON) is the most popular due to its simple data structure. It should be noted that while it has Java in its name, JSON is language-agnostic, taking advantage of how data is assembled.

Another API that is sometimes used is a Simple Object Access Protocol (SOAP). Unlike REST, SOAP is much more structured, and little needs to be known about the request and response format. When using SOAP, the information provider uses a Web Services Description Language (WSDL) file to facilitate the data exchange. While this might seem easier, it has specific requirements that often make it slower and heavier.

Types of applications

Within the context of Industry 4.0, many more manufacturing systems will be connected using APIs. For instance, a supervisory control and data acquisition (SCADA) system will connect directly to a computerized maintenance management system (CMMS) to create and manage work orders. Quality information, like instrument calibration data, will be historized along with process data. Data from disparate systems will be easily visualized from a common platform.

A typical scenario includes a line operator and a downtime event. Traditionally, when the event occurs, the operator attempts to fix the problem. If the situation requires a maintenance person, the contact is usually made through a radio or telephone. The technician arrives at the line and makes the repair, and the line starts running again. Only the line stop-time and start-time events are captured in real time. Other events (such as the work order, dispatch, arrival at the line) would not be known.

Using an API, the operator can generate a work order or work order request directly from the control system. The maintenance person is dispatched through the maintenance system. The technician logs into the control system, makes the repair, and then updates the status of the work order at the line. In this case, the work order generation, dispatch, and arrival times are all captured along with the downtime and start events.

APIs are not just limited to software systems. As more data is available from edge devices, such as instruments and sensors, the hardware that is used to connect these devices will use APIs. For instance, using a similar scenario to the one described above, a programmable logic controller controlling a remote asset like a compressor will use an API to make the request directly to the work order system based on operating conditions and states. The upside is that APIs are used to connect disparate devices and systems so that they can function more effectively and efficiently.

A version of this article originally appeared on the ISA Interchange blog.

Reader Feedback

We want to hear from you! Please send us your comments and questions about this topic to InTechmagazine@isa.org.

Like This Article?

Subscribe Now!

About The Authors

David Schultz has 25 years of automation and process control experience and currently helps manufacturers with digital transformation and asset management. He is president of the Milwaukee Section of ISA and actively involved in ISA’s Digital Twin and AI/ML technical committees. He is also a member of the Society of Maintenance and Reliability Professionals (SMRP) and Project Management Institute (PMI).