FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
26-35
26: S
CRIPT
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 first 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 first 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 first 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
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 ...