FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
26-37
26: S
CRIPT
String Operations
Strings are set as continuous data registers of 1 word or more. 2 bytes of data are 1 word and they are set from upper byte to
lower byte in order. Set 00h at the end of the string.
Example 7.29
Copy a string
Script
Operation Description
Stores in order from D0100 character count 3 (3 characters worth) from start position 2 (starting from 0, so the 3rd character) of
the string "ABCDEFG" that starts from D0200.
Note:
The start position can be specified in the range from 0 to 127, the character count can be specified in the range from 1 to 128.
Copy from string "ABCDEFG" at start position 2 for a character count of 3
Script
Copy from string "ABCDEFG" at start position 1 for a character count of 4
STRCUT([D0100], [D0200], 2, 3);
STRCUT([D0100], [D0200], 1, 4);
Device
Stored Value
Start position
Character count
Device
Stored Value
D0200
Upper Byte
'A' = 0x41
0
D0100
Upper Byte
'C' = 0x43
Lower Byte
'B' = 0x42
1
Lower Byte
'D' = 0x44
D0201
Upper Byte
'C' = 0x43
←
2
D0101
Upper Byte
'E' = 0x45
Lower Byte
'D' = 0x44
3
Lower Byte
0x00
Terminating character
D0202
Upper Byte
'E' = 0x45
4
Lower Byte
'F' = 0x46
5
D0203
Upper Byte
'G' = 0x47
:
Lower Byte
0x00
Terminating character
3 characters
Device
Stored Value
Start position
Character count
Device
Stored Value
D0200
Upper Byte
'A' = 0x41
0
D0100
Upper Byte
'B' = 0x42
Lower Byte
'B' = 0x42
←
1
Lower Byte
'C' = 0x43
D0201
Upper Byte
'C' = 0x43
←
2
D0101
Upper Byte
'D' = 0x44
Lower Byte
'D' = 0x44
3
Lower Byte
'E' = 0x45
D0202
Upper Byte
'E' = 0x45
4
D0101
Upper Byte
0x00
Terminating character
Lower Byte
'F' = 0x46
5
Lower Byte
0x00
D0203
Upper Byte
'G' = 0x47
:
Lower Byte
0x00
Terminating character
4 characters
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 ...