5 Script Coding Examples
20-54 WindO/I-NV4 User’s Manual
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 device addresses 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 address Stored value Device address Stored value
LDR200
Upper byte
'A' = 0x41
LDR100 7
Lower byte
'B' = 0x42
LDR201
Upper byte
'C' = 0x43
Lower byte
'D' = 0x44
LDR202
Upper byte
'E' = 0x45
Lower byte
'F' = 0x46
LDR203
Upper byte
'G' = 0x47
Lower byte
0x00
Device address Stored value Device address Stored value
LDR200
Upper byte
'A' = 0x41
LDR100 3
Lower byte
'B' = 0x42
LDR201
Upper byte
'C' = 0x43
Lower byte
0x00
LDR202
Upper byte
'E' = 0x45
Lower byte
'F' = 0x46
LDR203
Upper byte
'G' = 0x47
Lower byte
0x00
Character
count
Terminating character
Character
count
Terminating character