100BBasic instructions
7.6 Move
S7-1200 Programmable controller
200
System Manual, 11/2011, A5E02486680-05
Table 7- 70 ENO status
ENO
Condition
Result
1
No error
The IN element was successfully copied to
all COUNT destinations.
0
The destination (OUT) range exceeds
the available memory area
Elements that fit are copied. No partial
elements are copied.
7.6.4
Swap instruction
Table 7- 71 SWAP instruction
LAD / FBD
SCL
Description
out := SWAP(in);
Reverses the byte order for two-byte and four-byte data elements. No change
is made to the bit order within each byte. ENO is always TRUE following
execution of the SWAP instruction.
1
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
Table 7- 72 Data types for the parameters
Parameter
Data type
Description
IN
Word, DWord
Ordered data bytes IN
OUT
Word, DWord
Reverse ordered data bytes OUT
Example 1
Parameter IN = MB0
(before execution)
Parameter OUT = MB4,
(after execution)
Address
MB0
MB1
MB4
MB5
W#16#1234
WORD
12
MSB
34
LSB
34
MSB
12
LSB
Example 2
Parameter IN = MB0
(before execution)
Parameter OUT = MB4,
(after execution)
Address
MB0
MB1
MB2
MB3
MB4
MB5
MB6
MB7
DW#16#
12345678
DWORD
12
MSB
34
56
78
LSB
78
MSB
56
34
12
LSB