PLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

 

 How to create a Blog Entry

Find user stories of interesting ideas and solutions in this blog.
Note: The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact.

For questions, please go to the FORUM section and create a new entry there.

Want to add your own solution here? Just login as a registered user and click the "Create Blog entry" button. Find a short intro video by clicking the "How to create a blog entry" button. If you experience any problems with editing or publishing please contact us at This email address is being protected from spambots. You need JavaScript enabled to view it..


Hello PLCnext Community,
this contribution is a prototype implementation put together by our USA solution engineer Josh Krug. If you have any question please reach out to us, or ask over here in the forum on the PLCnext Community. Thanks, and stay tuned for more.

Introduction

This article will go over the steps to communicate to a Modbus bus coupler using a Python script.

Objectives

This document covers the following procedures:

  • Installing Python modules
  • Creating a Python script to allow the controller to act as a Modbus client
  • Setting up a Modbus Bus coupler
  • Testing the Modbus communications

For the voice recognition we use a device which is developed by a German company called voice INTER connect. Together with another company phytec they created the voice control kit.

It is a combination of a small embedded single board computer of phytec together with the industrial voice control board of voice INTER connect. The voice control supports 30 languages and works completely offline. The spoken commands are sent out via MQTT in json format..

We liked this board so much that we integrated it in our parcel turning device training hardware.

In my last post I wrote about our development setup to write C++ for PLCnext here in IMA Engineering at Phoenix Contact Deutschland GmbH. So you maybe already know that we are using Visual Studio Code to write C++ for PLCnext. In this post I want to show you how you can automate and therefore shorten your deploy and development cycle with Visual Studio Code tasks.

When developing components and programs for PLCnext in C++, it is often required to use functions provided by external, open source libraries. Open source libraries are available for applications including:

  • Machine learning
  • Special communication protocols
  • Database management

PLCnext Technology allows functions in external libraries to be called directly from real-time, deterministic control programs.

This guide describes how to use a third-party open-source library in a C++ project that is built for PLCnext Control using Eclipse.

NOTE: When using third-party software, it is the responsibility of the user to ensure that all license conditions are complied with.

PLCnext Technology controllers come with the SQLite database engine already installed. This database can be used by applications that require a "small, fast, self-contained, high-reliability, full-featured, SQL database engine" on the PLC.

This guide shows how to link a PLCnext Control C++ project to SQLite, and gives a simple example of how to call a SQLite function from a C++ component.

kernel parameters

To try out open source packages like Docker that require kernel parameters which are not enabled in the kernel of the standard firmware, it might be necessary to build and install an altered kernel on a PLCnext Control.

This How-To will guide you through this process. You need to get the kernel sources for the specific device and firmware version.

This package is not provided in the download-section for the device but can be ordered for a handling fee (check the procedure in the User Manual to the device).

(Click "Read more..." below the image.)

This example shows how to create PLCnext Component libraries with Visual Studio Code. The project layout should be capable of handling multiple PLCnext SDK versions and different controller targets.

The example is hosted on GitHub and can be downloaded from the GitHub repository.

This example was made with the following software:

  • Ubuntu 18.04.02 LTS as development environment.
  • Visual Studio Code version 1.32.3
  • Visual Studio Code Extensions:
    • CMake (twxs.cmake) version 0.0.17
    • CMake Tools (vector-of-bool.cmake-tools) version 1.1.3
    • C/C++ (ms-vscode.cpptools) version 0.22.1
  • PLCnext SDK 2019.0 LTS for AXC F 2152
  • PLCnext SDK 2019.3 beta bundle 1 for AXC F 2152