7.6.7 UNPACK_BYTE_TO_BIT
Function
Realize the disassembly and output of 1 BYTE input into 8 BOOL outputs
LD graphics

Parameter description
| Interface Variable | Declaration | Type | Description |
|---|---|---|---|
| IN_BY | Var_Input | BYTE | BYTE input amount |
| BIT0 | Var_Output | BOOL | Value input bit0 of BYTE |
| BIT1 | Var_Output | BOOL | Value input bit1 of BYTE |
| BIT2 | Var_Output | BOOL | Value input bit2 of BYTE |
| BIT3 | Var_Output | BOOL | Value input bit3 of BYTE |
| BIT4 | Var_Output | BOOL | Value input bit4 of BYTE |
| BIT5 | Var_Output | BOOL | Value input bit5 of BYTE |
| BIT6 | Var_Output | BOOL | Value input bit6 of BYTE |
| BIT7 | Var_Output | BOOL | Value input bit7 of BYTE |
Example
-
LD sample animation is as follows:

-
ST example is shown in the following code:
UNPACK_BYTE_TO_BIT(
IN_BY:=IN1,
BIT0=>bVar0,
BIT1=>bVar1,
BIT2=>bVar2,
BIT3=>bVar3,
BIT4=>bVar4,
BIT5=>bVar5,
BIT6=>bVar6,
BIT7=>bVar7
);