Hongke Industrial Raspberry Pi: Combined with Codesys to realize soft PLC function

Insert picture description here
Hongke Industrial Raspberry Pi RevolutionPi is a modular intelligent gateway and controller with Raspberry Pi computing module as the core and industrial-grade packaging, which can run in harsh industrial environments. Its operating system is also an optimized Raspbian system with real-time patches, which can better meet the real-time requirements of industrial occasions.

Introduction

Hongke Industrial Raspberry Pi RevolutionPi is a modular intelligent gateway and controller with Raspberry Pi computing module as the core and industrial-grade packaging, which can run in harsh industrial environments. Its operating system is also an optimized Raspbian system with real-time patches, which can better meet the real-time requirements of industrial occasions.

Codesys is a powerful PLC software programming tool, it supports IEC61131-3 standard IL, ST, FBD, LD, CFC, SFC six PLC programming languages, users can choose different languages ​​in the same project to edit sub Programs, functional modules, etc. By transplanting Runtime on the hardware platform, any embedded device or PC-based device can be transformed into an industrial controller that conforms to the IEC 61131-3 standard. This article will take the RevPi Connect module as an example to introduce how to install Codesys Runtime on Hongke Industrial Raspberry Pi RevPi and perform simple applications.

materials needed

  1. RevPi Connect
  2. PC (Codesys IDE development environment pre-installed)
  3. Codesys Control for Raspberry Pi (available for download on codesys China official website)
  4. Codesys Package for RevPi Family

Install Codesys Runtime

Before installing Runtime, you first need to set up the RevPi operating environment, and the PC and RevPi are in the same local area network.

Open the Codesys software, select Tools-》Package Manager, and install the already downloaded Codesys Control for Raspberry Pi. After the installation is complete, you can find Update Raspberry Pi under "Tools", and you can see the following interface:
Insert picture description here
Enter RevPi's IP address and login account name and password, and select the corresponding Codesys Runtime Package, and click Install. During the installation process, you need to choose single-core or multi-core mode. Since this time is just a demonstration, select single-core mode and wait for the installation to complete.

Build the project

Click File-"New Project, choose to create a new standard project and name the project RevPiDemo.
Insert picture description here
Insert picture description here
Before programming, you first need to install the Codesys Package for RevPi Family. The installation method is also realized through the package manager, so I won't repeat it here. At the same time, some project examples will be included in this package file.

After the package installation is complete, you can add a device to the project. Right-click on the Device and select "Add Device". Select the Connect module and click the "Add Device" button. Then close this window.
Insert picture description here
Then right-click on the newly added Connect module, select "Add Device", select other items-"left and add.
Insert picture description here
Then right-click on the left to add a device to choose to add an IO module by yourself. Right-click on PiBridge and select "Insert Device" to insert the gateway module.
Insert picture description here
Insert picture description here
After the device is added, you can start programming. All the added device-related variables can be displayed and configured in Codesys.
Insert picture description here

Download program

After the program is written, the program needs to be downloaded to the Connect module, and Runtime needs to be installed before that. First, double-click Device, click Communication Settings> Scan Network, and select RevPi.
Insert picture description here
Insert picture description here
Then click the login button above and wait for the information to be downloaded to the RevPi module.
Insert picture description here

to sum up

The detailed steps of how to run Codesys on RevPi and build a project are described above. Not only can RevPi be used as a soft PLC for programming with various PLC programming languages ​​through Codesys, but also Canopen master, Ethercat master and other functions can be realized.
Insert picture description here
Note:

  1. The RevPi family expansion gateway module only provides slave modules except DMX.
  2. Codesys is a commercial software that requires the purchase of a license to use it normally. Devices without a license have a running time limit.

Guess you like

Origin blog.csdn.net/Hongke_IIOT/article/details/112677771