Hi, In my application in Codesys I have to high % CPU - about 60%. What can I do to decrease usage CPU ?
My project is not big - look in atatchement. what can generate high CPU load?
Depend on your application - usually the KBUS updates take a lot of time -
so if possible from application side an slower task and use only KBUS IO's in this slow task -
might improve it.
But as I said, this depends on your application needs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have three tasks:
-MainTask - 200ms
-rfid_task - 10ms
-task_50ms - 50ms
In this application:
-communicate with 8 modbus slaves by embeded COM port,
-communicate with 8 modbus slaves by gate (Modbus TCP - RTU.)
-I use about 60 psyhical IO,
-I sending a lot of SMS.
-I share variables by Symbol Configuration Object to HMI Weintek
My wago: 750-8207,
I wonder why in Device -> Bus cycle task I have "unspecyfied"? Is it OK ?
Last edit: damian177 2022-02-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please find in attachement. Oryginally I have only one Ethernet devices. Now, can I do two devices "Ethernet" and "Ethernet_f" with the same adress ip my PFC200 controller ? In this way devices under "Ethernet" will be with 200ms cycle time , and devices under "Ethernet_f" will be scanned with 10ms ?
Configuration like in attachements ,should I sense?
@eschwellinger can you give me base hints what can I do to optimize my project ?
For examle in my FB to send sms my input value is " message:STRING " and all the calls to that FB have :
first of all you need to check which of your tasks, is the one which loads the PFC that much.
So check in the online task monitor / cycle times versus average cycle times.
Next step might be make theses (task) cycles slower and check in the plcshell - > plcload
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please find in attachement - I attached screen with online monitor.
Actually I have three task like this:
MainTask - cyclic - 200ms
rfid_task - cyclic - 10ms
task_50ms - cyclic - 50 ms,
?
Hi, In my application in Codesys I have to high % CPU - about 60%. What can I do to decrease usage CPU ?
My project is not big - look in atatchement. what can generate high CPU load?
Last edit: damian177 2022-02-07
can code optimization help?
Depend on your application - usually the KBUS updates take a lot of time -
so if possible from application side an slower task and use only KBUS IO's in this slow task -
might improve it.
But as I said, this depends on your application needs.
Probably I have bad cycles settings. Not optimated to my application. I prepared cycles settings to my device like in atatchement .
@eschwellinger what do you think about this ?
So I don't understand what will be cycle time Pfc200bus ? you can explain it to me?
Last edit: damian177 2022-02-07
you have only 2 Tasks? one with 200ms and one with 10ms(RfI Task)?
PFC is first generation or second generation? (750-82xx or 750-821x)
I have three tasks:
-MainTask - 200ms
-rfid_task - 10ms
-task_50ms - 50ms
In this application:
-communicate with 8 modbus slaves by embeded COM port,
-communicate with 8 modbus slaves by gate (Modbus TCP - RTU.)
-I use about 60 psyhical IO,
-I sending a lot of SMS.
-I share variables by Symbol Configuration Object to HMI Weintek
My wago: 750-8207,
I wonder why in Device -> Bus cycle task I have "unspecyfied"? Is it OK ?
Last edit: damian177 2022-02-07
It is ok, depends in which tasks you are referencing the Io's.
750-8217 would give you around 20% more performance.
Please find in attachement. Oryginally I have only one Ethernet devices. Now, can I do two devices "Ethernet" and "Ethernet_f" with the same adress ip my PFC200 controller ? In this way devices under "Ethernet" will be with 200ms cycle time , and devices under "Ethernet_f" will be scanned with 10ms ?
Configuration like in attachements ,should I sense?
Last edit: damian177 2022-02-07
@eschwellinger can you give me base hints what can I do to optimize my project ?
For examle in my FB to send sms my input value is " message:STRING " and all the calls to that FB have :
msg2send(..., message:='ewfdewfdewfdewfewfewfewfewfewfewfewfewfewfewf' , ....... );
May by all text I should keep in Structure ? not in main program ? and calls will be:
msg2send(..., message:=variable_with_text1 , ....... );
It can help to decrease % CPU ?
first of all you need to check which of your tasks, is the one which loads the PFC that much.
So check in the online task monitor / cycle times versus average cycle times.
Next step might be make theses (task) cycles slower and check in the plcshell - > plcload
Please find in attachement - I attached screen with online monitor.
Actually I have three task like this:
MainTask - cyclic - 200ms
rfid_task - cyclic - 10ms
task_50ms - cyclic - 50 ms,
?
reset, the measurement by rightclick on the line - reset ( for each line)
I did reset before, anyway in attachment I send screen counters, captured a few seconds after reset