CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Wed Nov 21, 2018 6:47 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Jan 02, 2018 5:20 pm 
Offline

Joined: Fri Dec 20, 2013 8:40 pm
Posts: 12
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

1. I am running one single PLC_PRG Task set at 200ms.

2. I am using the web-client library and FB to poll a web API which returns a string of 20,000 characters long.

3. 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)

4. 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.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Sat Jan 06, 2018 8:31 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2965
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited