CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Wed Oct 18, 2017 11:02 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 57 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
PostPosted: Mon Jul 04, 2016 9:13 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2160
Hi,
at the moment not, which feature/features you might use if this would be available?
BR
Edwin


Top
   
PostPosted: Tue Jul 05, 2016 2:13 am 
Offline

Joined: Fri Oct 16, 2015 6:42 am
Posts: 8
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?


Top
   
PostPosted: Tue Jul 05, 2016 4:44 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2160
Hi,
yes you could use rt_preempt, then the plc/runtime is realtime capabale
no for xenomai
BR7Edwin


Top
   
PostPosted: Thu Jul 14, 2016 2:45 pm 
Offline

Joined: Sun Nov 08, 2015 3:43 pm
Posts: 9
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


Top
   
PostPosted: Thu Jul 14, 2016 6:14 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2160
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.

Quote:
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.

Quote:
does it have ethercat master functionality?

It has ethercat master functionality
BR
Edwin


Last edited by Edwin Schwellinger on Tue Mar 21, 2017 6:59 pm, edited 4 times in total.

Top
   
PostPosted: Fri Jul 15, 2016 12:36 am 
Offline

Joined: Sun Feb 21, 2016 7:57 pm
Posts: 35
Edwin Schwellinger wrote:
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.

Quote:
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.

Quote:
does it have ethercat master functionality?

It has ethercat master functionality
BR
Edwin

Hello, tell me who is more productive raspberry 3 or BeagleBone Black?


Top
   
PostPosted: Fri Jul 15, 2016 4:17 am 
Offline

Joined: Fri Oct 16, 2015 6:42 am
Posts: 8
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?


Top
   
PostPosted: Fri Jul 15, 2016 1:17 pm 
Offline

Joined: Sun Aug 21, 2011 8:33 pm
Posts: 17
Edwin Schwellinger wrote:
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


Top
   
PostPosted: Tue Jul 19, 2016 3:43 am 
Offline

Joined: Tue Sep 15, 2015 10:23 pm
Posts: 13
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 :

Code:
Users on this machine:

================================================================================
Kind:            Plug-in
Data:            PlugIns\BBBUpdate.plugin.dll
Data ID:         Guid=40962830-b582-4177-b99f-d5d6469896ac Version=1.0.0.0
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

==> The action requires a restart.

================================================================================
Kind:            Profile change
Data:            40962830-b582-4177-b99f-d5d6469896ac
Data ID:         InstallationKey=12; Profile=CODESYS V3.5 SP9 Composer Dedicated; PlugIn=40962830-b582-4177-b99f-d5d6469896ac;
Current profile: CODESYS V3.5 SP9 Composer Dedicated
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

==> The action requires a restart.

================================================================================
Kind:            Profile change
Data:            40962830-b582-4177-b99f-d5d6469896ac
Data ID:         InstallationKey=12; Profile=CODESYS V3.5 SP9; PlugIn=40962830-b582-4177-b99f-d5d6469896ac;
Current profile: CODESYS V3.5 SP9
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

==> The action requires a restart.

================================================================================
Kind:            Add menu command
Data:            f872d1e4-0650-431d-8073-54b5fbdfcf8b
Data ID:         Command=f872d1e4-0650-431d-8073-54b5fbdfcf8b;Profile=CODESYS V3.5 SP9 Composer Dedicated;User=
Current profile: CODESYS V3.5 SP9 Composer Dedicated
================================================================================

Target item is existing. Checksum is '1'.

Source item is identical to target item.

Reference counter is already existing. Value is '1'.

==> Reference counter has been incremented.

================================================================================
Kind:            Add menu command
Data:            f872d1e4-0650-431d-8073-54b5fbdfcf8b
Data ID:         Command=f872d1e4-0650-431d-8073-54b5fbdfcf8b;Profile=CODESYS V3.5 SP9;User=
Current profile: CODESYS V3.5 SP9
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

================================================================================
Kind:            File
Data:            Delivery/codesyscontrol_arm_beagleboneblack_V3.5.9.0.deb
Data ID:         C:\Users\Admin.Latitude\CODESYS Control for BeagleBone SL\codesyscontrol_arm_beagleboneblack_V3.5.9.0.deb
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

================================================================================
Kind:            Device description
Data:            Devices/CODESYS Control for BeagleboneBlack.devdesc.xml
Data ID:         Type=4102; Id=0000 0040; Version=3.5.9.0
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

================================================================================
Kind:            Device description
Data:            Devices/SPIMaster.devdesc.xml
Data ID:         Type=497; Id=0000 0001; Version=1.0.0.0
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

================================================================================
Kind:            File
Data:            Devices
Data ID:         C:\@Projects\CoDeSys\Devices
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

================================================================================
Kind:            Library
Data:            Libraries/IoDrvGPIOBBB.compiled-library
Data ID:         IoDrvGPIOBBB, 1.0.0.0 (3S - Smart Software Solutions GmbH)
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

================================================================================
Kind:            Library
Data:            Libraries/CmpCharDevice.compiled-library
Data ID:         CmpCharDevice, 3.5.4.0 (3S - Smart Software Solutions GmbH)
Current profile:
================================================================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

============================================
Kind:            File
Data:            Libraries
Data ID:         C:\@Projects\CoDeSys\Libraries
Current profile:
============================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.

===========================================
Kind:            File
Data:            Examples
Data ID:         C:\@Projects\CoDeSys\Examples
Current profile:
===========================================

Target item is not yet existing.

==> Target item has been created.

==> Reference counter has been created. Initial value is '1'.


Top
   
PostPosted: Tue Jul 19, 2016 4:29 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2160
hi,
yuo could add these commands manually under
Tools->Customize

BR
Edwin


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


Top
   
PostPosted: Tue Jul 19, 2016 1:14 pm 
Offline

Joined: Tue Sep 15, 2015 10:23 pm
Posts: 13
Thank you Edwin.
It would be good to update Getting Started guide to add this step in sequence.


Top
   
PostPosted: Tue Jul 19, 2016 1:59 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2160
sure we could add this, but usually this would not be needed.. just in case it fails.
BR
Edwin


Top
   
PostPosted: Wed Jul 20, 2016 11:11 am 
Offline

Joined: Sun Feb 21, 2016 7:57 pm
Posts: 35
ivp90 wrote:
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?


Top
   
PostPosted: Wed Jul 20, 2016 3:06 pm 
Offline

Joined: Tue Sep 15, 2015 10:23 pm
Posts: 13
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


Top
   
PostPosted: Thu Jul 21, 2016 12:12 pm 
Offline

Joined: Tue Sep 15, 2015 10:23 pm
Posts: 13
Quote:
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 57 posts ]  Go to page Previous 1 2 3 4 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 guests


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