I have extensively searched these forums on this topic and have found some useful information but not the answer to my questions. I hope someone can help me as I am now at a loss as to what I can do.
Summary of My Application
I am running one single PLC_PRG Task set at 200ms.
I am using the web-client library and FB to poll a web API which returns a string of 20,000 characters long.
Within this string is all information on devices I need for my application. The string functionality within IEC61131-3 does not allow me to search through something as big as 20,000 long (String search is limited to 250 character's)
I therefore convert this large string to a Byte array. This now creates something I can use to search for my devices.
All the above works fine but below is where I have the problem.
Each new device I add to my application requires me to add a new FOR Loop to find the device (I instantiate an FB with the FOR Loop for each new device). My For Loop (1 to 20,000) loops through each element of the converted byte array until I find the start of the device string , I then use the string functions to find exactly what I need. It all works perfectly.
My problem is, I am adding more and more devices which requires me to add more FOR Loops that is putting the processor under a lot of pressure and hence causing the watchdog error:
Of course when I get this Exception my PLC stops so I now cannot add any more FOR Loops to my application.
Maybe the answer is to use something other than a Pi to handle this kind of application but I am trying to understand if I can disable this watchdog dog or modify the CODESYSControl.cfg to increase the maxupload (ie >100).
Any help would be much appreciated.
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
and I hope you are using the stringutils.library to work with the strings...basically there is no 255 char limitation and execute your timeconsuming part not
in the highest prio Task then it should not occure (plcload exception)
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello All,
I have extensively searched these forums on this topic and have found some useful information but not the answer to my questions. I hope someone can help me as I am now at a loss as to what I can do.
Summary of My Application
I am running one single PLC_PRG Task set at 200ms.
I am using the web-client library and FB to poll a web API which returns a string of 20,000 characters long.
Within this string is all information on devices I need for my application. The string functionality within IEC61131-3 does not allow me to search through something as big as 20,000 long (String search is limited to 250 character's)
I therefore convert this large string to a Byte array. This now creates something I can use to search for my devices.
All the above works fine but below is where I have the problem.
Each new device I add to my application requires me to add a new FOR Loop to find the device (I instantiate an FB with the FOR Loop for each new device). My For Loop (1 to 20,000) loops through each element of the converted byte array until I find the start of the device string , I then use the string functions to find exactly what I need. It all works perfectly.
My problem is, I am adding more and more devices which requires me to add more FOR Loops that is putting the processor under a lot of pressure and hence causing the watchdog error:
EXCEPTION [ProcessorLoadWatchdog] occurred in: App=[all], Task=[all]Processorload watchdog: plcload=100, maxupload=95
Of course when I get this Exception my PLC stops so I now cannot add any more FOR Loops to my application.
Maybe the answer is to use something other than a Pi to handle this kind of application but I am trying to understand if I can disable this watchdog dog or modify the CODESYSControl.cfg to increase the maxupload (ie >100).
Any help would be much appreciated.
Thanks in advance.
Hi,
did you try to Change this here in the CODESYSControl.cfg?
Set to 0 or 100
[CmpSchedule]
ProcessorLoad.Enable=1
ProcessorLoad.Maximum=95
ProcessorLoad.Interval=5000
and I hope you are using the stringutils.library to work with the strings...basically there is no 255 char limitation and execute your timeconsuming part not
in the highest prio Task then it should not occure (plcload exception)
BR
Edwin