• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CODESYS Control
#1
A new container has been published that allows to run "CODESYS Control for Raspberry Pi" on netPI.

The container's repository and image is located here https://hub.docker.com/r/hilschernetpi/n...sys-basis/ ready for your download.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#2
Hi.

Just tried following codesys installation instructions but I have an issue related to Gateway not running.

Specifically, referring to YouTube video, everything is fine until 6 mins,40 secs, where the new netPI gateway should be used in order to get to container codesys runtime, but there my new added Gateway shows the red ball status.

Connecting via ssh to container I can run a ps -A, where I cannot find codesys daemon running.

Also, I tried enabling codesys logs by editing /etc/init.d/codesyscontrol file: log file is being created, but it is empty after a service stop/start cycle.

Any idea?

I'm using latest 3.5.12.10 Codesys for Raspberry SL runtime version.

Thanks!
  Reply
#3
Well the video shows a version 3.5.11.20 as it was the official version when we made the video. There are some new versions available as I can see it today. We cannot follow all the versions that CoDeSys made public and test it. So for version 3.5.12.10 there is no know-how.

The version 3.5.11.20 can be downloaded from CoDeSys web-site still. How about if you try this version instead. Then you have a 100% same setting as the video shows.

Since containers run 100% the same on any system the video and your "3.5.11.20 experience" must be the very same. If it fails also then there is a general problem.

I give you a hint. If you take the package from CoDeSys 3.5.12.10 and load it into 7zip on your computer you can look into it. Then parse into the folder Delivery. There you find a find "codesyscontrol_arm_raspberry_V3.5.12.10.deb". Click it again and further and further. Then you get three folders var, opt and etc. Those are the packages that are installed into the container when you install the runtime. Can you have a look via your SSH console if these files are installed into your container?
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#4
I tired it myself on my Raspberry Pi 3 at home just a minute ago. On my Pi 3 it works fine with 3.5.12.0.

Please watch Video 5:30. You have to start the runtime after downloading. Did you do that?

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
Yes I did, though I think it only runs a "sudo service start codesyscontrol".
I'm going to deploy a previous version of runtime to see if anything changes.

Thanks.
  Reply
#6
Well I never digged into detail what exactly the runtime deploys really in the container and which services are launched. Fact is that during deployment a lot of ssh services are used. Which one I don't know.

Since during my test everything worked fine when I made the video I did not spend any thought on it.

The only thing you see in the source code of the container is that it starts the runtime using the <i>/etc/init.d/codesyscontrol start &</i> construct in the <i>entrypoint.sh</i>. Use ps -A and you will see the following threads
root@6972b66c3ea6:/# ps -A
PID TTY TIME CMD
1 pts/0 00:00:00 entrypoint.sh
9 pts/0 00:00:00 tail
19 ? 00:00:00 sshd
159 pts/1 00:00:00 bash
167 pts/1 00:00:00 ps
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#7
Hi Armin.

Sadly same issue arises with version 3.5.11.20 too.

Maybe this could be an hint: when I start (through "Start" runtime button on Raspberry deployment tool in Codesys or when I run "sudo service codesyscontrol start", I do not get only messages I can see in your video, but also affinity mask messages, as shown here:

oot@a788855b58c3:/# sudo service codesyscontrol start
Backup licenses
tar: Removing leading `/' from member names
pid 194's current affinity mask: f
pid 194's new affinity mask: 1
codesyscontrol started

Since codesyscontrol is actually not started at all but I can see affinity mask messages related to taskset command, could issue be related to a different kernel running with latest netPI update (V1.1.2.0)?
  Reply
#8
Hello maiorfi,

I tried it in the morning now with my netPI and I saw the very same thing as you. Neither the old nor the new software runs and the gateway remains "red".

I have not digged into details yet why this happens, but I am getting my gateway to state "green" if I start the container with all the same settings but enabling the privileged mode also.

Try this and it will work.

I suppose that with netPI firmware release 1.1.0.0 or higher our new security restrictions of netPIs docker daemon prohibit starting the engine. I will update the video and readme file of the repository after you confirmed that it is running on your machine too.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
Great, thanks!

Ironically, it is exactly the next thing I would have been trying Smile
  Reply
#10
It works indeed.

Btw, did you manage to share gpio host device in order to have them available in codesys container?

Thanks!
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)