Skip to main content

BYTE_TO_WORD

The BYTE_TO_WORD block converts a BYTE value to WORD.

Ladder representation​

BYTE_TO_WORD Ladder representation

Block structure​

Variable TypeNameData TypeDescription
VAR_INPUTENBOOLBlock enable.
VAR_INPUTValueBYTE / USINT / SINTBYTE value.
VAR_OUTPUTENOBOOLEnd of operation.
VAR_OUTPUTResultWORD / UINT / INTWORD value.

Operation​

When EN is TRUE, the block interprets Value as a BYTE value, converts it to WORD, and stores the result in Result.

When EN is FALSE, Result remains unchanged.

The ENO output passes the EN state to the next Ladder block after the operation is finished.

Execution flowchart​

BYTE_TO_WORD execution flowchart

Examples​

The Ladder examples convert VALUE from BYTE to WORD, store the final value in RESULT, and activate ENO when the block finishes successfully.

BYTE_TO_WORD Ladder example

BYTE_TO_WORD Ladder example result