Scan classes and gateway scriptcs - time precision

Greetings,

I have scan-class and gateway scripts-related question. With scan class, we can set how often it is going to run. The same we can do with gateway scripts (e.g. run every 10 seconds). I just wanted to ask how precise is this definition? In other words, how precise is Ignition in terms of keeping the time period precise? Are we sure that the time-span between these scheduled events is always 10.00 seconds or the time-span will be more like 9.5 seconds, 10.3 seconds, 11.0 seconds, 8.9 seconds … etc.

Thank you for sharing your expertise and opinions.

Take care,
SZ

If you’re talking about gateway timer scripts, then Fixed Delay vs Fixed Rate will have an effect on what you see.

10s Fixed Delay means it gets scheduled to run for +10s after the execution finishes.

10s Fixed Rate means it gets scheduled to run every 10s, and you need to be careful execution never takes longer than the rate or they will start to stack up.

The precision depends on your OS and how loaded your gateway is and whether or not a GC occurs. This isn’t a real-time environment so you should never expect something like every 10.00 seconds.

If you added a print statement with the time you’d probably see +/- 1ms during normal operation.

1 Like

Greetings Kevin,

thank you, that fully answers my questions.

Take care,
SZ