EasyManua.ls Logo

Siemens S7-1200 - SWAP (Swap Bytes) Instruction

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic instructions
7.6 Move operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
243
The FILL_BLK and UFILL_BLK instructions copy the source data element IN to the
destination where the initial address is specified by the parameter OUT. The copy process
repeats and a block of adjacent addresses is filled until the number of copies is equal to the
COUNT parameter.
FILL_BLK and UFILL_BLK instructions differ in how interrupts are handled:
Interrupt events are
queued and processed
during FILL_BLK execution. Use the
FILL_BLK instruction when the data at the move destination address is not used within an
interrupt OB subprogram or, if used, the destination data does not have to be consistent.
Interrupt events are
queued but not processed
until UFILL_BLK execution is complete.
Use the UFILL_BLK instruction when the move operation must be completed and the
destination data consistent, before the execution of an interrupt OB subprogram.
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 (Swap bytes) 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 of Contents

Other manuals for Siemens S7-1200

Related product manuals