UnpackDWord (FB)¶
FUNCTION_BLOCK UnpackDWord
Function block unpacks “dwValue” and returns the two contained “wLowWord”, “wHighWord”, the 4 contained bytes “byLLByte” .. “byHHByte” and the 32 bits “xBit0” .. “xBit31”.
Prefix: “memudw”.
Example:
dwValue = 16#01020304 = 2#00000001 00000010 00000011 00000100
->
byLowWord = 16#0304
byHighWord = 16#0102
byLLByte = 16#04
byLHByte = 16#03
byHLByte = 16#02
byHHByte = 16#01
xBit2, xBit8, xBit9, xBit17 and xBit24 = TRUE
remaining bits = FALSE
- InOut:
- Scope - Name - Type - Comment - Input - dwValue- DWORD- DWORD to analyse - Output - wLowWord- WORD- low word of dwValue - wHighWord- WORD- high word of dwValue - byLLByte- BYTE- byte LL of dwValue - byLHByte- BYTE- byte LH of dwValue - byHLByte- BYTE- byte HL of dwValue - byHHByte- BYTE- byte HH of dwValue - xBit0- BOOL- Bit 0 of dwValue - xBit1- BOOL- Bit 1 of dwValue - xBit2- BOOL- Bit 2 of dwValue - xBit3- BOOL- Bit 3 of dwValue - xBit4- BOOL- Bit 4 of dwValue - xBit5- BOOL- Bit 5 of dwValue - xBit6- BOOL- Bit 6 of dwValue - xBit7- BOOL- Bit 7 of dwValue - xBit8- BOOL- Bit 8 of dwValue - xBit9- BOOL- Bit 9 of dwValue - xBit10- BOOL- Bit 10 of dwValue - xBit11- BOOL- Bit 11 of dwValue - xBit12- BOOL- Bit 12 of dwValue - xBit13- BOOL- Bit 13 of dwValue - xBit14- BOOL- Bit 14 of dwValue - xBit15- BOOL- Bit 15 of dwValue - xBit16- BOOL- Bit 16 of dwValue - xBit17- BOOL- Bit 17 of dwValue - xBit18- BOOL- Bit 18 of dwValue - xBit19- BOOL- Bit 19 of dwValue - xBit20- BOOL- Bit 20 of dwValue - xBit21- BOOL- Bit 21 of dwValue - xBit22- BOOL- Bit 22 of dwValue - xBit23- BOOL- Bit 23 of dwValue - xBit24- BOOL- Bit 24 of dwValue - xBit25- BOOL- Bit 25 of dwValue - xBit26- BOOL- Bit 26 of dwValue - xBit27- BOOL- Bit 27 of dwValue - xBit28- BOOL- Bit 28 of dwValue - xBit29- BOOL- Bit 29 of dwValue - xBit30- BOOL- Bit 30 of dwValue - xBit31- BOOL- Bit 31 of dwValue 
