IDEC MICROSmart FC6A Series Ladder Programming Manual page 539

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

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
STRCUT([D0100], [D0200], 2, 3);
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
Device
Stored Value
'A' = 0x41
Upper Byte
D0200
'B' = 0x42
Lower Byte
'C' = 0x43
Upper Byte
D0201
'D' = 0x44
Lower Byte
'E' = 0x45
Upper Byte
D0202
'F' = 0x46
Lower Byte
'G' = 0x47
Upper Byte
D0203
0x00
Lower Byte
Script
STRCUT([D0100], [D0200], 1, 4);
Copy from string "ABCDEFG" at start position 1 for a character count of 4
Device
Stored Value
'A' = 0x41
Upper Byte
D0200
'B' = 0x42
Lower Byte
'C' = 0x43
Upper Byte
D0201
'D' = 0x44
Lower Byte
'E' = 0x45
Upper Byte
D0202
'F' = 0x46
Lower Byte
'G' = 0x47
Upper Byte
D0203
0x00
Lower Byte
Start position
Character count
0
1
← 2
3 characters
3
4
5
:
Terminating character
Start position
Character count
0
← 1
← 2
4 characters
3
4
5
:
Terminating character
FC6A S
MICROS
L
ERIES
MART
Device
Upper Byte
D0100
Lower Byte
Upper Byte
D0101
Lower Byte
Device
Upper Byte
D0100
Lower Byte
Upper Byte
D0101
Lower Byte
Upper Byte
D0101
Lower Byte
P
M
ADDER
ROGRAMMING
ANUAL
Stored Value
'C' = 0x43
'D' = 0x44
'E' = 0x45
0x00
Terminating character
Stored Value
'B' = 0x42
'C' = 0x43
'D' = 0x44
'E' = 0x45
0x00
Terminating character
0x00
FC9Y-B1726
26: S
CRIPT
26-37

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents