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)
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/
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.
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.
Wait for 20 minutes or longer to complete the Debian installation.
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
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
Now your good to using Codesys V3 IDE to install the Codesys Control Linux runtime into the Debian 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.
Download the Codesys Control for Linux SL package files.
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.
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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</windowsusername>
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 !!!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
Zitat:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Edwin Schwellinger hat geschrieben:
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
/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</windowsusername>
Hi guys,
We got also the Linux SL on an CX5120 running Ubuntu after enabling SSH following these instructions:
Hi, I've installed Codesys linux v3.5.14 runtime on debian (Linux version 4.9.0-8-rt-amd64 PREEMPT RT Debian 4.9.144-3.1).
There is no problem with runtime or installation. We have written code to test that drives a motor . It worked, motor had been driven normal. But we have seen jitter value very high in IDE monitor. We haven't feel any problem with motor rotation altough we had high jitter value
Also I have tested same code on linux and windows *.
There was high difference between linux and windows. I couldnt figure out the problem. Do you have some advice to solve this problem.
PS : I've checked and changed cpu governor, power save mode. It reduced cycle value but jitter value did not fall at the expected rate
Servotronix cdhd servo
** Linux on left, windows on right
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just do a little bit update here, recently had done a project using this Linux Codesys.
So as other user we hope to see Linux version IDE but seem codesys will not make us happy(we always demand more).
So here have a little bit trick that we can do. Vmware do have version for debian, so you can install vmware on debian, then run win7 vmware image inside the debian. Now you can have the IDE. But it only can use for those quad core processes and need more ram.
Thank you
John Lee
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Many thanks!
In the case of building a distributed control system, which analogues of Siemens_ET200 can be used with Codesys_Control_for_Linux_SL? Do you have any implementation experience?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
Download Debian from Debian website
https://www.debian.org/distrib/netinst
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/
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.
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.
Wait for 20 minutes or longer to complete the Debian installation.
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.
In the terminal step do below thing :-
Now your good to using Codesys V3 IDE to install the Codesys Control Linux runtime into the Debian 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.
Download the Codesys Control for Linux SL package files.
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.
Restart the Codesys IDE again( This step is very important). After Restart then go to Tools-> Update Linux..
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.
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
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:
- repeat above command to add root and your user name
Thank you.
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:
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</windowsusername>
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
I fixed part of the problem. I did not have SSH enabled.
But now I have these errors:
Maybe I will try to copy it manually.
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.
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
Do you know of any pre-compiled rt_preempt linux distro?
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
Did you forget to write down which precompiled versions are available?
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 !!!!!
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)
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
/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</windowsusername>
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
Hi, I've installed Codesys linux v3.5.14 runtime on debian (Linux version 4.9.0-8-rt-amd64 PREEMPT RT Debian 4.9.144-3.1).
There is no problem with runtime or installation. We have written code to test that drives a motor . It worked, motor had been driven normal. But we have seen jitter value very high in IDE monitor. We haven't feel any problem with motor rotation altough we had high jitter value
Also I have tested same code on linux and windows *.
There was high difference between linux and windows. I couldnt figure out the problem. Do you have some advice to solve this problem.
PS : I've checked and changed cpu governor, power save mode. It reduced cycle value but jitter value did not fall at the expected rate
** Linux on left, windows on right
Hi All,
Just do a little bit update here, recently had done a project using this Linux Codesys.
So as other user we hope to see Linux version IDE but seem codesys will not make us happy(we always demand more).
So here have a little bit trick that we can do. Vmware do have version for debian, so you can install vmware on debian, then run win7 vmware image inside the debian. Now you can have the IDE. But it only can use for those quad core processes and need more ram.
Thank you
John Lee
John Lee, have you seen CODESYS 4 Linux?
https://forge.codesys.com/tol/codesys-4 ... home/Home/
Might be lighter than a Windows VM, both in terms of CPU cycles and dollars.
Hi John Lee! Please, your recommendation.
Which version of Debian and Codesys_Control_for_Linux_SL is the most stable today?
Last edit: simatinsky 2021-02-13
I am not John, but can give you recommendations anyway π
And if you have realtime requirements, Debian has readily patched kernels included. The packages are named like "linux-image-...-rt"
Cheers,
Ingo
Many thanks!
In the case of building a distributed control system, which analogues of Siemens_ET200 can be used with Codesys_Control_for_Linux_SL? Do you have any implementation experience?