ST_TcPlcInputAnalog (from V3.0.44)

This structure contains variables for the evaluation of analog inputs.

Syntax

TYPE ST_TcPlcInputAnalog :
(* last modification: 20.02.2019 *)
STRUCT
    nADC:     DINT;
    nOpState: INT;
    bWcState: BOOL;
END_STRUCT
END_TYPE

Parameter

Name

Type

Description

nADC

DINT

nADC: The actual value is displayed here.

If this value is determined with a 16-bit terminal, it must be adapted. If it is a signed value (e.g. from a ±10 V terminal), it must be assigned with a type conversion INT_TO_DINT(). This automatically extends the sign to the upper 16 bits with the correct type. Otherwise negative values are interpreted as very large positive values. If only positive values occur, this can be omitted. In this case, direct mapping from 16 to 2 bit can be used, since the upper 16 bits remain unaffected.

nOpState

INT

nOpState: This signal indicates the operating state of the terminal.

bWcState

BOOL

bWcState: This signal indicates a problem with continuous data exchange with the terminal.