Login Page - Create Account

Support Board


Date/Time: Sun, 22 Feb 2026 00:44:56 +0000



Post From: OS Timers vs SC Timers discussion again... SC Timers chart update limitations

[2026-01-28 13:41:34]
@sstfrederik - Posts: 412
Great work on the timers.

I am trying to see proof of custom study execution at the set chartupdate interval when UpdateAlways = 1.

running SC version 2870. One chart, one custom study, code posted below.

Chartupdate interval set at: 20ms. Minimum chartupdate interval in ms for ACSIL updatewalways: 20ms.

Using SC timers. Timer management enabled. max delays 20ms. min delay 10ms.

The custom study simply prints a line at every calculation. Not sure why the log isn't showing more output based on custom study calculations. Output is shown at ~200ms with regular occasions of ~500ms calculation intervals.

What am I missing? Seems like the study calculations are not following the chartupdate and update always settings. With some of my work this will be a limitation for real-time applications. A custom study can't pick up any real-time data from other custom threads within 20ms if there is a 200ms gap. I see the same ~200-500ms gap on that custom work.

Thanks for your time to look into this.


SCSFExport scsf_SST_TestFunction(SCStudyGraphRef sc)
{
  
    
  if (sc.SetDefaults)
  {
  
    // Set the study configuration and defaults.
    sc.StudyDescription = "Test";
    sc.GraphName = "Test";
    sc.AutoLoop = 0;        
    sc.UpdateAlways = 1;
    return;
  }
    
  int& counter = sc.GetPersistentInt(1);
  
  // Data processing
  if(sc.IsFullRecalculation){
    counter = 0;
    return;
  }
  
  //push message to log to see update interval
  SCString updateIntervalMsg;
  updateIntervalMsg.Format("Update interval counter is %d", counter);
  sc.AddMessageToLog(updateIntervalMsg, 1);
  counter++;
}