7.6.2 PACK_BITS_TO_WORD
Function
Realize the combination of 16 BOOL input quantities BIT0--BIT15 into a WORD return value
LD graphics

Parameter description
| Interface Variable | Declaration | Type | Description |
|---|---|---|---|
| BIT0 | Var_Input | BOOL | bit0 of the WORD return value |
| BIT1 | Var_Input | BOOL | bit1 of the WORD return value |
| BIT2 | Var_Input | BOOL | bit2 of the WORD return value |
| BIT3 | Var_Input | BOOL | bit3 of the WORD return value |
| BIT4 | Var_Input | BOOL | bit4 of the WORD return value |
| BIT5 | Var_Input | BOOL | bit5 of the WORD return value |
| BIT6 | Var_Input | BOOL | bit6 of the WORD return value |
| BIT7 | Var_Input | BOOL | bit7 of the WORD return value |
| BIT8 | Var_Input | BOOL | bit8 of the WORD return value |
| BIT9 | Var_Input | BOOL | bit9 of the WORD return value |
| BIT10 | Var_Input | BOOL | bit10 of the WORD return value |
| BIT11 | Var_Input | BOOL | bit11 of the WORD return value |
| BIT12 | Var_Input | BOOL | bit12 of the WORD return value |
| BIT13 | Var_Input | BOOL | bit13 of the WORD return value |
| BIT14 | Var_Input | BOOL | bit14 of the WORD return value |
| BIT15 | Var_Input | BOOL | bit15 of the WORD return value |
| Function name | Return value | WORD | Converted result |
Example
- LD sample animation is as follows:

- ST example is shown in the following code:
OUT:=PACK_BITS_TO_WORD(
BIT0:=1,
BIT1:=1,
BIT2:=1,
BIT3:=1,
BIT4:=1,
BIT5:=1,
BIT6:=1,
BIT7:=1,
BIT8:=1,
BIT9:=1,
BIT10:=1,
BIT11:=1,
BIT12:=0,
BIT13:=1,
BIT14:=0,
BIT15:=1
);