7.6.1 PACK_BITS_TO_BYTE
Function
Implement the combination of 8 BOOL input quantities BIT0--BIT7 into one BYTE return value
LD graphics

Parameter description
| Interface Variable | Declaration | Type | Description |
|---|---|---|---|
| BIT0 | Var_Input | BOOL | bit0 of the BYTE return value |
| BIT1 | Var_Output | BOOL | bit1 of the BYTE return value |
| BIT2 | Var_Output | BOOL | bit2 of the BYTE return value |
| BIT3 | Var_Output | BOOL | bit3 of the BYTE return value |
| BIT4 | Var_Output | BOOL | bit4 of the BYTE return value |
| BIT5 | Var_Output | BOOL | bit5 of the BYTE return value |
| BIT6 | Var_Output | BOOL | bit6 of the BYTE return value |
| BIT7 | Var_Output | BOOL | bit7 of the BYTE return value |
| Function name | Return value | BYTE | Converted result |
Example
- LD sample animation is as follows:

- ST example is shown in the following code:
OUT:=PACK_BITS_TO_BYTE(
BIT0:=0,
BIT1:=1,
BIT2:=0,
BIT3:=1,
BIT4:=1,
BIT5:=1,
BIT6:=1,
BIT7:=1
);