// Index (0: main, 0..4: sub)
L W#16#2 // Cycle time value is 2 byte long (WORD)
*I
SLD 3 // Offset into address
+AR2 // Add to start address array
// -----------------------------------------------------------------------------
// Calculate cycle time and transfer value into HMI DB
L #TEMP_TIMER_CURRENT // Stop time (GLOBAL.INTERNAL.TIMER_VALUE)
L DBD [AR1,P#2.0] // Start time (SCREEN_CYCLETIMES.INTERNAL.TAKT[x].TIMER_START[INDEX])
-D
JPZ C003 // If difference >= 0 than no overflow
L DW#16#7FFFFFFF // Difference < 0: overflow: add max timer value to difference
+D
C003: L 100 // Cycle time is measured in 100 ms
/D
T DBW [AR2,P#0.0] // Transfer cycle time into HMI DB