SysMCGetLoad (FUN)

FUNCTION SysMCGetLoad : RTS_IEC_RESULT

OPTIONAL FUNCTION:
Function to get the current average workload of a dedicated core, identified by the input parameter.

Note

This function may not be supported by every operating system!

InOut:

Scope

Name

Type

Comment

Return

SysMCGetLoad

RTS_IEC_RESULT

Returns the result.
  • ERR_OK: Call was successful.

  • ERR_PARAMETER: Parameter is invalid, e.g. core does not exist.

  • ERR_NOTINITIALIZED: Function is not initialized.

  • ERR_NOBUFFER: Not enough memory for the performance counters

  • ERR_FAILED: Function failed for any reason on OS level.

  • ERR_NOTIMPLEMENTED: Function is not implemented.

Input

CoreID

UDINT

Identifies the core whose load has to be returned. Starting with 0=first core, … .. note:: If uCoreID=SYSMC_AVERAGE_LOAD, average CPU load over all cores in percent is returned!

pPercent

POINTER TO BYTE

CPU-Core load in percent.