Converting Time Type To String Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Converting time type to string type

TIME_TO_STR(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
TIME_TO_STR_E
EN
ENO
s
d
The following function(s) can go in the dotted squares.
TIME_TO_STR, TIME_TO_STR_E
■Argument
Input/output
Name
argument
Input argument
EN
s(_BCD)
Output argument
ENO
d
Processing details
■Operation processing
• Converts time type data input to (s) into string type data, and outputs the operation result from (d).
s
T#20m34s567ms
Time type
s
T#-20m34s567ms
Time type
• When SM701 (signal for switching the number of output characters) is OFF, "00H" is stored to the end of the character
string.
• The operation results stored to (d) are as follows.
For the first character, 20H (space) is stored if the BIN data is positive, and 2DH (-) is stored if it is negative.
20H (space) is stored to the left of significant figures.
■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
LCPU
ST
ENO:=
(EN, s, d);
TIME_TO_STR_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input
Execution result (TRUE: Normal, FALSE: Error)
Output
d
"
1234567"
String type
d
"-
1234567"
String type
ENO
TRUE
*1
FALSE
Data type
Bit
Time
Bit
String (11)
(d)
Operation output value
Undefined value
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
105

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents