SWAB
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
IN |
ANY |
No range |
N/A |
No default |
Any signed or unsigned integer. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Q |
ANY |
No range |
N/A |
Swapped value. |
Remarks
Supported data types are:
|
|
- SINT and USINT inputs result in the same output value because they are only 1 byte wide.
- If the function is called for another data type, the output takes the value of the input.
Examples
Type |
IN |
Q |
---|---|---|
DWORD |
16#1A2B3C4D |
16#4D3C2B1A |
WORD |
16#1A2B |
16#2B1A |
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
swappedValue := SWAB(value);