Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 694

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

Advertisement

Processing details
• These instructions extract (n) characters of data from the left of the character string data (the start of the character string)
stored in the device number specified by (s) and later, and store the extracted data in the device number specified by (d)
and later.
b15
∙∙∙
(s)
ASCII code (2nd character)
(s)+1
ASCII code (4th character)
ASCII code ((n-1)th character)
ASCII code ((n+1)th character)
00H
Ex.
When (n)=7
b15
∙∙∙
(s)
42H (B)
(s)+1
44H (D)
(s)+2
46H (F)
(s)+3
32H (2)
(s)+4
34H (4)
00H
(s)+5
"ABCDEF12345"
(1) ASCII code (7th character)
• The NULL code (00H) indicating the end of a character string is automatically added to the end of the character string data.
• When the number of characters in the device specified by (n) is 0, NULL code (00H) is stored in the device specified by (n).
Operation error
Error code
Description
(SD0)
2820H
There is no NULL code (00H) in each setting area in the device/label memory in the device specified by (s) and later.
3405H
An out-of-range value is set to (s).
• The number of characters of the character string in the device specified by (s) exceeds 16383.
• The number of characters of the character string in the device specified by (s) is 0.
The number of characters in the device specify by (n) exceeds that in the device specified by (s).
7 APPLICATION INSTRUCTIONS
692
7.8 String Processing Instructions
b8
b7
∙∙∙
ASCII code (1st character)
ASCII code (3rd character)
ASCII code ((n-2)th character)
ASCII code ('n'th character)
ASCII code (last character)
b8
b7
∙∙∙
b0
41H (A)
43H (C)
45H (E)
31H (1)
33H (3)
(1)
35H (5)
b0
b15
(d)
ASCII code (2nd character)
(d)+1
ASCII code (4th character)
ASCII code ((n-1)th character)
b15
∙∙∙
b8
b7
(d)
42H (B)
(d)+1
44H (D)
46H (F)
(d)+2
(d)+3
00H
"ABCDEF1"
∙∙∙
b8
b7
∙∙∙
ASCII code (1st character)
ASCII code (3rd character)
ASCII code ((n-2)th character)
00H
ASCII code ('n'th character)
∙∙∙
b0
41H (A)
43H (C)
45H (E)
31H (1)
b0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents