Regarding timing the chart ‘scan rate’.
I offer the following code (not mine, but it works great).
Drop the code into a block that gets run once per loop of the chart.
(eg, an OptoScript block at the start or end of the main loop you want to time).
//the chart has run through once, so stop the timer
PauseTimer(chart_loop_time);
//keep track of how many times this chart has run through
IncrementVariable(chart_cycle_number);
//keep track of how much time in total this chart has been running
chart_cycle_time_total = chart_cycle_time_total + (1.0 - chart_loop_time);
//display how long in Msec this chart takes to run
chart_cycle_time = chart_cycle_time_total/chart_cycle_number;
//load 1 second back into the timer (assumes the chart will loop in under a second).
chart_loop_time = 1.0;