Download Print this page

Converting Dint To String - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

18.32

Converting DINT to STRING

DINT_TO_STRING(_E)
These functions convert DINT type data to STRING type data.
Ladder diagram, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s(IN)
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d(DINT_TO_STRING(_E))
Output
Processing details
■Operation processing
• These functions convert the DINT type data input to (s) to STRING type data and output from (d).
(s)
ASCII code for hundred-thousands place
DINT
(1): "00H" is stored when "SM701" (output character number selector) is off.
• A value input to (s) is the DINT type data value.
• In "Sign data", 20H (space) is stored when the input value is positive, and 2DH (-) is stored when the input value is
negative.
• 20H (space) is stored in high-order digits when the number of significant figures is small.
Ex.
When "-123456" is input
(s)
-123456
DINT
• 00H is stored at the end (high-order byte of the 6th word) of the character string when SM701 (output character number
selector signal) is off.
[With EN/ENO]
EN
ENO
s
d
High-order byte
ASCII code for billions place
ASCII code for ten-millions place
ASCII code for thousands place
ASCII code for tens place
00H
(1)
High-order byte
20H (SP)
20H (SP)
31H (1)
33H (3)
35H (5)
00H
Structured text
[Without EN/ENO]
d:=DINT_TO_STRING(s);
[With EN/ENO]
d:=DINT_TO_STRING_E(EN,ENO,s);
Type
Input variable
Input variable
Output variable
Output variable
(d)
Low-order byte
Sign data
ASCII code for hundred-millions place
ASCII code for millions place
ASCII code for ten-thousands place
ASCII code for hundreds place
ASCII code for ones place
(d)
Low-order byte
20H (SP)
20H (SP)
18 TYPE CONVERSION FUNCTIONS
18.32 Converting DINT to STRING
Data type
BOOL
DINT
BOOL
STRING(11)
2DH (-)
32H (2)
34H (4)
36H (6)
18
+0
+1
+2
+3
+4
+5
+0
+1
+2
+3
+4
+5
937

Hide quick links:

Advertisement

loading