SWAB
Function - Swap the bytes of an integer.
Inputs
Input |
Data type |
Description |
IN |
ANY |
Any signed or unsigned integer of 16 or 32 bits. |
Outputs
Output |
Data type |
Description |
Q |
ANY |
Swapped value. |
Remarks
Supported data types are INT, UINT, WORD, DINT, UDINT and DWORD. If the function is called for another data type the output takes the value of the input.
Examples
Type |
IN |
Q |
WORD |
16#1A2B |
16#2B1A |
DWORD |
16#1A2B3C4D |
16#4D3C2B1A |
SWAB |
IEC 61131-3 Automation platform > Programming - Reference guide > Registers > SWAB |
Created with the Personal Edition of HelpNDoc: Elevate your documentation to new heights with HelpNDoc's built-in SEO