CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sat Dec 15, 2018 3:37 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Thu Jul 12, 2018 4:24 am 
Offline

Joined: Fri Dec 26, 2014 3:10 am
Posts: 45
This just serve as documentation how to get start with Codesys Control for Linux SL :-
Things are needed before start:-
a. 4GB thumb drive
b. Internet access(for Debian install)

1. Download Debian from Debian website
https://www.debian.org/distrib/netinst
- I'm using amd64 and version 9 (12/7/2018)

2. After Download the image then using Win32DiskImager(For Windows User, other os user you may find your own way to do this) burn the Debian ISO file into USB thumb drive
-Win32DiskImager can download from https://sourceforge.net/projects/win32diskimager/

3. After success create the Debian USB thumb drive, plug into any pc that you wish to install. Make sure the pc have set boot from USB. Start the PC and wait for the Debian boot up, then choice GUI install.

4. Follow the step by step and make sure you select SSH enable, set the password for the root account, create a user account and please remember the password cause it very important and you need it later.

5. Wait for 20 minutes or longer to complete the Debian installation.

6. Now you have to login your user account where created just now.
-The interested part is here now, most beginner user on linux always get use with the command "sudo", unlikely the installation I prepare just now is without the "sudo" preinstall , so you have manual to install it and set the right correctly.
- So click on the "Activities" on the top left corner, on the search bar enter "Terminal", the "Terminal" app will show and click on it

7. In the terminal step do below thing :-
- su -
- enter the root password
- apt-get install sudo -y <-- Here to get the sudo app from internet and start the installation
- After apt-get install done we have to set the right for the root and user
- usermod -aG sudo yourusername
- repeat above command to add root and your user name
- Done then exit terminal and restart the Debian

8. Now your good to using Codesys V3 IDE to install the Codesys Control Linux runtime into the Debian 9

9. For those have not try raspberry pi codesys, Wago PFC200/PFC100, Siemens IOT before, below are the step to show you how to install the codesys control for linux SL RunTime into Debian.

10. Download the Codesys Control for Linux SL package files.

12. Start the Codesys IDE, Go to Tools->Package Manager..-> Install -> Select the Codesys Control for Linux SL package files -> Click open-> click Next and Next until the package is finish install.

13. Restart the Codesys IDE again( This step is very important). After Restart then go to Tools-> Update Linux..
- under Login credentials enter yourdebianusername into user name, password into password
- Under select target - enter the Debian PC ip or you can scan for it(make sure the Debian pc are connect into the same network)
- Under the Package select Install
- Just make sure the message windows are show the Codesys Control for Linux SL are complete install.
- under Runtime click start.
- under system info click system info to check does the Codesys Runtime is running.

14. Now you are good to go to have fun on the Codesys Control for Linux SL.

PS: Edwin please correct me if the sudo are not important? Cause without the sudo I can't get codesys runtime to install on Debian.


Top
   
PostPosted: Wed Aug 15, 2018 6:32 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3018
Hi John,

many thanks for this instructions.
I appreciate your effort and assistance to make this for many user easier.

Yes I agree, to have the update tool running, you need sudo/root access.
BR
Edwin


Top
   
PostPosted: Mon Oct 29, 2018 7:23 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 94
Hi,

I am trying to install the runtime on Linux Lite (Ubuntu) but I always get the error: No connection to target: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.10.10.91:22.

I am able to ping the IP Address. Am I missing something?

Should it be able to run on Ubuntu?

Maybe it is this part that I don't understand correctly:

7. In the terminal step do below thing :-
- su -
- enter the root password
- apt-get install sudo -y <-- Here to get the sudo app from internet and start the installation
- After apt-get install done we have to set the right for the root and user
- usermod -aG sudo yourusername
- repeat above command to add root and your user name
- Done then exit terminal and restart the Debian

Thank you.


Top
   
PostPosted: Mon Oct 29, 2018 8:11 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3018
Hi,
I have installed Linux SL on an CX2020 with Debian this combination works like charm.

Could you Login by shh & root? This is needed to use the update tool in CODESYS.
Most of the Linux distributions do not have a enabled root / ssh login

How to enable this ( temp- for the install)?

Root ssh login enable:

/etc/ssh/sshd_config

PermitRootLogin yes

/etc/init.d/ssh restart

Sure you could copy the deb package by scp to the Linux System from
"c:\Users\<WindowsUserName>\CODESYS Control for Linux SL\Delivery\codesyscontrol_x64_linux_V3.5.13.0.deb"
and install it by

sudo dpkg -i codesyscontrol_x64_linux_V3.5.13.0.deb

If you do not want to enable it and use the CODESYS update tool.

BR
Edwin


Top
   
PostPosted: Mon Oct 29, 2018 9:12 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 94
I fixed part of the problem. I did not have SSH enabled. :oops:

But now I have these errors:

Maybe I will try to copy it manually.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Mon Oct 29, 2018 10:29 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 94
I copied it manually and it works.

I am surprised that the jitter is bigger than on a Raspberry Pi 3!

I will maybe try to run it on straight Debian.

It is now running on Linux Lite on a 1 Core Atom processor.


Top
   
PostPosted: Tue Oct 30, 2018 7:04 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3018
Hi,
sure with a standard Linux kernel I would agree,
you need to apply a rt_preempt patched kernel.
Even a precompiled for example should do it.

BR
Edwin


Top
   
PostPosted: Tue Oct 30, 2018 4:29 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 94
Do you know of any pre-compiled rt_preempt linux distro?


Top
   
PostPosted: Tue Oct 30, 2018 8:07 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3018
Hi,
based on Debian (think many other distributions have this too) these precompiled kernels are available.
Will add some instructions... but some time.
BR
Edwin


Top
   
PostPosted: Tue Oct 30, 2018 9:31 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 94
Did you forget to write down which precompiled versions are available?


Top
   
PostPosted: Thu Nov 01, 2018 1:18 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 94
I finally tried using Straight Debian and I also build a RT Kernel using this great guide:

https://medium.com/@patdhlk/realtime-linux-e97628b51d5d

Without the RT patch, the max jitter is around 2 ms.
With the RT patch, the max jitter is around 1 ms.

So it does help but it is still not great in my opinion. Maybe because I am using a 1 Core Intel Atom. Maybe I will try with other hardware later.

It would be nice to have a guide on how to get best performance out of Linux SL:
- What is the best Linux Distro to use?
- Are there any configuration to do in order to get the most out of the RT patch?

It is still a lot of fun to play with and very promising.
Keep up the good work!


You know what else would be great? Maybe a little too much to ask but I will anyway... -> A Linux Codesys IDE !!!!! :D


Top
   
PostPosted: Thu Nov 01, 2018 6:49 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3018
Hi,

I think it should be possible to have <100us Jitter.
Sure you need to setup a stable cpu clock - check if cpu clock is floating on your device by
cat  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
and google it how to set it for performance/stable

Linux IDE - I know that some users want to see this, but I fear this will not be realized. ( At least not in the near future)

Quote:
It would be nice to have a guide on how to get best performance out of Linux SL:
- What is the best Linux Distro to use?
- Are there any configuration to do in order to get the most out of the RT patch?

I will try to make some advices or faqs (but give me some time)
Distro - we use Debian and Ubuntu sure you could customize to have them small
RT_Preempt:
preompiled kernel is only the first step to get in.
If you want to have it customized for your machine, just put in what is really needed. (Then test the latency with the cylictest etc)

BR
Edwin


Top
   
PostPosted: Tue Nov 27, 2018 10:08 am 
Offline

Joined: Thu Aug 23, 2018 8:42 am
Posts: 29
Edwin Schwellinger wrote:
Hi,
I have installed Linux SL on an CX2020 with Debian this combination works like charm.

Could you Login by shh & root? This is needed to use the update tool in CODESYS.
Most of the Linux distributions do not have a enabled root / ssh login

How to enable this ( temp- for the install)?

Root ssh login enable:

/etc/ssh/sshd_config

PermitRootLogin yes

/etc/init.d/ssh restart

Sure you could copy the deb package by scp to the Linux System from
"c:\Users\<WindowsUserName>\CODESYS Control for Linux SL\Delivery\codesyscontrol_x64_linux_V3.5.13.0.deb"
and install it by

sudo dpkg -i codesyscontrol_x64_linux_V3.5.13.0.deb

If you do not want to enable it and use the CODESYS update tool.

BR
Edwin


Hi guys,

We got also the Linux SL on an CX5120 running Ubuntu after enabling SSH following these instructions:

https://thishosting.rocks/how-to-enable-ssh-on-ubuntu/

However, is there a driver for the FPGA running the K-/E-bus?

Thank you in advance, Omar


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 13 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited