25 TYPE CONVERSION FUNCTIONS
25.52 Converting TIME to STRING
1865
25
25.52 Converting TIME to STRING
TIME_TO_STRING(_E)
These functions convert a value from TIME data type to STRING data type.
■Description, type, data type
■Operation processing
• These functions convert the value input to (s) from TIME data type to STRING data type, and output the converted value
from (d).
• Input a TIME data type value to (s).
• When SM701 (Number of output characters selection) is off, 00H is stored at the end of the string.
• The operation result will be as follows.
Ladder, FBD/LD Structured text
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
d:=TIME_TO_STRING(s);
[With EN/ENO]
d:=TIME_TO_STRING_E(EN,ENO,s);
Argument Description Type Data type
EN Execution condition (TRUE: Executed, FALSE: Not executed) Input variable BOOL
s (IN) Input Input variable TIME
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable STRING
STRING(11)
• As the first character, 20H (space) is stored if the output value is positive, and 2DH (-) is stored if the output value is negative.
• At the left of the number of significant digits, 20H (space) is stored.
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)
EN ENO
ds
1234567
(s)
(d)
T#20m34s567ms
STRINGTIME
- 1234567
(s)
(d)
T#-20m34s567ms
STRINGTIME