Fnc203 - Len / Character String Length Detection - Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
26.4
FNC203 – LEN / Character String Length Detection
Outline
This instruction detects the number of characters (bytes) of a specified character string.
1. Instruction format
FNC 203
LEN
2. Set data
Operand Type
S
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS
S
D
Explanation of function and operation
1. 16-bit operation (LEN and LENP)
The length of a character string stored in
until the first device storing "00H" is handled as a character string in units of byte.
Command
input
FNC203
LEN
b15----------b8
S
2nd character 1st character
4th character 3rd character
S
+1
S
+2
6th character 5th character
00H
S
+n
For example, when "ABCDEFGHI" is stored in
b15----------b8
S
42H(B)
S
+1
44H(D)
46H(F)
S
+2
S
+3
48H(H)
S
+4
00H
626
Mnemonic
16-bit Instruction
P
LEN
5 steps
LENP
Head device number storing a character string whose length is to be detected
Device number storing the detected character string length (number of bytes)
Digit Specification
S
D
b7-------------b0
"n"th character
It indicates the end of character string.
b7-------------b0
41H(A)
43H(C)
"ABCDEFGHI"
45H(E)
47H(G)
49H(I)
26 Character String Control – FNC200 to FNC209
26.4 FNC203 – LEN / Character String Length Detection
→ For handling of character strings, refer to Section 5.3.
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
T
C D R U \G
and later is detected, and stored to
S
b15---------------b0
Character string
D
S
and later as shown below, K9 is stored to
b15---------------b0
D
Mnemonic
32-bit Instruction
Con-
Real
Index
stant
Number
V
Z Modify K
H
E
. Data starting from
D
length
9
Operation Condition
Data Type
Character string
16-bit binary
Others
Charac-
Pointer
ter String
" "
P
S
D
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents