26: S
CRIPT
26-38
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
Example 7.30
Count a string
Script
Operation Description
Finds the length (character count) of the string starting from D0200 and stores the result in D0100.
Note:
The NULL terminating character (0x00) is the end of the string. (The terminating character is not included in the string length.)
Example 7.31
Concatenate strings
Script
Operation Description
Appends the string starting from D0200 to the string starting from D0100.
Note:
The NULL terminating character (0x00) is the end of the string. (The terminating character is not included in the string length.)
[D0100] = STRLEN([D0200]);
Device
Stored Value
Device
Stored Value
D0200
Upper Byte
'A' = 0x41
D0100
7
Lower Byte
'B' = 0x42
D0201
Upper Byte
'C' = 0x43
Lower Byte
'D' = 0x44
D0202
Upper Byte
'E' = 0x45
Lower Byte
'F' = 0x46
D0203
Upper Byte
'G' = 0x47
Lower Byte
0x00
Device
Stored Value
Device
Stored Value
D0200
Upper Byte
'A' = 0x41
D0100
3
Lower Byte
'B' = 0x42
D0201
Upper Byte
'C' = 0x43
Lower Byte
0x00
D0202
Upper Byte
'E' = 0x45
Lower Byte
'F' = 0x46
D0203
Upper Byte
'G' = 0x47
Lower Byte
0x00
Character count
Terminating character
Character count
Terminating character
STRCAT([D0100], [D0200]);
Device
Stored Value
Device
Stored Value
D0100
Upper Byte
'A' = 0x41
D0100
Upper Byte
'A' = 0x41
Lower Byte
'B' = 0x42
Lower Byte
'B' = 0x42
D0101
Upper Byte
'C' = 0x43
D0101
Upper Byte
'C' = 0x43
Lower Byte
0x00
Lower Byte
'D' = 0x44
D0102
Upper Byte
'E' = 0x45
Device
Stored Value
Lower Byte
'F' = 0x46
D0200
Upper Byte
'D' = 0x44
D0103
Upper Byte
'G' = 0x47
Lower Byte
'E' = 0x45
Lower Byte
0x00
Terminating character
D0201
Upper Byte
'F' = 0x46
Lower Byte
'G' = 0x47
D0202
Upper Byte
0x00
Lower Byte
0x00
Concatenate
Terminating
character
Terminating character
Summary of Contents for MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...