Нет описания

rt-labs bot 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
.docker 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
.github 7601ac268e Automatic catchup to commit 44a8d03ed337bf1ecfda4d5e12becf657c90086b 1 год назад
include 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
src 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
test 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
tools 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
.clang-format b21490f171 Automatic catchup to commit 32acbfbcee8a28680473fa041ea7ef631955bbed 1 год назад
.git-blame-ignore-revs 44d620cf81 Automatic catchup to commit 9eebf32e82d89c1b508425d07f95a2f7887fc7f6 1 год назад
.gitattributes 5b574f66b2 Automatic catchup to commit 3110d250cee591058f1d975ab15218de547d49b5 1 год назад
.gitignore 47f2d6b218 Automatic catchup to commit c1bd7ca97846930250e099177640ed594c5769e0 1 год назад
.gitmodules 44d620cf81 Automatic catchup to commit 9eebf32e82d89c1b508425d07f95a2f7887fc7f6 1 год назад
LICENSE.md 49821cac30 Automatic catchup to commit 05929f096122412a863a5fe09f9354e2f983e2dd 1 год назад
README.md 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад
options.h.in 01c292ecd5 Automatic catchup to commit 365a31a68db3bde3d746d1fd22a4717704ec93c4 1 год назад
pnet_options.h.in 31e32aee9a Automatic catchup to commit 416816849fc4446c461b892b4d3cac75031e1461 1 год назад
pnet_version.h.in 9b97465c27 Automatic catchup to commit 5e5b50af23648f233d87b9770ac14e6f65efc3a9 1 год назад

README.md

P-net

Profinet device stack for embedded systems

Web resources

Build Status CodeQL

Key features

  • Profinet v2.43

    • Conformance Class A and B
    • Real Time Class 1
    • Multiple Ethernet ports
  • Easy to use

    • Extensive documentation and instructions on how to get started.
    • Build and run sample application on Raspberry Pi in 30 minutes.
  • Portable

    • Written in C.
    • Linux, RTOS or bare metal.
    • Sources for supported port layers provided.

The RT-Labs Profinet stack p-net is used for Profinet device implementations. It is easy to use and provides a small footprint. It is especially well suited for embedded systems where resources are limited and efficiency is crucial. The stack is supplied with full sources including porting layers and a sample application.

Also C++ (any version) is supported for application development.

The main requirement on the platform is that it can send and receive raw Ethernet Layer 2 frames.

This software is dual-licensed, with GPL version 3 and a commercial license. If you intend to use this stack in a commercial product, you likely need to buy a license. See LICENSE.md for more details.

Getting started

See the tutorial in the documentation: https://docs.rt-labs.com/p-net/running_sample_app.html

Note that you need to include submodules when cloning:

git clone --recurse-submodules https://github.com/rtlabs-com/p-net.git

Features

  • Multiple Ethernet ports (for Linux only, so far)
  • TCP/IP
  • LLDP
  • SNMP
  • RT (real-time)
  • Address resolution
  • Parameterization
  • Process IO data exchange
  • Alarm handling
  • Configurable number of modules and sub-modules
  • Bare-metal or OS
  • Porting layer provided
  • Supports I&M0 - I&M4. The I&M data is supported for the device, but not for individual modules.
  • Shared device (connection to multiple controllers)

Limitations

  • This is a device stack, which means that the IO-controller/master/PLC side is not supported.
  • No media redundancy (No MRP support)
  • Legacy startup mode is not fully implemented
  • No support for RT_CLASS_UDP
  • No support for DHCP
  • No fast start-up
  • No MC multicast device-to-device
  • No support for shared inputs
  • Supports only full connections, not the limited "DeviceAccess" connection type.
  • No iPar (parameter server) support
  • No support for time synchronization
  • No UDP frames at alarm (just the default alarm mechanism is implemented)
  • No ProfiDrive or ProfiSafe profiles.

Requirements

The platform must be able to send and receive raw Ethernet Layer 2 frames, and the Ethernet driver must be able to handle full size frames. It should also avoid copying data, for performance reasons.

  • cmake 3.14 or later

For Linux:

  • gcc 4.6 or later
  • See the "Real-time properties of Linux" page in the documentation on how to improve Linux timing

For rt-kernel:

  • Workbench 2020.1 or later

An example of microcontroller we have been using is the Infineon XMC4800, which has an ARM Cortex-M4 running at 144 MHz, with 2 MB Flash and 352 kB RAM. It runs rt-kernel, and we have tested it with 9 Profinet slots each having 8 digital inputs and 8 digital outputs (one bit each). The values are sent and received each millisecond (PLC watchdog setting 3 ms).

Dependencies

Some of the platform-dependent parts are located in the OSAL repository and the cmake-tools repository.

Those are downloaded automatically during install.

The p-net stack contains no third party components. Its external dependencies are:

  • C-library
  • An operating system (if used)
  • For conformance class B you need an SNMP implementation. On Linux is net-snmp (BSD License) used http://www.net-snmp.org

Tools used for building, testing and documentation (not shipped in the resulting binaries):

Contributions

Contributions are welcome. If you want to contribute you will need to sign a Contributor License Agreement and send it to us either by e-mail or by physical mail. More information is available on https://rt-labs.com/contribution.