{}

Our Brands

Welcome to the Schneider Electric Website

Welcome to our website.
Search FAQs
Can we see how much CPU load is there on M241/M251/M262?
Issue
Is there a way to see how much CPU processor load there is on Modicon M241/M251/M262 by way of a function returning a value?
How do you program this in a POU in EcoStruxure Machine Expert / SoMachine?

Product Line
EcoStruxure Machine Expert, Modicon M241, M251, M262 PLCs

Environment
Programming Technique in EcoStruxure Machine Expert

Resolution
Yes, there is a way to return the CPU processor load using a Library called CmpSchedule.

In the Libraries->Add Library dialog, you will find it under Company->System under System->SysLibs:


The function in the library that returns processor load is SchedGetProcessorLoad:


An example of the program is as follows in Structured Text:

Declaration:
VAR
    pResult1       : RTS_IEC_RESULT;    //required pointer to the internal data location type (variable name is arbitrary)
    processorLoad  : UDINT;             //CPU load percentage
END_VAR


Code:
processorLoad := SchedGetProcessorLoad(pResult:=ADR(pResult1));


Note:
  • The value returned in "processorLoad" in his example is  is a percentage (in UDINT format).
  • It is recommended that processorLoad should remain lower than 70% (the lower the better). If this is not the case, then increase cycle times.

Schneider Electric Malaysia

Can we see how much CPU load is there on M241/M251/M262?
Issue
Is there a way to see how much CPU processor load there is on Modicon M241/M251/M262 by way of a function returning a value?
How do you program this in a POU in EcoStruxure Machine Expert / SoMachine?

Product Line
EcoStruxure Machine Expert, Modicon M241, M251, M262 PLCs

Environment
Programming Technique in EcoStruxure Machine Expert

Resolution
Yes, there is a way to return the CPU processor load using a Library called CmpSchedule.

In the Libraries->Add Library dialog, you will find it under Company->System under System->SysLibs:


The function in the library that returns processor load is SchedGetProcessorLoad:


An example of the program is as follows in Structured Text:

Declaration:
VAR
    pResult1       : RTS_IEC_RESULT;    //required pointer to the internal data location type (variable name is arbitrary)
    processorLoad  : UDINT;             //CPU load percentage
END_VAR


Code:
processorLoad := SchedGetProcessorLoad(pResult:=ADR(pResult1));


Note:
  • The value returned in "processorLoad" in his example is  is a percentage (in UDINT format).
  • It is recommended that processorLoad should remain lower than 70% (the lower the better). If this is not the case, then increase cycle times.

Schneider Electric Malaysia

Explore more
Range:
Explore more
Range:
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range:
Explore more
Range:
move-arrow-top
Your browser is out of date and has known security issues.

It also may not display all features of this website or other websites.

Please upgrade your browser to access all of the features of this website.

Latest version for Google Chrome, Mozilla Firefox or Microsoft Edgeis recommended for optimal functionality.
Your browser is out of date and has known security issues.

It also may not display all features of this website or other websites.

Please upgrade your browser to access all of the features of this website.

Latest version for Google Chrome, Mozilla Firefox or Microsoft Edgeis recommended for optimal functionality.