DVP15MC11T Operation Manual
8.4.6 Swap
FB/FC
Explanation
FC
Swap is used for swapping the high byte and low byte of a 16-bit value. DVP15MC11T
Parameters
Meaning
Description Valid range
In
Input Data to swap 0~65535 for word data type
Out
Output Result 0~65535 for word data type
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In
● ●
Out
● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The Swap instruction exchanges the high byte and low byte of the value of In and the result is output to
Out.
Programming Example
The variable table and program
1
Swap
EN ENO
In Out
Swap_EN
Swap_In Out1
8-26