13: S
CRIPTS
13-32
S
MART
AXIS P
RO
/L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378
Data comparison and copying
Example 7.22
Word-unit data comparison
Script
Operation Description
Compares the values of 10 words from D0100 (up to D0109) with the values of 10 words from D0200 (up to D0209).
If the value for each is entirely equal, 1 is stored in D0000. If even a single one is not equal, 0 is stored.
Note:
Even if the data type is set to D (double word), L (long), or F (float), the comparison is performed from the starting device in word units.
Example 7.23
Bit-unit data comparison
Script
Operation Description
Compares the third bit of D0100 through the third bit of D0109 with the state of the bits from the first bit of D0200 through the
first bit of D0209.
If the value for each is entirely equal, 1 is stored in D0000. If even a single one is not equal, 0 is stored.
Note:
Even if the data type is set to D (double word), L (long), or F (float), the comparison is performed from the starting device in bit units.
Example 7.24
Word-unit data copy
Script
Operation Description
Copies the value of 10 word devices from D0200 (up to D0209) to 10 word devices from D0100 (up to D0109).
Note:
Even if the data type is set to D (double word), L (long), or F (float), the data is copied from the starting device in word units.
[D0000] = MEMCMP([D0100], [D0200], 10);
Compare each
D0100
D0101
D0102
D0108
D0109
D0200
D0201
D0202
D0208
D0209
・・・
D0107
・・・
D0207
・・・
[D0000] = MEMCMP([D0100.02], [D0200.00], 10);
Compare each
3rd bit of D0100
3rd bit of D0101
3rd bit of D0102
3rd bit of D0108
3rd bit of D0109
・・・
3rd bit of D0107
・・・
1st bit of D0200
1st bit of D0201
1st bit of D0202
1st bit of D0208
1st bit of D0209
1st bit of D0207
・・・
MEMCPY([D0100], [D0200], 10);
Copy each
D0201
D0202
D0207
・・・
・・・
・・・
D0200
D0208
D0209
D0101
D0102
D0107
D0100
D0108
D0109
Содержание FT1A-B12RA
Страница 1: ...FT9Y B1378 5 ...
Страница 2: ......
Страница 208: ...7 DEVICE ADDRESSES 7 16 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...
Страница 226: ...8 INSTRUCTIONS FUNCTION BLOCKS REFERENCE 8 18 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...
Страница 340: ...13 SCRIPTS 13 36 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...
Страница 384: ...APPENDIX A 18 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 European Font ISO 8859 1 Cyrillic Font ANSI 1251 ...
Страница 385: ...SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 A 19 APPENDIX Japanese Font JIS X0201 ...
Страница 386: ...APPENDIX A 20 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...