Restart CODESYS runtime

swa
2015-07-09
2015-07-12
  • swa - 2015-07-09

    Hi!
    I'm testing a lot of different things with the pi and CODESYS and sometimes the pi (or the CODESYS runtime) crashes. So my question is if I can just restart the CODESYS part without rebooting the pi.

    I'm also wondering if it is possible to stop a running task from the pi command line, if it has lost connection to CODESYS.

    And one last question, is there a setting to not have a boot application? It's a little bit annoying to crash and reboot to a crashing app.

    BR
    Simon

     
  • eschwellinger

    eschwellinger - 2015-07-09

    Hi Simon,
    you could use:

    sudo service codesyscontrol stop
    sudo service codesyscontrol start
    

    to stop and start the plc

    The default is to generate a bootproject but you could change this in your project under
    application ->properties-> boot application

    BR
    Edwin

    IMG: CreateBootprojectSetting.jpg

     
  • swa - 2015-07-09

    Thanks Edwin!

     
  • murdemon - 2015-07-12

    This one help me ... it as old car don't startup from first time (with segmetation fault, but start from second one

    add file /usr/bin/wdt.sh
    #!/bin/sh
    while true
    do
    sleep 5
    RESULT=pgrep codesyscontrol
    if [ "${RESULT:-null}" = null ]; then
    /etc/init.d/codesyscontrol start
    echo "start codesys"
    fi
    sleep 5
    done

    and add in /etc/init.d/rc.local
    before return line in do_start func
    /usr/bin/wdt.sh &

    Now it is work .. starting if not from first time (with segmentation fault) from second one for sure..

     

Log in to post a comment.