|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: realtime runtime code throughput margin monitoring
Quote:
|
|
#2
|
|||
|
|||
|
Re: realtime runtime code throughput margin monitoring
The LV template project contains a folder called Support Code. In it is a VI called Elapsed TImes.vi. Placing it into any loop or recurring code will result in a table of elapsed times being updated to calculate and show the period of the calls. The easiest way to view the times is to open the Elapsed Times panel. This is typically used for debugging and later deleted, but could be transmitted back to dashboard if a team wanted. I have no idea how many times it was used.
Greg McKaskle |
|
#3
|
||||
|
||||
|
Re: realtime runtime code throughput margin monitoring
Quote:
|
|
#4
|
|||||
|
|||||
|
Re: realtime runtime code throughput margin monitoring
Quote:
The biggest cause of CPU usage while not permanently deployed seems to be updating VI front panels. If you have enough inclusions of Elapsed Times, it seems to update the front panel array every time it changes (Every tick of every loop). If you create a slower loop somewhere (we ran ours at 75ms I think) to read the array of times from Elapsed Times, it is significantly less CPU hungry than simply opening Elapsed Times. We used the same loop to read the CPU load cluster and print it to the same debug screen, and that information (CPU usage by thread priority) was also extremely useful. It was a very useful VI. We had it in about 10 or so tasks. |
|
#5
|
|||
|
|||
|
Re: realtime runtime code throughput margin monitoring
Quote:
Thanks. Greg McKaskle |
|
#6
|
|||||
|
|||||
|
Re: realtime runtime code throughput margin monitoring
Quote:
Thankfully, it was never necessary to actively monitor these, although having software do it is a good idea for next year. |
|
#7
|
||||
|
||||
|
Re: realtime runtime code throughput margin monitoring
Quote:
|
|
#8
|
|||||
|
|||||
|
Re: realtime runtime code throughput margin monitoring
Not all that often (I don't remember, but maybe ~200 ms). Which, of course, now that I think about it, doesn't really help catch situations like you're thinking of... Anyway, it's a good idea to implement next year.
|
|
#9
|
|||
|
|||
|
Re: realtime runtime code throughput margin monitoring
I don't have an overhead number, but I have seen it raise the CPU. The code is in about six loops in the Driver Station and I saw no need to delete it. I decided not to leave it in the default robot code loops and chose to let teams do it for themselves. I hope to get around to adding some high-water mark and stats to it and perhaps I can find a way to leave it in all loops. Time will tell.
Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|