Life in times of COVID-19 has often been quite challenging. Especially the social distancing restrictions made it very difficult for people to live and work like they were used to. Stores, restaurants, offices, schools, and public buildings were closed, which made many previously normal activities inconvenient or even impossible. A team of researchers and students at San Nicolás University in Argentina developed a method based on artificial intelligence and PLCnext Technology to monitor the distance between people. This could help to observe social distancing guidelines while maintaining a somewhat normal level of social interaction.
Uniting different programming languages smoothly
The students utilized the EDUNET Starterkit which Phoenix Contact provides universities with as a teaching material. For their research the students connected an IP camera to PLCnext Control AXC F 2152, which enabled the system to analyze the footage of the camera in real-time and track the distance between people. One of the many advantages of PLCnext Technology is its openness to virtually any programming language and coding scripts. In this specific case IEC 61131-3, Python Scripting, MQTT & OPC UA communication, Node-RED visual programming and containerization worked together smoothly to achieve the goal.
The PLC in this setup interprets the video streaming signal of the IP camera through Python Scripting and the OpenCV library, which runs in a Docker container. A Node-RED browser editor organizes and visualizes the flows that not only monitor the distance between people but also react with direct messages as well as warning signals once the minimum distance has been undercut. In case such an incidence occurs, a Node-RED flow automatically starts a process to send out notifications to the individuals through Telegram messaging service. In addition, OPC UA codes were implemented to activate an analogue optical and audio warning signal. A MQTT-Broker manages the communication between the Docker container and the Node-RED editor.
This project not only impressively shows what amazing engineering young researchers and future programmers are capable of. It also underlines how enormously flexible PLCnext Control are. Only by uniting all these different programming languages and codes with one another the realization of this system was made possible. Another key aspect of making this distance tracking setup work, is the ability of PLCnext Technology to perform even sophisticated tasks in real-time reliably. Impressive that even an “entry-level” control such as the AXC F 2152 is capable of performing this high-level application based on Linux.
Helpful support from the PLCnext Community
Perhaps the most important factor in making the research project by the students at San Nicolás University a success was the support they received from the PLCnext Community. This online network consisting of users working with PLCnext Technology has grown into a global exchange platform, where tips and tricks are shared from user to user. It can be accessed directly via the PLCnext Technology website. In this specific case the hint to include a Docker container into the architecture came from a member of the community. This clue was ultimately the game-changer in realizing the distance tracking setup. Thus, it is fair to say that the Crowd Intelligence of the PLCnext Community played an integral part in implementing this Artificial Intelligence project.
There are currently more than 3,000 active members in the PLCnext Community. Besides users of PLCnext Technology solutions there are also product experts from PLCnext Technology and Phoenix Contact active in the network. You can find useful user experiences concerning working with the technology in the Maker’s Blog area as well as ask or answer questions in the online community’s forum. You can also access helpful videos on technical support issues through the PLCnext Community Website. This platform opens a new and effective way of collaborating with like-minded people across the globe. Like in the example of the distance tracking project, it leads to faster application development and quicker bug-fixing.
In case you are not already a member of the PLCnext Community, you should consider joining and benefitting from the power of crowd intelligence to get ahead in your personal project.