You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](http://microbadger.com/images/hilschernetpi/netpi-netx-programming-examples"Image last updated")
4
7
5
-
### netX programming example applications for PROFINET, EtherNet/IP, EtherCAT, POWERLINK and Modbus/TCP
8
+
Made for Raspberry Pi 3B architecture based devices and compatibles featuring a netX51 industrial network controller
9
+
10
+
### Container features
11
+
12
+
The image provided herunder deploys a container that includes different programming examples for the on-board netX51 industrial network controller.
6
13
7
14
Base of this image builds [debian](https://www.balena.io/docs/reference/base-images/base-images/) with enabled [SSH](https://en.wikipedia.org/wiki/Secure_Shell) and created user 'pi'.
8
15
9
-
Additionally the image provides netX programming examples in source code (and as precompiled executables) for
16
+
Additionally the image contains netX51 programming examples in source code and as precompiled executables for the following protocols
10
17
11
18
* PROFINET IO-device
12
19
* EtherNet/IP adapter
13
20
* EtherCAT slave
14
21
* POWERLINK slave
15
22
* Modbus/TCP server
16
23
17
-
#### Container prerequisites
24
+
### Container hosts
25
+
26
+
The container has been successfully tested on the following Docker hosts
27
+
28
+
* netPI, model RTE 3, product name NIOT-E-NPI3-51-EN-RE
29
+
* netIOT Connect, product name NIOT-E-TPI51-EN-RE
30
+
* netFIELD Connect, product name NIOT-E-TPI51-EN-RE/NFLD
31
+
32
+
netPI devices specifically feature a restricted Docker protecting the Docker host system software's integrity by maximum. The restrictions are
18
33
19
-
##### Port mapping
34
+
* privileged mode is not automatically adding all host devices `/dev/` to a container
35
+
* volume bind mounts to rootfs is not supported
36
+
* the devices `/dev`,`/dev/mem`,`/dev/sd*`,`/dev/dm*`,`/dev/mapper`,`/dev/mmcblk*` cannot be added to a container
37
+
38
+
### Container setup
39
+
40
+
#### Port mapping
20
41
21
42
For enabling remote login to the container across SSH the container's SSH port 22 needs to be exposed to the host.
22
43
23
-
#####Host device
44
+
#### Host device
24
45
25
46
To grant access to the netX from inside the container the `/dev/spidev0.0` host device needs to be added to the container.
26
47
27
-
#### Getting started
48
+
### Container deployment
49
+
50
+
Pulling the image may take 10 minutes.
51
+
52
+
#### netPI example
28
53
29
-
STEP 1. Open netPI's landing page under `https://<netpi's ip address>`.
54
+
STEP 1. Open netPI's web UI in your browser (https).
30
55
31
56
STEP 2. Click the Docker tile to open the [Portainer.io](http://portainer.io/) Docker management user interface.
32
57
33
-
STEP 3. Enter the following parameters under **Containers > Add Container**
58
+
STEP 3. Enter the following parameters under *Containers > + Add Container*
`docker run -d --restart=always --device=/dev/spidev0.0:/dev/spidev0.0 -p 23:22/tcp hilschernetpi/netpi-netx-programming-examples`
42
72
43
-
STEP 4. Press the button **Actions > Start/Deploy container**
73
+
#### Docker compose example
74
+
75
+
A `docker-compose.yml` file could look like this
76
+
77
+
version: "2"
44
78
45
-
Pulling the image may take a while (5-10mins). Sometimes it takes so long that a time out is indicated. In this case repeat the **Actions > Start/Deploy container** action.
The container starts the SSH service automatically.
90
+
The container starts the SSH server automatically when deployed.
50
91
51
-
Login to it with an SSH client such as [putty](http://www.putty.org/)using netPI's IP address at your mapped port. Use the credentials `pi` as user and `raspberry` as password when asked and you are logged in as non-root user `pi`.
92
+
For an SSH terminal session use an SSH client such as [putty](http://www.putty.org/)with the Docker host IP address (@port number mapped e.g.23).
52
93
53
-
##### Files and folders
94
+
Use the credentials `pi` as user and `raspberry` as password when asked and you are logged in as non-root user `pi`.
95
+
96
+
Continue to use [Linux commands](https://www.raspberrypi.org/documentation/linux/usage/commands.md) in the terminal as usual.
97
+
98
+
#### Container files and folders
54
99
55
100
The login directs you to the pi user home directory /home/pi with following structure
56
101
@@ -75,7 +120,7 @@ The login directs you to the pi user home directory /home/pi with following stru
75
120
76
121
To install the netX SPI driver package move to the `driver` folder and call
77
122
78
-
`dpkg -i netx-docker-pi-drv-1.1.3.deb`
123
+
`dpkg -i netx-docker-pi-drv-2.0.1-r0.deb`
79
124
80
125
The driver will be installed into the folder `/opt/cifx`.
81
126
@@ -87,15 +132,15 @@ Basic include files needed for the compilation process will be installed into fo
87
132
88
133
To install a firmware package move to the folder `firmwares` and call
89
134
90
-
*`dpkg -i netx-docker-pi-pns-3.12.0.2.deb` for PROFINET IO device firmware or
135
+
*`dpkg -i netx-docker-pi-pns-3.14.0.5.deb` for PROFINET IO device firmware or
91
136
*`dpkg -i netx-docker-pi-eis-2.12.5.0.deb` for EtherNet/IP adapter firmware or
92
-
*`dpkg -i netx-docker-pi-ecs-4.7.0.2.deb` for EtherCAT slave firmware
93
-
*`dpkg -i netx-docker-pi-pls-3.3.0.0.deb` for POWERLINK slave firmware
137
+
*`dpkg -i netx-docker-pi-ecs-4.7.0.2.deb` for EtherCAT slave firmware or
138
+
*`dpkg -i netx-docker-pi-pls-3.3.0.0.deb` for POWERLINK slave firmware or
94
139
*`dpkg -i netx-docker-pi-omb-2.6.0.6.deb` for Modbus/TCP server firmware
95
140
96
141
Any firmware package extracts its firmware into the folder `/opt/cifx/deviceconfig/FW/channel0`.
97
142
98
-
The firmware will be loaded by the driver into netX network controller the first time the driver is accessed using the `cifXDriverInit()`command.
143
+
The firmware will be automatically loaded by the driver into the netX network controller when the driver is accesed by an application the first time using the `cifXDriverInit()`function.
99
144
100
145
There can be only one installed netX firmware package at a time. An existing package will be automatically uninstalled during the installation procedure.
101
146
@@ -125,17 +170,17 @@ If a different IO length is required you have to adjust the length in the file `
125
170
126
171
Afterwards recompile and start the new examples to become effective. Make sure you also modify the device description files and reload them into the master/contoller engineering software to sychronize the project with the new physical setup.
127
172
128
-
##### Starting the executables
173
+
##### Starting the pre-compiled executables
129
174
130
-
To start the compiled examples call the following executeables in the pi home directory
175
+
To start the pre-compiled examples call the following executeables in the pi home directory
131
176
132
177
*`sudo ./PNS_simpleConfig` for the PROFINET IO device example
133
178
*`sudo ./EIS_simpleConfig` for the EtherNet/IP adapter example
134
179
*`sudo ./ECS_simpleConfig` for the EtherCAT slave example
135
180
*`sudo ./PLS_simpleConfig` for the POWERLINK slave example
136
181
*`sudo ./OMB_simpleConfig` for the Modbus/TCP server example
137
182
138
-
Each example checks if its corresponding firmware package has been installed properly and loaded into netX, else it will install and load it automatically.
183
+
Each example checks if the related firmware package has been installed properly. It not it installs the package prior operation.
139
184
140
185
##### Electronic Data Sheets
141
186
@@ -155,7 +200,7 @@ To link the cifX driver library to own applications just add the option `-lcifx`
155
200
156
201
The cifX driver's function application interfaace (API) is described in the manual
157
202
158
-
`cifX_API_PR_04_EN.pdf`
203
+
`cifX_API_PR_08_EN.pdf`
159
204
160
205
located in the `manuals` folder. These call functions provide you a simple interface between your application and netX network controller.
161
206
@@ -165,23 +210,20 @@ A netX firmware has a common part that is behaving the same for all firmwares an
165
210
166
211
The protocol specific dependencies are described in the manuals
167
212
168
-
*`PROFINET_IO-Device_V3.12_Protocol_API_17_EN.pdf` for PROFINET IO device
213
+
*`PROFINET IO-Device V3.14 Protocol API 19 EN.pdf` for PROFINET IO device
169
214
*`EtherNetIP_Adapter_Protocol_API_19_EN.pdf` for EtherNet/IP adapter
170
215
*`EtherCAT Slave V4 Protocol API 09 EN.pdf` for EtherCAT slave
171
216
*`POWERLINK Slave V4 Protocol API 09 EN.pdf` for POWERLINK slave
172
217
*`OpenModbusTCP Protocol API 10 EN.pdf` for Modbus TCP server
173
218
174
219
located in the `manuals` folder.
175
220
176
-
#### Automated build
177
-
178
-
The project complies with the scripting based [Dockerfile](https://docs.docker.com/engine/reference/builder/) method to build the image output file. Using this method is a precondition for an [automated](https://docs.docker.com/docker-hub/builds/) web based build process on DockerHub platform.
179
-
180
-
DockerHub web platform is x86 CPU based, but an ARM CPU coded output file is needed for Raspberry systems. This is why the Dockerfile includes the [balena](https://balena.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/) steps.
221
+
### License
181
222
182
-
#### License
223
+
Copyright (c) Hilscher Gesellschaft fuer Systemautomation mbH. All rights reserved.
224
+
Licensed under the LISENSE.txt file information stored in the project's source code repository.
183
225
184
-
View the license information for the software in the project. As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
226
+
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
185
227
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
186
228
187
229
[](http://www.hilscher.com) Hilscher Gesellschaft fuer Systemautomation mbH www.hilscher.com
0 commit comments