Chapter 6 Instruction Details
XBC E-Type Main Unit 6-244 Ve r. 1
6.34.7 LEN, LENP
Instruction
Step
P M K F L T C S Z D.x
R.x
U N D R
LEN(P)
2~4 - - -
Position to save string length
1) LEN( Length)
(1) Calculates the string length saved in ASCII starting from S to save in D by 2 digits per word.
(2) If specified string S exceeds 31 characters with no NULL code, it will return 31 characters without any
error.
b8
b7
D
4
b15 b0
S+1
S+2
h33 (3)
h32 (2)
h35 (5)
h34 (4)
h00
S
b15 b0b8 b7
2) Program Example
(1) If Input Signal P00000 is changed to On, the string size of ‘124’ saved in D00000~D00001 is
operated and ‘3’ is saved in D10.
b8 b7
D10
3
b15
b0
D1
D2
h31 (1) h32 (2)
h00 h34 (4)
h36
D0
b15 b0b8 b7