CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Wed Apr 24, 2019 6:53 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jan 25, 2018 6:25 pm 
Offline

Joined: Fri Jan 20, 2017 2:40 pm
Posts: 4
Hello,

I have several RPi running Codesys and I would like to know if I could update my PLC software (running with codesyscontrol service) without the Codesys Development System on my working station.
The idea is to run a shell script on the RPi that stop codesyscontrol, then it could copy some files to change the PLC software (or something else) and then restart codesyscontrol service.

Is it possible?

Best regards,

Vincent


Top
   
PostPosted: Thu Jan 25, 2018 7:20 pm 
Offline
User avatar

Joined: Fri Feb 10, 2017 6:12 am
Posts: 59
Yes, it is possible. You need something like this:

Code:
#!/bin/bash

CURRDIR=`dirname $0`

systemctl stop codesyscontrol

while kill -0 `pidof codesyscontrol` 2> /dev/null; do sleep 1; done

for dir in /var/opt/codesys//PlcLogic/*; do
    [ -z "${dir##*trend*}" ] && continue
    rm -rf "$dir"
done

if [ -f $CURRDIR/PlcLogic.zip ]; then unzip $CURRDIR/PlcLogic.zip -qo -d /var/opt/codesys; fi

sync

systemctl start codesyscontrol


PlcLogic.zip created manually using Codesys (save boot application).


Top
   
PostPosted: Fri Jan 26, 2018 2:00 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3254
Hi,
why not just use the official way to do this?

sudo dpkg -i codesyscontrol_arm_raspberry_V3.5.12.0.de

will update the plc runtime Version and bootprojekt runs imidiately in the new version... if already on the system running before the update
To update your application means-> update the content of /var/opt/codesys/PlcLogic/ (which are the application files)

BR
Edwin


Last edited by Edwin Schwellinger on Fri Feb 16, 2018 6:24 pm, edited 1 time in total.

Top
   
PostPosted: Fri Feb 16, 2018 6:10 pm 
Offline

Joined: Fri Jan 20, 2017 2:40 pm
Posts: 4
Hey,

Sorry for the delay and but thank you for your answer.
I will try it soon when I have the opportunity.

Vincent


Top
   
PostPosted: Sun Apr 15, 2018 4:06 pm 
Offline

Joined: Mon Sep 18, 2017 5:19 pm
Posts: 2
Hi Viacheslav

Nice Script, but how do you save the boot project as a PlcLogic.zip file.
I can only save the file as a Application.app file which I can not open as a zip-file ???
I am doing as discribed in the online help.

Best regards.

Peter


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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 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