FB_MTP_AnaProcessValueIn

The function block FB_MTP_AnaProcessValueIn
provides an analog 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.

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 |
Configs | ARRAY [*] OF | Possible configurations | - |
ApplyEn | BOOL | Enable for request: | Read |
Outputs
Name | Type | Description | OPC UA access |
---|---|---|---|
VQC | BYTE | Quality Code for the value | Read/write |
OSLevel | BYTE | Level must be defined for system. Value 0 is reserved for local operation. | Read/write |
V | REAL | Incoming process value via OPC UA | Read/write |
UnitCur | INT | Current unit | Read |
SclMinCur | REAL | Current scale start | Read |
ScIMaxCur | REAL | Current scale end | Read |
UnitExt | INT | Configuration input for the unit | Read/write |
SclMinExt | REAL | Configuration input for the scale start | Read/write |
SclMaxExt | REAL | Configuration input for the scale end | Read/write |
Apply | BOOL | Requirement: | Read/write |