<< Click to Display Table of Contents >> Navigation: 3. Script Language > Date and Time Calculation > TCA. - Time Calculation > TCA.Overflow |
MiniRobotLanguage (MRL)
TCA.Overflow - Command
Calculate Numbers Overflow
Intention
Using TCA.Overflow you can calculate an numeric Overflow.
Question:
What time is it in 81 Hours, if its 12:00 now?
' This is the Time (21:00) and the hours we want go into the future (81)
CAL.$$LAB=81+21
' This is the Overflow Number, its 23 for hours
$$LAC=23
$$MSG=Teste TCA.Ovl 2
TCA.Ovl|$$LAB|$$LAC|$$LAD
' Result is "10"
DBP.$$LAD
ENR.
' This is the current Minutes (:22) and the Minutes we
' want go into the future (281)
CAL.$$LAB=281+22
' This is the Overflow Number, its 59 for Minutes
$$LAC=59
TCA.Ovl|$$LAB|$$LAC|$$LAD
' Result is "08"
DBP.$$LAD
ENR.
Syntax
TCA.Overflow|P1|P2[|P3]
Parameter Explanation
P1 - Numeric value (Integer)
P2 - Overflow Value (Integer)
P3 - Variable for Result. I omitted, the Result is placed on TOS.
Example
'**********************************************
' TCA.Overflow - Sample with Rollover
' If the given values are too high, the command will autoamtically
' Roll over to the next allowed Timestamp.
'**********************************************
'
$$LAF=
$$LAB=24
$$LAC=69
$$LAD=81
$$LAE=999
$$MSG=Teste TCA.Overflow
TCA.Overflow|$$LAF|$$LAB|$$LAC|$$LAD|$$LAE
$$ERG=01:10:21.999
JIS.$$LAF!$$ERG|Lab_failed
Remarks
-
Limitations:
-
See also:
• DAT. - Date and Time Information (System independent)
• DTC. - Date and Time Calculation
• IDC. / NDC. - If Date Command
• CAL. - mathematical CALculation