amoser
I am trying to get the remaining_time as a variable out of the TON timer. From my understanding, ET is the time passed. Subtracting ET from the variable I connect to IN should give me remaining_time.
 
From my understanding, this does not work. Neither by using SUB (TIME:IN1, TIME:IN2 => TIME😮UT) nor converting the TIME_TO_INT, using the arithmetic SUB and then passing back to TIME.
 
What am I doing wrong?
 
Screenshot 2023-09-14 164748.png
Reply 0 0
thiagoralves
Reply 0 0
amoser
That's what I understood. That is why I try to subtract PT - ET to get remaining time. 
Reply 0 0
thiagoralves
That's right... I misread your first message, sorry! This should work. Are you getting any compilation errors? Just keep in mind that when you convert TIME to INT, conversion takes only the seconds part. If you want milliseconds then you will have to convert TIME to REAL, multiply by 1000.0 (seconds to milliseconds), and then convert the result to INT.
Reply 1 0
Reply