FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
11-23
11: D
ATA
C
ONVERSION
I
NSTRUCTIONS
SWAP (Data Swap)
Applicable CPU Modules
Valid Devices
For the valid device address range, see pages 6-1 and 6-2
(Basic Vol.).
Since the SWAP instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used as required.
Valid Data Types
Examples: SWAP
Data Type: W (word)
When input I0 is turned on, upper- and lower-byte data of the 16-bit data in data register D10 designated by source device S1 are exchanged, and
the result is stored to data register D20 designated by destination device D1.
Data Type: D (double-word)
When input I1 is turned on, upper- and lower-word data of the 32-bit data in data registers D10 and D11 designated by source device S1 are
exchanged, and the result is stored to data registers D20 and D21 designated by destination device D1.
S1
D1
When input is on, upper and lower byte- or word-data of a word- or double-word-data
designated by S1 are exchanged, and the result is stored to destination designated by
D1.
REP
**
S1(R)
*****
D1(R)
*****
SWAP(*)
FT1A-12
FT1A-24
FT1A-40
FT1A-48
FT1A-Touch
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1 (Source 1)
Binary data to swap
—
—
—
—
—
—
X
—
1-99
D1 (Destination 1)
Destination to store conversion result
—
—
—
—
—
—
X
—
1-99
W (word)
X
When a D (data register) is designated as the source or destination, 1 point (word data type) or 2 points (double-
word data type) are used. When repeat is designated, the quantity of device words increases in 1- or 2-point
increments.
I (integer)
—
D (double word)
X
L (long)
—
F (float)
—
I0
REP
S1
D10
D1
D20
SWAP(W)
14640
D20
(3930h)
Before Execution
12345
D10
(3039h)
After Execution
I1
REP
S1
D10
D1
D20
SWAP(D)
200
D11
100
D10
Before Execution
After Execution
100
D21
200
D20
Содержание microsmart pentra
Страница 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Страница 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...