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

PLC Project CPU @ 99%

Araforn
2018-02-28
2018-03-01
  • Araforn - 2018-02-28

    Hi All/Edwin,

    I'm working on a Home automation control project and have started to notice considerable slowdown, specifically when I view trends which are monitoring 9 variables at the moment.

    Looking at direct monitoring side by side on the PI and in codesys Runtime you can see the high CPU usage on this screen. It result in up to 5 seconds delay when updating.
    This is confirmed by checking the shell command for PLC Load. Also pictured below.

    Is my application getting too big for the Pi or is there something I can do to improve this?. I notice Codesys is using only 1 core. Is it possible to use more?. Would overclocking help?. Just want to look at all options before updating hardware.

    Thanks in advance.

    IMG: PLC Load High.PNG

    IMG: High CPU Usage.PNG

     
  • eschwellinger

    eschwellinger - 2018-03-01

    Hi,
    on which Pi is this running?
    PIB, PIB+ , P2 or PI3?

    Think I need the project to check details.

    BR
    Edwin

     
  • Araforn - 2018-03-01

    Edwin Schwellinger hat geschrieben:
    Hi,
    on which Pi is this running?
    PIB, PIB+ , P2 or PI3?
    Think I need the project to check details.
    BR
    Edwin

    Thanks for the reply Edwin. Its a RPi3.

    I have checked some more and can see the cycle time was taking much longer when I open the trend screen.
    I found the issue after this where i had set the MAIN task to freewheeling for some tests but never changed it back to cyclic.

    Performance is much improved now after changing back to cyclic however CPU is high still on the PI when I enter the Trend screen. See below.
    PLC Load average is low though as this screen is only accessed on occasion. Any clear explanation why freewheeing would cause the original issue?.

    IMG: Less CPU Usage After changing from freewheeling to cyclic.PNG

     

Log in to post a comment.