FUNCTION_BLOCK E_CHRON

Hover on a highlighted element
to see its description.

ECC
ALGORITHM START IN Java :
   T0.value = System.nanoTime();
   ET.value = 0;
   Q.value = true;
END_ALGORITHM

ALGORITHM STOP IN Java :
   Q.value = false;
END_ALGORITHM

ALGORITHM REQ IN Java :
if (Q.value)
  ET.value = (System.nanoTime()
               - T0.value + 500) / 1000;
END_ALGORITHM

An instance of this Function Block type provides an elapsed time (chronometer) function. Its operation is defined by the Execution Control Chart (ECC) and algorithms shown above.