6.14 Character string
6.14.1 String length
Input/output Operand
Data type
IN
VB,Constant string, LB, *VD, *LD, *AC
Character string
OUT
VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *LD, *AC
Byte
STR - LEN :Instruction output “IN” string length.
The longest constant string is 126 bytes.
error conditions:
0006 Indirect address
0091 Operand range
ASCII constant string data type format :
String is a series of characters, each character is stored as a byte.The first byte of a
string defines the length of the string, that is the number of characters.If a constant
string is entered directly into the program editor or data block, the string must start
and end with double quotation marks ("string constant").
Example:
When the string is "123456", the length of the string is 6.
183
Made with FlippingBook - Online magazine maker