Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added documentation about time limited pre-compiled demo binaries for the Raspberry Pi.
Table of Contents
minLevel1
maxLevel7

Introduction

 This This document describes how to start with GOAL with and the Raspberry Pi 3.

Required Hardware and Software

Following hardware and software is required for running GOAL on Raspberry Pi.

  • a Raspberry Pi 3 B+

  • a power supply for Raspberry Pi,

  • PC with Linux OS

  • GCC and the arm-gcc-linux-eabihf cross compiler (available at APT)

  • GOAL Software package/ release

Preparing the Raspberry Pi

Connect the Raspberry Pi to your local network via Ethernet. To access the device, either connect a monitor, keyboard and mouse via the provide HDMI and USB connectors or connect to the device via SSH after bootup.For a simple start we provide time limited demo binaries for the well-known Raspberry Pi for Profinet and EtherNet/IP. This way you can try the supported features and decide, if GOAL is what you need without editing sourcecode, compiling or other complicate steps.

For a more capable solution we’re also providing time limited, already compiled GOAL Demo Libraries containing the full Communication Stacks and Features. You only have to compile an Application against the Library. This way, you can create your own application.

Required Hardware and Software

Following hardware and software is required for running GOAL on Raspberry Pi:

  • a Raspberry Pi 3 B+ (or later),

  • a power supply for Raspberry Pi,

For using the GOAL Demo Binaries for Profinet or EtherNet/IP, you’ll need:

  • GOAL Demo Binaries for Profinet or EtherNet/IP

For using the provided GOAL Demo library you’ll need:

  • PC with Linux OS

  • GCC and the arm-gcc-linux-eabihf cross compiler (available at APT)

  • GOAL Software package/ release

Optional:

  • Industrial Communication Explorer as Soft-PLC

Preparing the Raspberry Pi

Connect the Raspberry Pi to your local network via Ethernet. To access the device, either connect a monitor, keyboard and mouse via the provide HDMI and USB connectors or connect to the device via SSH after bootup.

Using GOAL Demo Binaries for Profinet or EtherNet/IP

Starting the Application

Transfer the desired Binary to your Raspberry Pi - using SCP or an USB Storage. Start the Binary with the parameter “-i”, which defines the GOAL accessed network interface.

Info

The Binary must be startet with root rights to access raw sockets.

Profinet Binary

Start the Binary like shown below. The Profinet Demo Application will flush the IP configuration on the passed network interface. The Raspberry Pi is then accessable as a Profinet Device. The Application and it’s purpose is descrbed here.

Info

The Application will create a data dump called “goal_cm_nvs.bin“, which represents the non-volatile storage for GOAL. This data dump contains settings like the IP configuration, Station names et cetera.

Code Block
pi@raspberry:~ $ sudo ./demo_goal_pnio_01_simple_io_raspberry_pi.bin -i eth0
GOAL Start

[I|goal_taskCreate:117] creating task: GOAL Timer
[I|goal_tgtTaskCreate:1193] task stack size: 8388608 byte
[I|goal_tgtTaskCreate:1235] task scheduler priority: 99
[I|goal_taskCreate:160] Created task GOAL Timer with priority 100/100 and stack 0 byte sucessfully.
...
[I|goal_mainDemoStage:583] This is a demo version. It is time limited to 180 min
...
[I|IOD_Init:3119] PROFINET stack ready
[I|goal_fwInit:92] registered ARP handler
[I|goal_fwInit:101] registered UDP/TCP handler
[I|appl_setup:153] Initializing device structure
[I|appl_setup:201] PROFINET ready
[I|goal_memInitDone:152] fixed memory usage: 126776/262144 bytes bytes
[I|goal_memInitDone:157] fixed memory usage: (49%)

To test the Raspberry Pi as a Profinet Device, you could use the Industrial Communication Explorer, provided by us. This Tool acts as an Multi-Protocol PLC and is able to configure Profinet Devices and establish AR’s with it.

After Installing and Configuring, you simply start the Industrial Communication Explorer. To find the connected Raspberry Pi and Profinet Device, the Industrial Communication Explorer must be configured to use DCP to search for new devices. Select File [1] → Preferences → Protocols [2] and select “PROFINET” at “Scan for devices” [3]. Apply and Close those settings.

...

Please refer to following Knowledge Base Article, to establish an AR using the provided GSD. You may want to try the Raspberry Pi in combination with TIA-Portal or at an industrial environment to test GOAL, the Profinet Stack and all of its features.

EtherNet/IP Binary

The Application creates following objects:

Assembly

Type

Note

100

32 Byte Input

  • Read-only

  • first Byte shows Buttonstate, if supported

  • second Byte is mirrored by Assembly 150.

150

32 Byte Output

  • first Byte controls device LED, if supported

151

10 Byte Config

  • Read- and Writeable

154

32 Byte Explicit

  • Read- and Writeable

Start the Binary like shown below. The EtherNet/IP Demo Application will control the passed network interface. The Raspberry Pi is then accessable as an EtherNet/IP Device.

Info

The Application will create a data dump called “goal_cm_nvs.bin“, which represents the non-volatile storage for GOAL. This data dump contains settings like the IP configuration, Station names et cetera.

Code Block
pi@raspberry:~ $ sudo ./demo_goal_eip_01_simple_io_raspberry_pi.bin -i eth0
GOAL Start

[I|goal_taskCreate:117] creating task: GOAL Timer
[I|goal_tgtTaskCreate:1193] task stack size: 8388608 byte
[I|goal_tgtTaskCreate:1235] task scheduler priority: 99
[I|goal_taskCreate:160] Created task GOAL Timer with priority 100/100 and stack 0 byte sucessfully.
...
[I|goal_mainDemoStage:583] This is a demo version. It is time limited to 180 min
...
[I|IApp_InitImpl:191] Ethernet/IP 2.13.0 initialized
[I|goal_memInitDone:152] fixed memory usage: 109300/262144 bytes bytes
[I|goal_memInitDone:157] fixed memory usage: (42%)
[I|goal_netIpSet:1445] ip address: 192.168.0.50
[I|goal_netIpSet:1449] netmask: 255.255.255.0
[I|goal_netIpSet:1453] gateway: 0.0.0.0
[I|goal_netIpSet:1457] IP valid flag: false
[I|goal_netIpSet:1472] successfully updated IP configuration
[I|IApp_CreateUDPSocket:1688] opened UDP sock 0xc3244
[I|opener_NWHinit:764] UDPListener opened: 0xc3244

To test the Raspberry Pi as an EtherNet/IP Device, you could use the Industrial Communication Explorer, provided by us. This Tool acts as an Multi-Protocol PLC and is able to configure EtherNet/IP Devices and establish IO connections with it.

After Installing and Configuring, you simply start the Industrial Communication Explorer. To find the connected Raspberry Pi and EtherNet/IP Device, the Industrial Communication Explorer must be configured to use the protocol to search for new devices. Select File [1] → Preferences → Protocols [2] and select “EtherNet/IP” at “Scan for devices” [3]. Apply and Close those settings.

...

Please refer to following Knowledge Base Article, to establish an IO connection. You may want to try the Raspberry Pi in combination with a Hardware PLC or at an industrial environment to test GOAL, the EtherNet/IP Stack and all of its features.

Using precompiled GOAL Demo Libraries

Building and downloading applications

Navigate into the gcc subdirectory of one of the provided projects and run command make. On first run, you have to choose the platform. Enter the displayed ID for raspberry_pi.

...

Info

Logging is always enabled in the libraries.

Starting applications

After downloading the binary file, the application can be executed. Please not, that you need root access to start the program. Changing to to super user by sudo su is recommended.

...