How can I enable the realtime capabilities of the Codesys on the beaglebone via rt_preempt?
Can I use the beaglebone with codesys in industrial applications? or it's not recommended like the raspberry - codesys combo?
does it have ethercat master functionality?
thanks
Rotem
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to install a Beaglebone RT_Preemt patched Linux kernel:
Step 1: Get default Beaglebone image
Download the latest Debian image for BeagleBone: http://beagleboard.org/latest-images
e.g. Jessie
Flash it to a micro SD (e.g. with Win32Imager).
Step 2: Convert it to a realtime Linux
Boot Beaglebone from SD card.
Connect via putty (e.g. over USB; IP address: 192.168.7.2).
Connect Beaglebone to the internet.
cd /opt/scripts/tools
git pull
-> specific version ./update_kernel.sh --kernel 4.4.14-bone-rt-r11
better:
./update_kernel.sh --bone-rt-kernel --stable
 The beaglebone kernel will be automatically updated to a realtime kernel.
After reboot the realtime kernel is booting.
Step 3: Set CPU Governor to performance.
For getting better realtime performance set the CPU governor to performance:
Edit file /etc/init.d/cpufrequtils and change the entry GOVERNOR="ondemand" to performance.
Step 4 (optional): Enable CAN cape
For enabling CAN cape support add following line to /boot/uEnv.txt:
cape_enable=bone_capemgr.enable_partno=BB-CAN1
Step 5: Flash SD card to eMMC
cd /opt/scripts/tools/eMMC/
./init-eMMC-flasher-v3.sh
Now wait until LEDs stop flashing.
You can remove SD card and boot from eMMC now.
Note: If you want to optimize boot time you can deactivate services at startup:
e.g. deactivate apache server, Bluetooth,…
Furthermore it’s possible to recompile u-boot with bootdelay =0. This saves 2 seconds boot time.
We will add this to th FAQ section.
Zitat:
Can I use the beaglebone with codesys in industrial applications?
If you make the Image/OS robust for just switching it off or use an ups, yes.
Zitat:
does it have ethercat master functionality?
It has ethercat master functionality
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 Rotem,
here is a small FAQ for using rt_preemt on BBB:
Download the latest Debian image for BeagleBone: http://beagleboard.org/latest-images
e.g. Jessie
Flash it to a micro SD (e.g. with Win32Imager) and boot Beaglebone from it.
Connect Beaglebone via USB to your PC and connect via putty to address 192.168.7.2.
On Beaglebone console:
cd /boot
nano uEnv.txt
Uncomment: cmdliner=init/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
 This turns the SD card image into0 a flasher image
Save file and close nano.
Type init 6.
 Beaglebone reboots and SD card content is flashed to eMMC.
Wait until LEDs are not flashing anymore. Then remove SD card.
Reboot Beaglebone
 Beaglebone boots now from eMMC. Boottime is about 1 minute.
For the following steps the beaglebone has to be connected to the internet.
cd /opt/scripts/tools
./update-kernel.sh –kernel 4.4.14-bone-rt-r11
 The beaglebone kernel will be automatically updated to a realtime kernel.
When script is finished  reboot
Boot time is about 22s.
For getting better realtime performance set the CPU governor to performance (see GettingStarted.pdf).
Note: You have to add this command to the startup script.
For using a CAN cape add following line to /boot/uEnv.txt:
cape_enable=bone_capemgr.enable_partno=BB-CAN1
If you want to optimize boot time you can deactivate some commands in startup script:
e.g. deactivate apache server, Bluetooth,…
Furthermore it’s possible to recompile u-boot with bootdelay =0. This saves 2 seconds boot time.
We will add this to th FAQ section.
If you make the Image/OS robust for just switching it off or use an ups, yes.
It has ethercat master functionality
BR
Edwin
Hello, tell me who is more productive raspberry 3 or BeagleBone Black?
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,
by default not (without additional hardware) -> same as Raspberry Pi.
You have two options:
1. use an UPS System - graceful shutdown of the system is needed.
2. find a cape which has additional NVRAM and map this area as Memory for retain data. (from my experiance hard to find - to
is not available for BBB)
Grüße
Edwin
As Edwin said, BBB have a power management IC. you can connect a rechargeable battery (UPS) on TP5 .. TP8 and normal power supply.
when power supply is disconnected, the power management IC will immediately switch over to UPS. in this case you can read a input onto one of the GPIO for save and auto shutdown.
BR,
Stablex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am following Getting Started guide to setup runtime on Beaglebone Black. So far it is ok with configuring Beaglebone and not ok to transfer runtime to BBB. In Codesys menu TOOLS the option "Update BeagleBone Black" is not available. I don't see it at all. (Codesys 3.5.9 with installed Beaglebone package)
Package Manager says CODESYS Control for BeagleBone SL 3.5.9 is installed.
Codesys 3.5.9 is installed on Windows 7 64bit
What would be the first step to troubleshoot?
Thanks
Below is the installation log :
Usersonthismachine:
================================================================================Kind:Â Â Â Â Â Â Plug-inData:Â Â Â Â Â Â PlugIns\BBBUpdate.plugin.dllDataID:Â Â Â Â Â Guid=40962830-b582-4177-b99f-d5d6469896acVersion=1.0.0.0Currentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
==>Theactionrequiresarestart.
================================================================================Kind:Â Â Â Â Â Â ProfilechangeData:Â Â Â Â Â Â 40962830-b582-4177-b99f-d5d6469896acDataID:Â Â Â Â Â InstallationKey=12; Profile=CODESYS V3.5 SP9 Composer Dedicated; PlugIn=40962830-b582-4177-b99f-d5d6469896ac;Currentprofile: CODESYSV3.5SP9ComposerDedicated================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
==>Theactionrequiresarestart.
================================================================================Kind:Â Â Â Â Â Â ProfilechangeData:Â Â Â Â Â Â 40962830-b582-4177-b99f-d5d6469896acDataID:Â Â Â Â Â InstallationKey=12; Profile=CODESYS V3.5 SP9; PlugIn=40962830-b582-4177-b99f-d5d6469896ac;Currentprofile: CODESYSV3.5SP9================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
==>Theactionrequiresarestart.
================================================================================Kind:Â Â Â Â Â Â AddmenucommandData:Â Â Â Â Â Â f872d1e4-0650-431d-8073-54b5fbdfcf8bDataID:Â Â Â Â Â Command=f872d1e4-0650-431d-8073-54b5fbdfcf8b;Profile=CODESYS V3.5 SP9 Composer Dedicated;User=Currentprofile: CODESYSV3.5SP9ComposerDedicated================================================================================Targetitemisexisting. Checksumis'1'.
Sourceitemisidenticaltotargetitem.
Referencecounterisalreadyexisting. Valueis'1'.
==>Referencecounterhasbeenincremented.
================================================================================Kind:Â Â Â Â Â Â AddmenucommandData:Â Â Â Â Â Â f872d1e4-0650-431d-8073-54b5fbdfcf8bDataID:Â Â Â Â Â Command=f872d1e4-0650-431d-8073-54b5fbdfcf8b;Profile=CODESYS V3.5 SP9;User=Currentprofile: CODESYSV3.5SP9================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
================================================================================Kind:Â Â Â Â Â Â FileData:Â Â Â Â Â Â Delivery/codesyscontrol_arm_beagleboneblack_V3.5.9.0.debDataID:Â Â Â Â Â C:\Users\Admin.Latitude\CODESYSControlforBeagleBoneSL\codesyscontrol_arm_beagleboneblack_V3.5.9.0.debCurrentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
================================================================================Kind:Â Â Â Â Â Â DevicedescriptionData:Â Â Â Â Â Â Devices/CODESYSControlforBeagleboneBlack.devdesc.xmlDataID:Â Â Â Â Â Type=4102; Id=0000 0040; Version=3.5.9.0Currentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
================================================================================Kind:Â Â Â Â Â Â DevicedescriptionData:Â Â Â Â Â Â Devices/SPIMaster.devdesc.xmlDataID:Â Â Â Â Â Type=497; Id=0000 0001; Version=1.0.0.0Currentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
================================================================================Kind:Â Â Â Â Â Â FileData:Â Â Â Â Â Â DevicesDataID:Â Â Â Â Â C:\@Projects\CoDeSys\DevicesCurrentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
================================================================================Kind:Â Â Â Â Â Â LibraryData:Â Â Â Â Â Â Libraries/IoDrvGPIOBBB.compiled-libraryDataID:Â Â Â Â Â IoDrvGPIOBBB, 1.0.0.0(3S-SmartSoftwareSolutionsGmbH)Currentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
================================================================================Kind:Â Â Â Â Â Â LibraryData:Â Â Â Â Â Â Libraries/CmpCharDevice.compiled-libraryDataID:Â Â Â Â Â CmpCharDevice, 3.5.4.0(3S-SmartSoftwareSolutionsGmbH)Currentprofile:
================================================================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
============================================Kind:Â Â Â Â Â Â FileData:Â Â Â Â Â Â LibrariesDataID:Â Â Â Â Â C:\@Projects\CoDeSys\LibrariesCurrentprofile:
============================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
===========================================Kind:Â Â Â Â Â Â FileData:Â Â Â Â Â Â ExamplesDataID:Â Â Â Â Â C:\@Projects\CoDeSys\ExamplesCurrentprofile:
===========================================Targetitemisnotyetexisting.
==>Targetitemhasbeencreated.
==>Referencecounterhasbeencreated. Initialvalueis'1'.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ivp90 hat geschrieben:
It depends on your application: for a scada, i would use a raspberry and for an ethercat master with motion and i/o, a bbb is better.
why raspberry license is 35e and bbb one 50e?
Hello! Thanks for the reply, you can know what are the advantages BBB before PI3 in softmotion?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to follow :
For the following steps the beaglebone has to be connected to the internet.
cd /opt/scripts/tools
./update-kernel.sh –kernel 4.4.14-bone-rt-r11
then I do:
sudo reboot
here is mistype, should be ./update_kernel.sh
This command runs in few seconds. How we can verify that after reboot kernel is updated to realtime OS?
Where to find the latest version of RT Kernel? For example, today is 4.4.14-bone-rt-r11, what would be the name tomorrow? Where is that source?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Zitat:
For getting better realtime performance set the CPU governor to performance (see GettingStarted.pdf).
Note: You have to add this command to the startup script.
Where is a location of Startup script?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you execute ./update_kernel.sh –kernel 4.4.14-bone-rt-r11
on later updatesyou need only to call
./update_kernel.sh and you get the newest sources..
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
which startup script for doing what?
For Setting the CPU Clock?
Always an option is to google the bbb forum here there is always a solution for all kind of Problems: http://beagleboard.org/Community/Forums
maybe this link here helps for setting the CPU clock: http://beaglebone.cameon.net/home/set-cpu-speed
Keep in mind for rt_preemt/realtime it is mandatory to have a stable cpu clock no matter if it
is set to always beeing fast or slow - important is constant.
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why is the BBB considered Industrial capable and not the RPi? Is there because there are extended temperature range versions available, or is there some other reason to believe it is more reliable?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
please create a sub forum for bbb.
What about I2C & SPI bus on BBB?
The BeagleBone Black CODESYS Runtime is now available in the store.
http://store.codesys.com/systeme/codesys-control-for-beaglebone-sl.html
i have a error message when updating beaglebone black.
my bbb image is bone-debian-8.4-lxqt-4gb-armhf-2016-05-13-4gb, flashed to eMMC and boot from eMMC.
is this the problem?
Does codesys runtime get use of BBB PRU?
Hi,
at the moment not, which feature/features you might use if this would be available?
BR
Edwin
for direct use: high speed data adquisition like a adc
for motion task do i need a RTOS? with this runtime i could use preempt-rt or xenomai?
Hi,
yes you could use rt_preempt, then the plc/runtime is realtime capabale
no for xenomai
BR7Edwin
How can I enable the realtime capabilities of the Codesys on the beaglebone via rt_preempt?
Can I use the beaglebone with codesys in industrial applications? or it's not recommended like the raspberry - codesys combo?
does it have ethercat master functionality?
thanks
Rotem
Hi Rotem,
How to install a Beaglebone RT_Preemt patched Linux kernel:
Step 1: Get default Beaglebone image
Download the latest Debian image for BeagleBone:
http://beagleboard.org/latest-images
e.g. Jessie
Flash it to a micro SD (e.g. with Win32Imager).
Step 2: Convert it to a realtime Linux
Boot Beaglebone from SD card.
Connect via putty (e.g. over USB; IP address: 192.168.7.2).
Connect Beaglebone to the internet.
cd /opt/scripts/tools
git pull
-> specific version ./update_kernel.sh --kernel 4.4.14-bone-rt-r11
better:
./update_kernel.sh --bone-rt-kernel --stable
 The beaglebone kernel will be automatically updated to a realtime kernel.
After reboot the realtime kernel is booting.
Step 3: Set CPU Governor to performance.
For getting better realtime performance set the CPU governor to performance:
Edit file /etc/init.d/cpufrequtils and change the entry GOVERNOR="ondemand" to performance.
Step 4 (optional): Enable CAN cape
For enabling CAN cape support add following line to /boot/uEnv.txt:
cape_enable=bone_capemgr.enable_partno=BB-CAN1
Step 5: Flash SD card to eMMC
cd /opt/scripts/tools/eMMC/
./init-eMMC-flasher-v3.sh
Now wait until LEDs stop flashing.
You can remove SD card and boot from eMMC now.
Note: If you want to optimize boot time you can deactivate services at startup:
e.g. deactivate apache server, Bluetooth,…
Furthermore it’s possible to recompile u-boot with bootdelay =0. This saves 2 seconds boot time.
We will add this to th FAQ section.
If you make the Image/OS robust for just switching it off or use an ups, yes.
It has ethercat master functionality
BR
Edwin
Hello, tell me who is more productive raspberry 3 or BeagleBone Black?
It depends on your application: for a scada, i would use a raspberry and for an ethercat master with motion and i/o, a bbb is better.
why raspberry license is 35e and bbb one 50e?
As Edwin said, BBB have a power management IC. you can connect a rechargeable battery (UPS) on TP5 .. TP8 and normal power supply.
when power supply is disconnected, the power management IC will immediately switch over to UPS. in this case you can read a input onto one of the GPIO for save and auto shutdown.
BR,
Stablex
I am following Getting Started guide to setup runtime on Beaglebone Black. So far it is ok with configuring Beaglebone and not ok to transfer runtime to BBB. In Codesys menu TOOLS the option "Update BeagleBone Black" is not available. I don't see it at all. (Codesys 3.5.9 with installed Beaglebone package)
Package Manager says CODESYS Control for BeagleBone SL 3.5.9 is installed.
Codesys 3.5.9 is installed on Windows 7 64bit
What would be the first step to troubleshoot?
Thanks
Below is the installation log :
hi,
yuo could add these commands manually under
Tools->Customize
BR
Edwin
Thank you Edwin.
It would be good to update Getting Started guide to add this step in sequence.
sure we could add this, but usually this would not be needed.. just in case it fails.
BR
Edwin
Hello! Thanks for the reply, you can know what are the advantages BBB before PI3 in softmotion?
I am trying to follow :
For the following steps the beaglebone has to be connected to the internet.
cd /opt/scripts/tools
./update-kernel.sh –kernel 4.4.14-bone-rt-r11
then I do:
sudo reboot
here is mistype, should be ./update_kernel.sh
This command runs in few seconds. How we can verify that after reboot kernel is updated to realtime OS?
Where to find the latest version of RT Kernel? For example, today is 4.4.14-bone-rt-r11, what would be the name tomorrow? Where is that source?
Thanks
Where is a location of Startup script?
Thanks
I agree with the misstype
kernel src you see in the script will be pulled from:
https://rcn-ee.com/repos/debian/pool/ma ... -upstream/
if you execute ./update_kernel.sh –kernel 4.4.14-bone-rt-r11
on later updatesyou need only to call
./update_kernel.sh and you get the newest sources..
BR
Edwin
how to specify that I need a realtime kernel?
Edwin, could you please help with Startup script, where is it?
Hi,
which startup script for doing what?
For Setting the CPU Clock?
Always an option is to google the bbb forum here there is always a solution for all kind of Problems:
http://beagleboard.org/Community/Forums
maybe this link here helps for setting the CPU clock:
http://beaglebone.cameon.net/home/set-cpu-speed
Keep in mind for rt_preemt/realtime it is mandatory to have a stable cpu clock no matter if it
is set to always beeing fast or slow - important is constant.
BR
Edwin
Why is the BBB considered Industrial capable and not the RPi? Is there because there are extended temperature range versions available, or is there some other reason to believe it is more reliable?
Dear Edwin,
am i able to use SPI somehow on Beaglebone with codesys, because i've seen on your example screenshot (store)? If it possible, how can i add this?