Introduction and integration tips for Industry 4.0

Integration between cameras and industrial control systems (ICS) adds an extra layer of monitoring possibilities in automation for industrial operations, enhancing remote monitoring, process control and efficiency. This is particularly useful for large and complex facilities where on-site presence may not always be practical. In addition to being the eye on the scene, integrated cameras acting like sensors can collect data and support operators as they remotely monitor processes and make adjustments as needed. Such interoperability allows for not only improved quality and increased safety, but also cost reductions and a competitive advantage.  

Introduction

Using a standardized communication protocol like Modbus or OPC UA (Open Platform Communications Unified Architecture) enables interoperability and data exchange between cameras and software applications in industrial automation and control systems.     

Small, friendly Linux boxes

While Axis is most famous these days for surveillance cameras, our products fit nicely into several other markets and fields too. As a developer, the most important thing to remember about Axis devices is that they are small, friendly Linux boxes. And a network-connected Linux box means a vast number of opportunities for a software developer, especially since it comes packed with interesting sensors, I/O, and serial ports.

Run any binary you want

You can run any binary on your Axis device as long as it's compiled for the right architecture (32-bit or 64-bit ARM on contemporary products). However, if your application demands more RAM and CPU than the device can offer, it's like trying to transport a sofa-bed on a kick bike—you would choose another transport.

As long as the binary can run on the Axis device, it really doesn’t matter much how you build it or how you get it there. But AXIS Camera Application Platform (ACAP) surely must be the most convenient way to get there. Especially with the containerized ACAP SDK, your 3rd party programs can consistently and swiftly be shared and built to run smoothly on your Axis devices.

How to integrate with industrial systems

In modern industry, while Axis devices and traditional Video Management Systems often handle facility surveillance, the core of the production are industrial control systems, such as SCADA (Supervisory Control And Data Acquisition) servers overseeing PLC:s (Programmable Logic Controller) and sensors. Integrating an Axis device with these systems is a fairly simple task. How? What's needed is just a leightweight piece of software, conveniently packaged as an ACAP application, to connect the Axis device with the industrial system. This little piece of software enables big things to happen.

Integration guidelines

The industry has numerous communication protocols, a legacy from companies historically pursuing their own solutions. However, this isn't always beneficial for either the companies or their customers. Instead, commonly used protocols have found their way since they offer greater value to all parties.

Oldie but goldie: Modbus

An example of such a protocol is Modbus, dating back to 1979 and still widely used today. There we find the existing software library libmodbus, an open-source, well-tested software library with a friendly license that handles everything necessary for Modbus. It supports Modbus over both TCP and Serial (and Axis devices can use both). Using this already existing library for Modbus communication, we only need to add a small piece of code to bridge between the Axis environment and Modbus. This allows us to transmit data from the Axis device, including—but not limited to—AXIS Video Motion Detection (VMD) events, AXIS Object Analytics object detections, temperatures, and thermal camera readings, to the industrial system. Conversely, we can receive data from the industrial system and overlay it on an Axis camera, forward them as Axis events, etc. (This also enables any connected Video Management System to consume data from or send data to an industrial system.)

Contemporary de facto standard: OPC UA

Another commonly used industrial protocol is OPC UA. It's the contemporary choice supported by most SCADA servers and many other industrial devices right out of the box. OPC UA aims to be the de facto standard protocol for the industry and enjoys strong support from the key players in the industrial field. Just like with Modbus, there are well-established, open-source software implementations available for OPC UA that we can use. One notable example—promoted by the OPC Foundation—is open62541. By employing the open62541 library, which handles all OPC UA aspects, within an ACAP application and adding just a little amount of code to connect the Axis environment with the library, we can swiftly and easily integrate an Axis device into an OPC UA system, enabling bidirectional data flow.

Other protocols

If we were to adopt another protocol, the process would resemble what we've done for Modbus and OPC UA. However, our focus has been on these two dominant protocols, for which we've created open-source examples on GitHub. These examples serve as both examples and boiler plates for anyone who wants to integrate an Axis device. This may involve adjusting the data being transmitted or switching from Modbus/OPC UA to a different backend/protocol. The advantage is that you won't have to start from scratch, providing you with a ready-made structure to get up and running quickly.

Open source examples

OPC UA Server ACAP is an example application that gets temperature sensor data on an Axis device via D-Bus and exposes it via OPC UA (using open62541).

OPC UA Gauge Reader ACAP is an example application that reads analog gauges with video analytics and exposes the value via OPC UA (using open62541).

OPC UA VMD Events ACAP is an example application that subscribes to events from a selection of official ACAP applications and exposes their scenario statuses via OPC UA (using open62541).

Modbus ACAP is a small prototype ACAP application that exports events from AXIS Object Analytics (AOA) over Modbus (using libmodbus).

Precision Time Protocol daemon ACAP builds and packages the ptpd2 server into an ACAP application for smooth deployment on an Axis device.

OPC UA Color Checker ACAP is an example application that verifies if a certain area of an Axis camera's view has a certain color (within a set tolerance) and exposes the result as a boolean value via OPC UA (using open62541).