254
4
4 Instructions4.6.4 Matrix Rotation and Shift
LEN: String length check
◆
Overview
The LEN instruction counts the characters (bytes) contained in a designated string..
LEN S D
String length check Applicable model:
H3U
S
Checked
data
Start number of elements that store the string whose
characters will be counted
16-bit instruction (5
steps)
LEN: Continuous
execution
LENP: Pulse
execution
D
Counting
result
Number of the element that indicates the number of
characters (bytes) contained in the string
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
The characters contained in the string from head address S are counted. The result is stored in [D].
Characters are counted byte by byte within the range from [S] to the rst 00H.
An error is returned in the following conditions. The error ag M8067 is set to ON to identify this error and
the error code is stored in D8067.
1. Error 6705 is returned when 00H is not found within the value range from [S].
2. Error 6706 is returned when the number of characters is greater than 32,767.
◆
Application