EasyManuals Logo

Mitsubishi MELSEC iQ-F FX5 series User Manual

Mitsubishi MELSEC iQ-F FX5 series
888 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #282 background imageLoading...
Page #282 background image
280
6 BASIC INSTRUCTIONS
6.5 Data Conversion Instructions
Processing details
• These instructions convert the character string in the device numbers specified by (s) and later to 32-bit binary data, and
store the number of digits in the device specified by (d1) and the binary data in the device specified by (d2). When
converting a character string into binary data, the data from the device number specified by (s) to a device number storing
"00H" is handled as a character string.
• The total number of digits stored in (d1) is the total number of characters (including the sign and decimal point) representing
the numeric value. The number of digits in the decimal part stored in (d1)+1 is the number of characters representing the
decimal part after 2EH (.). The 32-bit binary data stored in (d2) is binary value converted from a character string with the
decimal point ignored.
Ex.
When the character string "-12345.678" (signed) is specified by (s) and later
• The total number of characters of the character string specified by (s) is 2 to 13 characters.
• In the character string specified by (s), the number of characters that form the decimal part is 0 to 10 characters. However,
be sure to specify "Total number of digits - 3" or below.
• The range of the character string of the numeric value that can be converted to a binary value is -2147483648 to
2147483647 for a signed value with the decimal point ignored, and 0 to 4294967295 for an unsigned value. A character
string of a numeric value excluding the sign and decimal point can be specified only within the range of 30H to 39H. (Value
with the decimal point ignored ... "-12345.6" becomes "-123456".)
• When representing a positive numeric value, 20H is set in the sign, and when representing a negative numeric value, 2DH
is set.
• Set 2EH in the decimal point.
• When "20H (space)" or "30H (0)" exists between the sign and the first non-zero number in a character string specified by
(s), "20H" or "30H" is ignored during conversion to a binary value.
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
(s)+6
b15 b0∙∙∙ ∙∙∙b7b8
00H
-
.
(d2)+1
(d2)
(d1)
(d1)+1
∙∙∙
ASCII code for 1st character
ASCII code for 3rd character
ASCII code for the 5th character
ASCII code for sign
ASCII code for 2nd character
ASCII code for the 4th character
ASCII code for the 7th character
ASCII code for the 6th character
ASCII code for the 9th character
ASCII code for the 8th character
ASCII code for the 11th character
ASCII code for the 10th character
ASCII code for the 12th character
Sign
1st character
2nd character 12th character
Indicates the end of character string.
Total number of digits
Integer value in which the decimal point is ignored
32-bit binary data
Number of digits of
the decimal part
00H
10
3
-423 .51867
-12345678
···
31H (1)
33H
(3)
35H
(5)
36H
(6)
38H (8)
2DH (-)
32H
(2)
34H
(3)
2EH
(.)
37H (7)
b7 b0···b15 b8
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
(d1)
(d1)+1
(d2)+1 (d2)
··· b0b15··· b16b31

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC iQ-F FX5 series and is the answer not in the manual?

Mitsubishi MELSEC iQ-F FX5 series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC iQ-F FX5 series
CategoryController
LanguageEnglish

Related product manuals