Skip to main content

7.6.5 PACK_BYTES_TO_DWORD

Function

Implementation of combining 4 BYTE input quantities into a DWORD return value

LD graphics

alt text

Parameter description

Interface VariableDeclarationTypeDescription
HH_ByteVar_InputBYTEHH_BYTE assigned to the WORD return value
HL_ByteVar_InputBYTEHL_BYTE assigned to the WORD return value
LH_ByteVar_InputBYTELH_BYTE assigned to the WORD return value
LL_ByteVar_InputBYTELL_BYTE assigned to the WORD return value
Function nameReturn valueWORDConverted result

Example

  • LD sample animation is as follows:

alt text

  • ST example is shown in the following code:
OUT:=PACK_BYTES_TO_DWORD(
HH_Byte:=hhVar,
HL_Byte:=hlVar,
LH_Byte:=lhVar,
LL_Byte:=llVar
);