Disclaimer
This manual represents the current state of the product. Please check with port.de for the latest version as the document may have a newer version since errors may be corrected or changes for a newer version of the product may be incorporated. Port.de assumes no responsibility for errors in this document. Qualified feedback is appreciated at service@port.de.
This document is the Intellectual Property of port.de and is intended to be used with the described product only. It may be forwarded and/or copied in the original and unmodified format. All rights reserved.
The product enables to use technologies such as PROFINET, EtherNet/IP and/or EtherCAT and others. These technologies are promoted by trade organizations, such as PNO (profibus.org), ODVA (odva.org) or ETG (ethercat.org). These trade organizations as well maintain the specification and care about legal issues.
We strongly recommend to become a member of these organisations. Most technologies are making use of patented or otherwise copyrighted technologies, approaches or other intellectual property. The membership usually automatically entitles the member for use of most of the technology-inherent copyrighted or otherwise protected Intellectual Property of the corresponding trade organization and most 3rd parties. Otherwise the user will need to obtain licenses for many patented technologies separately.
Further we suggest to you to subscribe to the corresponding Conformance Test Tool of these trade organizations. For instance the ODVA only accepts conformance test applications from companies who have a valid membership and have a valid subscription to the recent Conformance Test Tool. We as port are members in all corresponding organizations and are holding a subscription to these tools - however you as a customer need to have an own membership and an own subscription to the tool.
All rights reserved
The programs, boards and documentations supplied by port GmbH are created with due diligence, checked carefully and tested on several applications.
Nevertheless, port GmbH cannot guarantee and nor assume liability that the program, the hardware board or the documentation are error-free or appropriate to serve a specific customer purpose. In particular performance characteristics and technical data given in this document may not be interpreted to be guaranteed product features in any legal sense.
For consequential damages, every legal responsibility or liability is excluded.
port has the right to modify the products described or their documentation at any time without prior warning, as long as these changes are made for reasons of reliability or technical improvement.
All rights of this documentation are with port. Unless expressively granted - the transfer of rights to third parties or duplication of this document in any form, whole or in part, is subject to written approval by port. Copies of this document may however be made exclusively for the use of the user and his engineers. The user is thereby responsible that third parties do not obtain access to these copies.
The soft- and hardware designations used are mostly registered and are subject to copyright.
Copyright
© 2019 port GmbH
Regensburger Straße 7
D-06132 Halle
Tel. +49 345 - 777 55 0
Fax. +49 345 - 777 55 20
E-Mail service@port.de www.port.de www.port-automation.com
Changelog
Version | Changes |
1.0
|
Initial release |
1.1
|
Update to raspi shield
|
1.2 | Change network access and login data in chapter 2.2 Chapter 2.3.2 “Pre build PN-IO app” added |
...
This document describes how start with the demonstration kit combining the port SoM Arduino Shield with the Raspberry Pi 3.
Within the document, special recommendations are given marked by two signs:
...
Special information giving hints to avoid common pitfalls when using the software
...
Special information to prevent malfunction of the software or that require special attention of the user.
Initial Setup
The demo kit consists of
a a Raspberry Pi 3 B+,
an adapter board Raspberry Header à Arduino Header,
the Arduino shield board containing the communication core,
a power supply for Raspberry Pi and
a software package
Management Tool for first steps with the device
Demo applications
...
The projects to compile are available in the folder projects/2015013_irj45/ac. To compile a single project, open a shell and go to the gcc subfolder folder of a project e.g. projects/2015013-_irj45/ac/01_pnio_io_mirror/gcc.
Now run make. The compile shell will now show the selection dialog for the target platform. Choose 3 for the Raspberry Pi Shield.
...
The build system will then start to build the software. The result resulting file is stored in the subfolder build/raspberry_pi_raspi_shield and name goal_raspberry_pi_raspi_shield.bin.
If successful, a Start the executable as shown below. A similar log as following will show:
Code Block |
---|
pi@bit-rp4:~ $ ./01_simple_io_raspberrypi.bin GOAL Start [AC_I|goal_taskCreate:117] creating task: GOAL Timer [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_tgtTaskCreate:1185] task stack size: 8388608 byte [AC_I|goal_cmInit:220] Calculated config size of 240 in 3 modules modules [AC_I|goal_taskCreate:117] creating task: MCTC SPI process [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_tgtTaskCreate:1185] task stack size: 8388608 byte [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 73, len: 50 [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 73, len: 50 [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_snmpInitRpc:103] SNMP Application Core successfully started [AC_I|goal_taskCreate:117] creating task: GOAL Main [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_tgtTaskCreate:1185] task stack size: 8388608 byte [AC_I|goal_init:186] GOAL initialized [AC_W|goal_lmLogLegacy:1022] [AC_W|goal_miMctcRpcSyncLoop:980] sync needs remote reset to proceed [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miMctcRpcSyncLoop:1022] RPC state synchronized, running appl_setup [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_pnioNewAc:275] PROFINET Application Core successfully started [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:351] Initializing device structure [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:568] PROFINET ready [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:570] Configuring DD [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:594] DD ready [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:601] mapping of ctc rx data (CC -> AC) [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:605] CC: input IOCS -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 0, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:619] RX: Slot 1 Subslot 1 CS: 0 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:624] CC: output IOPS -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 1, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:638] RX: Slot 2 Subslot 1 PS: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:643] CC: input IOCS -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 2, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:657] RX: Slot 3 Subslot 1 CS: 2 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:662] CC: output IOPS -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 3, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:676] RX: Slot 4 Subslot 1 PS: 3 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:681] CC: output data -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 4, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:694] RX: Slot 2 Subslot 1 DATA: 4 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:699] CC: output data -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 5, len: 2 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:712] RX: Slot 4 Subslot 1 DATA: 5 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:717] CC: APDU -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 7, len: 4 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:723] RX: APDU : 7 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:728] CC: DP -> AC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Read from AC', pos: 11, len: 4 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:734] RX:generic data provider : 11 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:738] mapping of ctc tx data (AC -> CC) [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:742] AC: input IOPS -> CC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 0, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:755] TX: Slot 1 Subslot 1 PS: 0 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:760] AC: output IOCS -> CC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 1, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:773] TX: Slot 2 Subslot 1 CS: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:778] AC: input IOPS -> CC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 2, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:791] TX: Slot 3 Subslot 1 PS: 2 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:796] AC: output IOCS -> CC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 3, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:809] TX: Slot 4 Subslot 1 CS: 3 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:814] AC: input data -> CC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 4, len: 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:827] TX: Slot 1 Subslot 1 DATA: 4 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:832] AC: input data -> CC [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miDmPartRegInt:275] part added to 'Write to AC', pos: 5, len: 2 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:845] TX: Slot 3 Subslot 1 DATA: 5 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_httpSetup:100] setup web server [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_dmCbCyclicRx:1010] entering safe state for Slot 4 Subslot 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_dmCbCyclicRx:1031] entering safe state for Slot 2 Subslot 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_httpNewAc:951] HTTP Application Core successfully started [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_httpSetup:178] web server setup done [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:869] CCM version : 2.0.0.0 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:870] CCM device : 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_setup:872] CCM Serial : b4:e9:a3:00:75:30 [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miMctcRpcSyncLoop:1052] local setup done [AC_I|goal_memInitDone:152] fixed memory usage: 64592/524288 bytes bytes [AC_I|goal_memInitDone:157] fixed memory usage: (13%) [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_dmCbCyclicRx:1003] entering valid state for Slot 4 Subslot 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_dmCbCyclicRx:1024] entering valid state for Slot 2 Subslot 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 1, subslot 1, IOCS' = 0x80 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 2, subslot 1, IOPS' = 0x80 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 3, subslot 1, IOCS' = 0x80 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 4, subslot 1, IOPS' = 0x80 [AC_E|goal_lmLogLegacy:1016] [AC_E|goal_miMctcMonitorRx:1289] data channel offline: MCTC SPI [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miMctcMonitorRx:1290] state : 4: [AC_I|goal_lmLogLegacy:1029] [AC_I|goal_miMctcMonitorRx:1275] data channel online: MCTC SPI [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_dmCbCyclicRx:1010] entering safe state for Slot 4 Subslot 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_dmCbCyclicRx:1031] entering safe state for Slot 2 Subslot 1 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 1, subslot 1, IOCS' = 0x0 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 2, subslot 1, IOPS' = 0x0 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 3, subslot 1, IOCS' = 0x0 [AC_I|goal_lmLogLegacy:1029] [AC_I|appl_loop:940] IOXS changed: 'slot 4, subslot 1, IOPS' = 0x0 |
...
Note |
---|
If this fails, a reset issue may affect your hardware. Please perform a reset of the SoM module and thus set a define output level for the reset signal using the following shell script: |
Code Block |
---|
#/usr/bin/env bash
echo "13" > /sys/class/gpio/export || true
sleep 1
echo "out" > /sys/class/gpio/gpio13/direction
sleep 1
echo "0" > /sys/class/gpio/gpio13/value
sleep 1
echo "1" > /sys/class/gpio/gpio13/value |
This script will set the GPIO, where the reset signal of the SoM module is connected to a defined value. Beside that a reset is performed.
...
Industrial Communication Explorer
The Management Tool Industrial Communication Explorer allows development related configuration and management of the application. This management is based on a UDP broadcast communication. Thus, it works independently from IP settings of the management PC and SoM.
...
Following function panels are available:
...
Panel
...
Function
:
Panel | Function |
EtherCAT Master | Provides simple EtherCAT master functionality. |
EtherNet/IP Master | Provides simple EtherNet/IP master functionality |
Exception Log | Shows error messages, which are saved in the non volatile storage of the communication controller. |
Device Log | Shows log messages of the running application from both communication controller (CC) and application controller (AC). |
Network state | Shows link state of the available network interfaces of the SoM. |
PNIO Master | Provides simple PNIO master functionality. |
ConfigManager | Provides access to the config manager variables of the SoM. |
Firmware Update | Allows update of the firmware of the SoM. |
...
At first a communication needs to establish be established with the SoM. Thus, connect the SoM to the network. Between the management PC and the SoM a network connection must be possible.
...
To communicate with the SoM, at first open the “Networks” list in the “Network Navigator”. Choose the network interface where the SoM is reachable. Then select the “Scan Network” button in the toolbar.
...
To configure an IP address, navigate to the variables of the “Module” GOAL_ID_NET. Make sure, that the variable DHCP_ENABLED is set to 0x00, as this option is prioritized. Now it is possible to configure IP, NETMASK and GW. Modify required values. Set the variable “VALID” to 0x01.
...
To continue, load the GSDML file provided with the distribution, located in “goal\appl\2015013_irj45\ac\gsdml\GSDML-V2.32-portGmbH-irj45-20180810.xml".
In the selector “Device Access Point” select “2-port Device”.
Afterwards press the “Connect” button. This button initiated a cyclic PROFINET communication.
Info |
---|
If the cyclic connection failes, try to decrease the “Device Interval”. Take also a look at our Support Knowledge Base and FAQ. |
The example application on the application controller will mirror the output data to the input data. I/O data can be manipulated and monitored in the I/O Data table. Beside that if a connection is established, the “LED1” Led on the Arduino shield will be enabled.
...