MEM.UnpackByte (FB prefix: memuby)
This function block of the
⇘
CAA_Memory.library block will unpack the BYTE “byValue“ and return the 8 bits "xBit0" .. "xBit7".
Input:
byValue
|
BYTE
|
BYTE to be unpacked
|
Output:
xBit0
|
BOOL
|
Bit 0 of byValue
|
xBit1
|
BOOL
|
Bit 1 of byValue
|
xBit2
|
BOOL
|
Bit 2 of byValue
|
xBit3
|
BOOL
|
Bit 3 of byValue
|
xBit4
|
BOOL
|
Bit 4 of byValue
|
xBit5
|
BOOL
|
Bit 5 of byValue
|
xBit6
|
BOOL
|
Bit 6 of byValue
|
xBit7
|
BOOL
|
Bit 7 of byValue
|
Example:
byInput = 16#01 = 2#00000001
->
xBit0 = TRUE
xBit1..xBit7 = FALSE