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

RPi Project crashing

bernie-bbq
2021-08-16
2021-08-19
  • bernie-bbq - 2021-08-16

    Hi, I have a large project with over 30 timers, 16 POUs, 12 Modbus Variables (some 32 bit float) a RTC ticking over continuously blah blah ... it runs well but occasionally strange webClient errors occur which may require the RPI 2 to be depowered and restarted, although some faults can be cleared with a soft re-boot. I suspect that the various processes do not always get completed in the required time. Speed of operation is not important, just stability. I have tried extending the task cycle Intervals but this does not fix the problem. The errors all occur when running the webClient APIs. I have made substantial gains with these by separating the Start and Reset inputs, pulsing these to TRUE then back to FALSE after each use and by using 10mSec pulses rather than rising edges (yes that makes a big difference to the reliability) and by inserting time delays between sequential API requests. Is there a list of things I can do to gain stability on a system which only needs to make a decision every 3 minutes?

    Regards

    Bernie_BBQ

     
  • bernie-bbq - 2021-08-19

    Problem Fixed!

    Yes my code was dreadful & I have have a much better MarkII version. That said the problem remained. But then I noticed another error code; the webClient 'xError' which read 'tcp_init_error'. (See below) This led to an online search where I found the CODESYS 'Bug Fix' shown below. All I needed to do was to change my wrbClient FB to one with the 'xCloseConnection'input and then change the 'FALSE' to "TRUE' for that input. So far it is now running error free.

    Bernie_BBQ

     

Log in to post a comment.