UnpackByte (FB)¶
FUNCTION_BLOCK UnpackByte
Function block unpacks “byValue” and returns the 8 bits “xBit0” .. “xBit7”.
Prefix: “memuby”.
Example:
byInput = 16#01 = 2#00000001
->
xBit0 = TRUE
xBit1..xBit7 = FALSE
- InOut:
Scope
Name
Type
Comment
Input
byValue
BYTE
BYTE to analyse
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