From OpenSCADAWiki
Jump to: navigation, search

The second method is based on absolute time, that is the comparison with the current time is made in the cycle, for example, in OpenSCADA it is implemented as follows:

if(SYS.time() > tm_to)
{ 
    tm_to = SYS.time()+10; //Setting the waiting threshold for 10 seconds more than the current time
    //Other actions with the periodicity of 10 seconds
}