dirk
Hi, we develop the RevolutionPi which is an industrial RaspberryPi based on the Compute Module (CM). A community member has asked how he could integrate the OpenPLC SPS.  Here is the original discussion and my answer. So if you have ideas how we could help to put the OpenPLC into operation on the RevPi it would be great.
Reply 0 0
thiagoralves
Jessie is quite old (was released in 2015). You’ll have better luck on stretch or buster.
Reply 0 0
jordi2219
I think my mistake is in the memory, I have 4GB and the image of "Stretch" already occupies that.
What solution can I take? Is it feasible to install OpenPLC on a pendrive? How can I do it?
Thank you very much in advance.
Greetings.
Reply 0 0
agro0305
I have problem installing OPenPLC on Revpi Core 3, with 4GB of RAM memory. there is nout enough space. Is there any solution for this problem.
Thatnk in advance
Reply 0 0
thiagoralves
Start with a fresh image to make sure you have the maximum amount of free space possible. Then, git clone openplc runtime code:
git clone https://github.com/thiagoralves/OpenPLC_v3.git

Then edit the background_installer.sh script to remove the creation of the swap file for DNP3 compilation. This will reduce the disk space required significantly, and might be enough to install on the Revpi. To remove the swap file, comment lines 82-85:
    #echo "creating swapfile..."
    #$1 dd if=/dev/zero of=swapfile bs=1M count=1000
    #$1 mkswap swapfile
    #$1 swapon swapfile

and 95-97:
    #echo "removing swapfile..."
    #$1 swapoff swapfile
    #$1 rm -f ./swapfile
Reply 0 0
agro0305
Thanks Thiago. i will try.
Reply 0 0
agro0305
It works. It was compiled
I will upgrade to buster and try on same way withou swap file
Thank You very much.
Reply 0 0
agro0305
Cant acces web server on port 8080.
. Recompiling again.
Reply 0 0
agro0305
Just installed and compiled on Buster. It works. I can access web site.

I will try tomorrow other things.
Reply 0 0
agro0305
Hi ,
blank.txt driver is not working in my cae. Here is log file. Everything was done, as per @thiagoralves  instructions.

Here is log file from dashboard


OpenPLC Runtime starting...
RevPi: Searching for I/O...
RevPi Error: I/O configuration file not found! Please use Pictory to generate a configuration file.
RevPi: Done!

RevPi Digital Inputs

RevPi Digital Outputs

RevPi Analog Inputs

RevPi Analog Outputs

Skipping configuration of Slave Devices (mbconfig.cfg file not found)
Interactive Server: Listening on port 43628
Warning: Persistent Storage file not found
Issued start_modbus() command to start on port: 502
Server: Listening on port 502
Server: waiting for new client...
Issued start_dnp3() command to start on port: 20000
DNP3 ID manager: Starting thread (0)
DNP3 ID DNP3_Server: Listening on: 0.0.0.0:20000
Issued start_modbus() command to start on port: 502
Modbus server already active. Restarting on port: 502
Server: Error accepting client!
Terminating Server thread
Modbus server was stopped
Server: Listening on port 502
Server: waiting for new client...
Issued start_dnp3() command to start on port: 20000
DNP3 server already active. Restarting on port: 20000
DNP3 ID DNP3_Server: Operation aborted.
DNP3 ID manager: Exiting thread (0)
DNP3 server was stopped
DNP3 ID manager: Starting thread (0)
DNP3 ID DNP3_Server: Listening on: 0.0.0.0:20000
Issued start_enip() command to start on port: 44818
Server: Listening on port 44818
Server: waiting for new client...
Issued stop_pstorage() command
Issued start_modbus() command to start on port: 502
Modbus server already active. Restarting on port: 502
Server: Error accepting client!
Terminating Server thread
Modbus server was stopped
Server: Listening on port 502
Server: waiting for new client...
Issued start_dnp3() command to start on port: 20000
DNP3 server already active. Restarting on port: 20000
DNP3 ID DNP3_Server: Operation aborted.
DNP3 ID manager: Exiting thread (0)
DNP3 server was stopped
DNP3 ID manager: Starting thread (0)
DNP3 ID DNP3_Server: Listening on: 0.0.0.0:20000
Issued start_enip() command to start on port: 44818
EtherNet/IP server already active. Restarting on port: 44818
Server: Error accepting client!
Terminating Server thread
EtherNet/IP server was stopped
Server: Listening on port 44818
Server: waiting for new client...
Issued stop_pstorage() command

Please help.
Reply 0 0
thiagoralves
agro0305 wrote:

RevPi Error: I/O configuration file not found! Please use Pictory to generate a configuration file.

Did you use Pictory to generate a configuration file?
Reply 0 0
agro0305
Yes. Export configuration file, per instruction. But it said , there is no config file. You can see it from pictures.
Reply 0 0
thiagoralves
Maybe they've changed the location where the file is stored, so OpenPLC can't find it anymore. I'll have to check this
Reply 0 0
thiagoralves
The driver looks for the configuration file at /var/www/pictory/export/ _temp.global
Maybe if you export the file to that location it might just work.
Reply 0 0
agro0305
File _temp.global is in directory   /var/www/revpi/pictory/export

As You can see from attached picture

There is no directory /var/www/pictory/export/ on my Revolution Pi

Any other idea ?
Reply 0 0
thiagoralves
agro0305 wrote:

Any other idea ?

Two options: either change the blank.cpp driver to point to the correct path or create /var/www/pictory/export folder and place the file in there.
Reply 0 0
Reply