Script – IDEC High Performance Series User Manual
Page 1011
![background image](/manuals/350385/1011/background.png)
WindO/I-NV2 User’s Manual
20-47
5 Script Coding Examples
20
Script
Script
Operation description
Finds the length (character count) of the string starting from LDR200 and stores that in LDR100.
■
Example 5.7.27 Count a string
[LDR 100] = STRLEN([LDR 200]);
• The only devices that can be specified as function arguments in string operations are internal devices.
• The NULL terminating character (0x00) is the end of the string. (The terminating character is not included
in the string length.)
Device
Stored value
Device
Stored value
LDR 200
Upper byte
'A' = 0x41
LDR 100
7
Lower byte
'B' = 0x42
LDR 201
Upper byte
'C' = 0x43
Lower byte
'D' = 0x44
LDR 202
Upper byte
'E' = 0x45
Lower byte
'F' = 0x46
LDR 203
Upper byte
'G' = 0x47
Lower byte
0x00
Device
Stored value
Device
Stored value
LDR 200
Upper byte
'A' = 0x41
LDR 100
3
Lower byte
'B' = 0x42
LDR 201
Upper byte
'C' = 0x43
Lower byte
0x00
LDR 202
Upper byte
'E' = 0x45
Lower byte
'F' = 0x46
LDR 203
Upper byte
'G' = 0x47
Lower byte
0x00
Character
count
Terminating character
Character
count
Terminating character