Mitsubishi Electric MELSEC IQ-R series Reference Manual page 81

Programmable controller
Hide thumbs Also See for MELSEC IQ-R series:
Table of Contents

Advertisement

Considerations for handling real number data and character string data
The word data and double word data are handled as integer value (16-bit data or 32-bit data).
When data other than integer (real number, character string) is stored in a device, the stored value is read as integer value.
• When real number (0.75) is stored in D0 and D1: D0 = 0000H, D1 = 3F40H
• When character string ('12AB') is stored in D2 and D3: D2 = 3231H, D3 = 4241H
For data to be used as real number or character string data in the instructions of the programmable controller, write it to the
device/label according to the defined data specification method. For more details on how to specify data used in instructions,
refer to the programming manual of the CPU module used.
■For character string data
The following shows the images how character string data is stored.
Item
Character string to be stored
Character code
Image when character string data is stored from
D0
Ex.
Write ASCII code character string data used in the instructions which handle character strings to word device
Store the character string ('ABCD') to D0 and D1: D0 = 4241H ('BA'), D1 = 4443H ('DC')
Specify the following data for write data.
ASCII code
B
A
D
C
4
2
4
1
4
4
4
34
32
34
32
34
34
34
H
H
H
H
H
H
H
D0
D1
When communicating ASCII code character string data in ASCII code, data is rearranged every two
characters and stored.
For ASCII code character string
'ABC'
'41H', '42H', '43H'
NULL indicates 00H.
D0
B
A
D1
NULL
C
NULL
NULL
3
0
0
0
0
33
30
30
30
30
H
H
H
H
H
D2
For Unicode character string
'ABCD'
'ABCD'
'41H', '42H', '43H', '44H'
'0041H', '0042H', '0043H', '0044H'
NULL indicates 00H.
NULL indicates 0000H.
D0
B
A
D1
D
C
D2
NULL
NULL
Binary code
A
B
C
D
NULL
NULL
41
42
43
44
00
00
H
H
H
H
H
H
D0
D1
D2
8.1 Data to be Specified in Commands
D0
A
B
D1
C
D2
D
D3
D4
NULL
8 DEVICE ACCESS
79
8

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsecq seriesMelsec l series

Table of Contents