Hilscher Forum
Cannot start container - Printable Version

+- Hilscher Forum (https://forum.hilscher.com)
+-- Forum: netPI - Ruggedized Raspberry Pi with Industrial Ethernet (https://forum.hilscher.com/Forum-netPI-Ruggedized-Raspberry-Pi-with-Industrial-Ethernet)
+--- Forum: Software (https://forum.hilscher.com/Forum-Software)
+--- Thread: Cannot start container (/Thread-Cannot-start-container)



Cannot start container - Magnus - October-16th-2019

Dear,

I have tried many times to follow all instructions on how to setup a netPi RTE 3 to work as
a Codesys RTE master for etherCat, ie a PLC.

I have come so far that I am online to the device from a google chrome browser.
No it did not work with address of the network interface. I had to find the taken
DHCP ip-adress and browse to that one.
I have activated the docker service.
I have added a container and follows all instructions how to fill out the parameters,
But every time it fails when I try to start the container.

It says

ERROR
No such Image: hilschernetpi/netpi-codesys-basis

What to do??

netPI RTE 3 is new item. Portainer is version 1.12.4


Best Regards
Magnus Torell


RE: Cannot start container - Armin@netPI - October-16th-2019

Hello Magnus,

I am pretty sure that do did not setup the system time of your netPI. You should follow this video https://www.youtube.com/watch?v=CB6bYfMbFhA.

The alternative is to update your netPI with system software 1.2.0.0 where we automatically have configured sime default NTP servers to get the current time automatically.

I know the ERROR "No such image" is missleading. But this is the normal return text of the Docker Hub, if time is not sychronized.

Thx
Armin


RE: Cannot start container - Magnus - October-16th-2019

Thanks Armin,

I followed the link and all was fine with the container start.

I also saw some posts about a Codesys PLC as master and Ethernet interfaces.

Hmm...
My initial thought was to use the RTE ports for a master EtherCat, but
reading other posts I understand that the recommended way is to
use the "std" RPi ethernet interface for a etherCat master and instead use the
RTEs for normal ethernet traffic and development from another computer
with Codesys development.
Is that correct understood?
If so how do you install the EtherCat driver to this interface.
and activate the others for normal traffic (I think DHCP will do)
Is there a video for just the case of getting a netPI RTE as a:
- "Codesys PLC with an EtherCAT master"


RE: Cannot start container - Armin@netPI - October-16th-2019

Yes Magnus your understanding is 100% correct.

The CODESYS driver for EtherCAT is already included in CODESYS by default. There is no need to install it additionally. So the eth0 interface (single Ethernet port) can be used as EtherCAT master right away.


RE: Cannot start container - Armin@netPI - October-16th-2019

Here is a picture of my setup I made with PROFINET as master. But it is the same as setting up an EtherCAT master. You just have to select a different device to add to your project.

Look how it looks like

[attachment=145]

First you have to add an Ethernet interface and then an EtherCAT master followed by your EtherCat slaves (in my case PROFINET slaves)


RE: Cannot start container - Armin@netPI - October-16th-2019

But before you can use the eth0 interface as a EtherCAT master with netPI RTE 3 you have to start the container with the IP parameters to activate the 2 x RJ45 RTE ports as standard ethernet interface additionally. Once this is done you can connect the container and its CODESYS runtime over the 2xRTE ports with your CODESYS Development System. Then eth0 is "free" for any use ... your EtherCAT master.


RE: Cannot start container - Magnus - October-16th-2019

(October-16th-2019, 11:46 AM)Armin@netPI Wrote: But before you can use the eth0 interface as a EtherCAT master with netPI RTE 3 you have to start the container with the IP parameters to activate the 2 x RJ45 RTE ports as standard ethernet interface additionally. Once this is done you can connect the container and its CODESYS runtime over the 2xRTE ports with your CODESYS Development System. Then eth0 is "free" for any use ... your EtherCAT master.

Thanks for support,

In order to - "start the container with the IP parameters"

Can I do that on an existing container or do I have to make new
container.
I saw that I can start a terminal/command-session in the container.

and

What entries and where do I make them to activate RTE as ethernet interfaces?


Best Regards

Magnus Torell


RE: Cannot start container - Armin@netPI - October-16th-2019

Hello Magnus,

Docker allows to specifiy mapped device and environment variables and other settings only during the first container start. So you have no chance to set those parameters afterwards. This is no a Hilscher restriction but a Docker one.

As described in the readme https://hub.docker.com/r/hilschernetpi/netpi-codesys-basis/ you have to add at least the ENV variable "IP_ADDRESS" set to value "dhcp". And do not forget to map devices /dev/spidev0.0 and /dev/net/tun to the container.

A very cool thing with Docker Web GUI on netPI is that you can click on a running container and then "Duplicate/Edit". It then copy the current settings of your container and you can add more parameters if you want. When you deploy the container then, the old container will be deletet and a new one started.

But of course you already loaded CODESYS runtime is gone since the container is new.

Thx
armin