FB_MTP_DIntProcessValueIn

FB_MTP_DIntProcessValueIn 1:

The function block FB_MTP_DIntProcessValueIn provides an integer process value V with the associated ValueQualityCode VQC from a higher-level system (e.g. via OPC UA).

The variables UnitCur, SclMinCur, and SclMaxCur are used to display the current unit and the current value scaling.

Applying a new configuration

A new configuration is specified via the variables UnitExt, SclMinExt and SclMaxExt.

To change the configuration (unit and value scaling), an array of the type ST_MTP_InputElementConfig with a list of supported configurations is transferred on the PLC side via the input variable Configs. The value scaling for the respective units is stored in this array.

Enabling the application of the configuration is signaled on the PLC side by the variable ApplyEn = TRUE. The application can then be requested via the variable Apply = TRUE.

During the application, UnitExt is compared with the stored possible limit values in Configs. If the limit is exceeded or not reached, the stored upper or lower limit value is used.

FB_MTP_DIntProcessValueIn 2:

General definitions

Name of the object

Object description

WQC

OSLevel

Implemented interfaces

I_MTP_DIntProcessValueIn

FB_MTP_DIntProcessValueIn 3: Inputs

Name

Type

Description

OPC UA access

TagName

STRING

Name of the interface

-

TagDescription

STRING

Description of the interface

-

WQC

BYTE

Worst Quality Code

Read

OSLevel

BYTE

Level must be defined for system. Value 0 is reserved for local operation.

Read/write

Configs

ARRAY [*] OF ST_MTP_InputElementConfig

Possible configurations

-

ApplyEn

BOOL

Enable for request:
Apply configuration.

Read

Apply

BOOL

Request:
Apply configuration (Scl* and Unit*).

Read/write

FB_MTP_DIntProcessValueIn 4: Outputs

Name

Type

Description

OPC UA access

VQC

BYTE

Quality Code for the value

Read/write

V

DINT

Incoming process value via OPC UA

Read/write

UnitCur

INT

Current unit of the process value

Read

SclMinCur

DINT

Current scale start

Read

ScIMaxCur

DINT

Current scale end

Read

External variables

Name

Type

Description

OPC UA access

UnitExt

INT

Configuration input for the unit

Read/write

SclMinExt

DINT

Configuration input for the scale start

Read/write

SclMaxExt

DINT

Configuration input for the scale end

Read/write