Converting Word (Signed), Double Word (Signed) Type To String Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Converting word (signed), double word (signed) type to string
type
INT_TO_STR(_E), DINT_TO_STR(_E)
High
Basic
Process
performance
Structured ladder/FBD
INT_TO_STR_E
EN
ENO
s
The following function(s) can go in the dotted squares.
INT_TO_STR, INT_TO_STR_E, DINT_TO_STR, DINT_TO_STR_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• INT_TO_STR, INT_TO_STR_E
Converts word (signed) type data input to (s) into string type data, and outputs the operation result from (d).
s
Word (signed) type
When SM701 (signal for switching the number of output characters) is OFF,
"00
" is stored.
H
'20H (space)' is stored in 'Sign data' when the input value is positive; '2DH (-)' is stored when negative.
If the number of significant figures is less, '20H (space)' is stored to high-order digits.
Ex.
Inputting -123
s
-123
Word (signed) type
When SM701 (signal for switching the number of output characters) is OFF, "00H" is stored to the end of the character string.
5 APPLICATION FUNCTIONS
42
5.1 Type Conversion Functions
LCPU
Redundant Universal
ST
ENO:=
INT_TO_STR_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s(_INT, _DINT)
Input
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
d
High-order byte
ASCII code of ten-thousands place
ASCII code of hundreds place ASCII code of thousands place
ASCII code of units place ASCII code of tens place
00
H
d
High-order byte
20
(space)
H
31
(1)
H
33
( 3 )
H
00
(EN, s, d);
Low-order byte
Sign data
Low-order byte
2D
(-)
H
20
(space)
H
32
(2)
H
H
Data type
Bit
Word (signed), double word (signed)
Bit
String(6)/(11)
String 1st word
2nd word
3rd word
4th word
String 1st word
2nd word
3rd word
4th word

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents