FC_PackByte

 

FC_PackByte - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Pack 8 BOOL variables in one BYTE.

Description

Returns one BYTE whose bits represent the BOOL input values. The bits are arranged increasing from low to high after the numbering of the input value.

Interface

Input

Data type

Description

i_xB07

BOOL

Most significant input bit

i_xB06

BOOL

Input bit

i_xB05

BOOL

Input bit

i_xB04

BOOL

Input bit

i_xB03

BOOL

Input bit

i_xB02

BOOL

Input bit

i_xB01

BOOL

Input bit

i_xB00

BOOL

Least significant input bit

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

Return Value

Data type

Description

BYTE

A BYTE whose bits represent the BOOL input values.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The BOOL variables have been packed successfully.