DWORD_TO_BYTE
O bloco DWORD_TO_BYTE converte um valor DWORD em BYTE.
Representação em Ladder
Estrutura de blocos
| Tipo de variável | Nome | Tipo de dado | Descrição |
|---|---|---|---|
| VAR_INPUT | EN | BOOL | Habilita o bloco. |
| VAR_INPUT | Value | DWORD / UDINT / DINT | DValor WORD. |
| VAR_OUTPUT | ENO | BOOL | Indica que a operação foi concluída. |
| VAR_OUTPUT | Result | BYTE / USINT / SINT | Valor BYTE. |
Operation
When EN is TRUE, the block interprets Value as a DWORD value, converts it to BYTE, and stores the result in Result.
When EN is FALSE, Result remains unchanged.
A saída ENO passa o estado de EN para o próximo bloco Ladder após a conclusão da operação.
Conversion Behavior
Only the eight least significant bits are considered in the result.
Fluxograma de execução

Exemplos
- Diagrama Ladder
- Texto Estruturado
The Ladder examples convert VALUE from DWORD to BYTE, store the final value in RESULT, and activate ENO when the block finishes successfully.
The following Structured Text code applies the same logic shown in the Ladder example.
Structured Text
VAR
VALUE : DINT := 56;
RESULT : SINT;
END_VAR
RESULT := FB_DWORD_TO_BYTE(EN:=DI1, Value:=VALUE, ENO=>DO1);