Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Update RPi Plc without Codesys Development System

VincentGC
2018-01-25
2018-04-15
  • VincentGC - 2018-01-25

    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

     
  • Anonymous - 2018-01-25

    Originally created by: Viacheslav Mezentsev

    Yes, it is possible. You need something like this:

    \#!/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).

     
  • eschwellinger

    eschwellinger - 2018-01-26

    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

     
  • VincentGC - 2018-02-16

    Hey,

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

    Vincent

     
  • pcpcdk - 2018-04-15

    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

    IMG: Create boot application.png

     

Log in to post a comment.