I have been developing the SanCloud beaglebone black enhanced Industrial version to function as a PLC which runs on CoDeSys. I have had success in pushing the code onto the beaglebone and run it as a PLC. To do so I have done the following.
Flashed the latest version of debian onto the eMMC storage.
Rebuilt the kernel with a realtime kernel instead (rt_preempt)
Insalled Codesys runtime onto the board.
Now, I want to use the same Beaglebone board for HMI applications as it runs the plc script in the background. To do so I will have to run a browser in kiosk mode and it is here that I run into a lot of problems.
I downloaded the latest LXQT GUI image of debian for the board and flashed it to eMMC, but am not able to patch the kernel due to insufficient archive cache storage.
I did have success in patching the kernel by booting off an sd card with the LXQT GUI image as I was able to run a script to increase the root storage, but I was unable to write the OS to the onboard eMMC as the BBB only has a limited 4Gb and the the Image on the SD card was around 7.4Gb after the script to increase the root storage was executed.
I tried installing a graphical server , a window manager and the chromium-browser on an IOT image to avoid the clutter of a desktop that I do not need. I am unable to install them or if I am able to, they do not launch.
If you run CODESYS for BBB you won't need special software for an HMI. You can use Webvisu or TargetVisu depending on the license options that the BBB CODESYS Runtime contains. The PLC functionality is compiled, not scripted. Although special HMI software is not needed, especially when using the internal webserver for graphics(Webvisu). You could still opt to do this but it will take you way more effort.
A tip is to read up on help.codeys.com on WebVisu or TargetVisu and search in the BBB runtime package for the target specific webserver settings.
Kiosk mode can be enabled in a webbrowser like Chromium and is not part of CODESYS software. TargetVisu, which is part of CODESYS does support it too. Search for enabling kiosk mode in your favorite webbrowser via Google. Also, the webbrowser could but does not need to run on the platform itself. As does TargetVisu.
Hope these hints give you a direction.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am planning to use webvisu from codesys for the HMI.
I am able to install the packages for xserver(webserver) on the BBB. Do I need to install chromium-browser and a window manager like openbox to view the HMI screens developed in codesys?. Please note that I am using the IOT image of debian for the BBB.
Thank you for your help.
Giri
Last edit: girimugundan 2020-09-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi;
CODESYS WebVisu is included as full version in the delivery of the BeagleBone runtime package. This means that is installed as part of your CODESYS Runtime allready.
If I were you, I'd focus on building and making the visualisation for your program instead of focusing on the kiosk mode (which is trivial if you ask google);
sorry for the late reply. I got it to work. I did the following.
I installed the IoT version of debian.
I patched in the rt kernel.
I installed a gui with LXDE light.
Then I ran a webvisu program using the browser on the BBB.
Your suggestions helped a lot. Especially the port id of 9090 instead of 8080 as with the RPi. I found the BBB to be rather slow when it came to browser based operations. Do you know of any way to optimize performance?..
Regards,
Giri Mugundan Kumar
π
2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Girimugundan
Could you tell me ho to patch rt kernel for BBB Debian 10 IoT? And I also want to run GUI apps (Not web browser) on BBB, then I need lightest weight package to save more resource of BBB. So, is LXDE the best choice? And could you tell me command to install LXDE right way? Tks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the late reply. You can rt patch the kernel for the BBB using the script that is already written and present on board. Follow the instructions in the link below. https://elinux.org/EBC_Exercise_36_PREEMPT_RT
This is where it gets tricky. The BBB only has 4 gigs of flash storage onboard. This isn't enough to download and install any more applications as the space to download app scripts to temp memory is virtually not present. You can solve this in two ways.
Use an sd card. expand root storage and boot from SD card. This method while functional has you relying on the SD card. So I would suggest the next method.
To answer your following question, LXDE is slow. Though very functional, I found it slow and I do not really know the reason as to why it is slow nor did I spend any more time optimizing it. Please let me know if you have found a way to make it snappier.
To do that would you need to be using either a cape or power supply that has UPS functionality and can has an output indicating that power has been cut?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oymyakon, currently, I have just been using my BBB industrial for development purposes as it makes for a really portable PLC which runs codesys and needs just one cable. I am planning to use a circuit with a super capacitor and Codesys to perform safe shutdowns on a later date (As Ingo suggested). There will be a constant current to one of the Digital I/O and once cut, the beaglebone will run a scrip to shutdown (The super capacitor will power the BBB till it does). If power is back on, I am planning on using a relay of some sort to power cycle the BBB to switch it on again (after a dwell period of 30seconds or so to account for safe shutdown, if the power is immediately back on). I am not sure about this though, I will only know the problems once I implement it. I will keep you guys posted. Any suggestions or corrections to my idea are most welcome!.
Regards,
Giri Mugundan Kumar
π
2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, the cost of the beaglebone license is prohibitive. By the
time you have added the license and a comms license it is more
expensive than an industrial plc.
Hello,
I have been developing the SanCloud beaglebone black enhanced Industrial version to function as a PLC which runs on CoDeSys. I have had success in pushing the code onto the beaglebone and run it as a PLC. To do so I have done the following.
Now, I want to use the same Beaglebone board for HMI applications as it runs the plc script in the background. To do so I will have to run a browser in kiosk mode and it is here that I run into a lot of problems.
https://thepcspy.com/read/building-a-kiosk-computer-ubuntu-1404-chrome/
https://www.sylvaindurand.org/launch-chromium-in-kiosk-mode/
http://www.geekdroppings.com/2014/08/17/beaglebone-black-and-kiosk/
My needs are:
1. rt patched kernel
2. browser running in kiosk mode for HMI
Would love the community's help on this issue as I am quite new to the platform.
Yours sincerely,
Giri Mugundan Kumar
more posts ...
If you run CODESYS for BBB you won't need special software for an HMI. You can use Webvisu or TargetVisu depending on the license options that the BBB CODESYS Runtime contains. The PLC functionality is compiled, not scripted. Although special HMI software is not needed, especially when using the internal webserver for graphics(Webvisu). You could still opt to do this but it will take you way more effort.
A tip is to read up on help.codeys.com on WebVisu or TargetVisu and search in the BBB runtime package for the target specific webserver settings.
Kiosk mode can be enabled in a webbrowser like Chromium and is not part of CODESYS software. TargetVisu, which is part of CODESYS does support it too. Search for enabling kiosk mode in your favorite webbrowser via Google. Also, the webbrowser could but does not need to run on the platform itself. As does TargetVisu.
Hope these hints give you a direction.
Hello aliazzz,
I am planning to use webvisu from codesys for the HMI.
I am able to install the packages for xserver(webserver) on the BBB. Do I need to install chromium-browser and a window manager like openbox to view the HMI screens developed in codesys?. Please note that I am using the IOT image of debian for the BBB.
Thank you for your help.
Giri
Last edit: girimugundan 2020-09-05
Hi;
CODESYS WebVisu is included as full version in the delivery of the BeagleBone runtime package. This means that is installed as part of your CODESYS Runtime allready.
If I were you, I'd focus on building and making the visualisation for your program instead of focusing on the kiosk mode (which is trivial if you ask google);
see https://support.mozilla.org/en-US/kb/firefox-enterprise-kiosk-mode
or https://www.appsadmins.com/blog/chrome-kiosk-mode-introduction
or https://www.jamf.com/jamf-nation/discussions/26210/ios-safari-kiosk-with-full-screen
So, start with a small program with a webvisu and after download and run, you can visit the internal webserver (it's activated after you press run):
Also, since the beaglebone allready has a webserver occupying 8080, he Codesys webserver runs at port 9090 instead of the default 8080.
Remember to visit https://help.codesys.com for help on any CODESYS topic!
Plus, you can download many ready to go examples from the CODESYS store too.
Hello aliazz,
sorry for the late reply. I got it to work. I did the following.
Your suggestions helped a lot. Especially the port id of 9090 instead of 8080 as with the RPi. I found the BBB to be rather slow when it came to browser based operations. Do you know of any way to optimize performance?..
Regards,
Giri Mugundan Kumar
Hi Girimugundan
Could you tell me ho to patch rt kernel for BBB Debian 10 IoT? And I also want to run GUI apps (Not web browser) on BBB, then I need lightest weight package to save more resource of BBB. So, is LXDE the best choice? And could you tell me command to install LXDE right way? Tks
Hi sonnh,
Sorry for the late reply. You can rt patch the kernel for the BBB using the script that is already written and present on board. Follow the instructions in the link below.
https://elinux.org/EBC_Exercise_36_PREEMPT_RT
This is where it gets tricky. The BBB only has 4 gigs of flash storage onboard. This isn't enough to download and install any more applications as the space to download app scripts to temp memory is virtually not present. You can solve this in two ways.
Use an sd card. expand root storage and boot from SD card. This method while functional has you relying on the SD card. So I would suggest the next method.
After installing and patching the rt kernel, purge the old kernel. This frees up just enough space to install other applications. follow the instructions below.
https://www.pontikis.net/blog/remove-old-kernels-debian-ubuntu
To answer your following question, LXDE is slow. Though very functional, I found it slow and I do not really know the reason as to why it is slow nor did I spend any more time optimizing it. Please let me know if you have found a way to make it snappier.
Cheers,
Giri
PS: Follow the instructions in the link below to install LXDE:
https://elinux.org/Beagleboard:Installing_LXDE
Last edit: girimugundan 2021-03-11
Hi, How did you get the beaglebone to retain variables ie persistence on power failure? Cheers Paul.
The standard is to shut down cleanly on power fail.
If this is not possible, you can call AppStoreRetains from the CmpApp library at any time.
To do that would you need to be using either a cape or power supply that has UPS functionality and can has an output indicating that power has been cut?
Hello,
Oymyakon, currently, I have just been using my BBB industrial for development purposes as it makes for a really portable PLC which runs codesys and needs just one cable. I am planning to use a circuit with a super capacitor and Codesys to perform safe shutdowns on a later date (As Ingo suggested). There will be a constant current to one of the Digital I/O and once cut, the beaglebone will run a scrip to shutdown (The super capacitor will power the BBB till it does). If power is back on, I am planning on using a relay of some sort to power cycle the BBB to switch it on again (after a dwell period of 30seconds or so to account for safe shutdown, if the power is immediately back on). I am not sure about this though, I will only know the problems once I implement it. I will keep you guys posted. Any suggestions or corrections to my idea are most welcome!.
Regards,
Giri Mugundan Kumar
Anything new on your plan?
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
Hi,
No, the cost of the beaglebone license is prohibitive. By the
time you have added the license and a comms license it is more
expensive than an industrial plc.
cheers
Paul
Thanks for your help