Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Task Manager - Task information
#1
In the ide task manager in the "Tasks" tab
It shows various interrupt periods (Phase / Servo / Real Time) , and Task info (Background / EtherCat) , along with real-time / scheduled and individual cpu information.

Is there a way to query or calculate this information with a normal ssh connection?

Like the Task-Manager plcs tab you can gather everything thought the Plc[x] struct, im not finding anything similar for cpu or tasks


Thanks!
Reply
#2
That information is mostly calculated by the IDE from Sys. variables within PMAC.

The following Delta Time variables can be used to calculate instantaneous frequencies. Phase Also has a min and max (which the user can reset).
Code:
Sys.PhaseDeltaTime
Sys.ServoDeltaTime
Sys.RtIntDeltaTime
Sys.BgDeltaTime

Sys.MinPhaseDeltaTime
Sys.MaxPhaseDeltaTime

Then there are also time variables that show how long each task takes to finish execution once started. Each of these time variables also has filtered, minimum and maximum values.
Code:
Sys.PhaseTime
Sys.ServoTime
Sys.RtIntTime
Sys.BgTime

For Each:
Sys.FltrServoTime
Sys.MinServoTime
Sys.MaxServoTime

These can contain time from higher priority interrupts, which would need to be subtracted out to find CPU usage. If you look at Sys.FltrRtIntTime and Sys.RtIntTime in the SRM, you will find equations for filtered and instantaneous task times. For the filtered version, you can also filter the Delta Time with your own code if desired.

ECAT task time comes from the following ECAT[0]. variables. Both also have a max value. ECAT[0].ServoExtension can be used with Sys.ServoDeltaTime to find an instantaneous frequency.
Code:
ECAT[0].RxTime
ECAT[0].TxTime
ECAT[0].MaxRxTime
ECAT[0].MaxTxTime
ECAT[0].ServoExtension
EcatTaskLoad = 100*(ECAT[0].RxTime+ECAT[0].TxTime)/(Sys.ServoDeltaTime*(1+ECAT[0].ServoExtension))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)