Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 448

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions convert the hexadecimal ASCII data stored in the device areas specified by (s) and later to 16-bit binary
data, and store the converted data in the device specified by (d).
• The setting method of the hexadecimal ASCII data to be set in (s) depends on the status of SM705 (Number of conversion
digits selection).
*1
Status of SM705
OFF
ON
*1 For the firmware version of the CPU module supporting SM705, refer to the following.
 MELSEC iQ-R CPU Module User's Manual (Application)
A CPU module which does not support SM705 operates in the same way as SM705 is off even if it is turned on.
■Setting method of (s) for when SM705 (Number of conversion digits selection) is off
• Set hexadecimal ASCII data with 4 digits (fixed) in (s) to (s)+1.
b15
∙∙∙
(s)
ASCII 3
(s)+1
ASCII 1
ASCII : ASCII code (th digit)
• The ASCII data in the device specified by (s) to (s)+1 is within the range from 0000H to FFFFH.
• The data of (s)+2 or later is ignored.
• A value from 30H to 39H and 41H to 46H can be set in each place of ASCII code.
Ex.
When 5A8DH is specified in (s)
b15
∙∙∙
(s)
41H (A)
(s)+1
44H (D)
■Setting method of (s) for when SM705 (Number of conversion digits selection) is on
Set hexadecimal ASCII data with a desired number of digits (including 00H (NULL code)) in (s). Note that 00H (NULL code) is
not required to be set for the maximum number of digits (4 digits).
The following table lists the setting method of (s).
Value to be set
Data of (s) to (s)+1
in (s)
• 0H to FH
• Set 00H in the upper byte of (s)+0.
• The data of (s)+1 or later is ignored.
(s)
(s)+1
• 100H to FFFH
• Set 00H in the upper byte of (s)+1.
• The data of (s)+2 or later is ignored.
(s)
(s)+1
ASCII : ASCII code (th digit)
• The ASCII data in the device specified by (s) to (s)+1 is within the range from 0000H to FFFFH.
• The data of (s)+2 or later is ignored.
• A value from 30H to 39H and 41H to 46H can be set in each place of ASCII code.
• If a value 00H is set in each place of ASCII code, the value will be processed as the end of the hexadecimal ASCII data.
6 BASIC INSTRUCTIONS
446
6.6 Data Conversion Instructions
Setting method of (s)
Set (s) with a fixed number of digits (4 digits).
Set (s) with a desired number of digits (maximum: 4 digits).
b8
b7
∙∙∙
b0
ASCII 4
ASCII 2
b8
b7
∙∙∙
b0
35H (5)
38H (8)
b15
∙∙∙
b8
b7
00H
b15
∙∙∙
b8
b7
ASCII 2
00H
b15
∙∙∙
(d)
BIN16
b15
∙∙∙
5A8DH
(d)
Value to be set
in (s)
• 10H to FFH
∙∙∙
b0
ASCII 1
• 1000H to FFFFH
∙∙∙
b0
ASCII 3
ASCII 1
Reference
Page 446 Setting method of (s) for when SM705 (Number of
conversion digits selection) is off
Page 446 Setting method of (s) for when SM705 (Number of
conversion digits selection) is on
b0
b0
Data of (s) to (s)+1
• Set 00H in the lower byte of (s)+1.
• The data of the upper byte of (s)+1 or later is ignored.
b15
∙∙∙
(s)
ASCII 1
(s)+1
• The data of (s)+2 or later is ignored.
b15
∙∙∙
(s)
ASCII 3
(s)+1
ASCII 1
b8
b7
∙∙∙
b0
ASCII 2
00H
b8
b7
∙∙∙
b0
ASCII 4
ASCII 2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents