FB_MTP_MonAnaVlv

FB_MTP_MonAnaVlv 1:

The function block FB_MTP_MonAnaVlv is an object for controlling an analog valve from different sources: internal PLC logic or manual operation (access via OPC UA). Switching requests and value specifications are managed independently of each other via the state machines Operation Mode and Source Mode. It also includes the option of monitoring the output values with the respective feedback signals. The OPC UA access rights are described in the variable tables.

Controlling the valve

The specification for opening and closing the valve is made via the switching requests Open* and Close*. The state machine of the Operation Mode manages whether and from which source new switching requests are processed.

If requests are sent simultaneously to Open* and Close*, the safety position takes precedence: SafePosEn := FALSE means the valve remains in its current state. In SafePosEn = TRUE, the valve opens when SafePos = TRUE or closes when SafePos = FALSE

If Locking is active, control of the outputs via the switching requests is prevented or the safety position is assumed.

Setpoint specification

The position is specified via Pos* variables. The position specification is managed by the state machine of the Source Mode and output according to the diagram below:

FB_MTP_MonAnaVlv 2:

Safety position

The safety position is defined via the variables SafePosEn and SafePos .

The variable SafePosEn is used to describe whether the valve has a fixed safety position (SafePosEn = TRUE) or whether the current position should be maintained (SafePosEn = FALSE)

The safety position is described with SafePos:

SafePos = FALSE: Safety position of the valve: PosMin

SafePos = TRUE: Safety position of the valve: PosMax

Monitoring

The control and the respective Feedback can be monitored via Feedback monitoring.

The interface also has a position monitor, which extends the Feedback monitoring with 2 additional outputs:

The output PosReachedFbk indicates whether the set position has been reached:

PosReachedFbk = |PosFbk - Pos| <= PosTolerance

The time to reach the position is specified via the input MonPosTi. If the time is exceeded, the output MonPosErr is set to TRUE.

Further properties

Name of the object

Object description

WQC

OSLevel

Value scaling

Value limitation

Locking

Reset

Inheritance hierarchy

FB_MTP_AnaVlv

   FB_MTP_MonAnaVlv

Implemented interfaces

I_MTP_MonAnaVlv

FB_MTP_MonAnaVlv 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

StateChannel

StateOffAut

StateOpAut

StateAutAut

 

See Operation Mode

 

OpenAut

BOOL

Automatic switching request to move to the selected position of the valve.

Read

CloseAut

BOOL

Automatic switching request to close the valve.

Read

OpenFbkCaIc

BOOL

Source of the valve-open limit switch feedback signal:

1: Calculated

0: Sensor

Read

OpenFbk

BOOL

Valve-open limit switch feedback signal

Read

CloseFbkCaIc

BOOL

Source of the feedback signal

Valve-closed limit switch:

1: Calculated

0: Sensor

Read

CloseFbk

BOOL

Valve-closed limit switch feedback signal.

Read

SrcChannel

SrcManAut

SrcIntAut

 

See Source Mode

 

PosInt

REAL

Internal value specification for the position

Read

PosUnit

INT

Unit of the position

Read

PosMin

REAL

Lower limit of the value specification for the valve position

Read

PosMax

REAL

Upper limit of the value specification for the valve position

Read

PosFbkCaIc

BOOL

Source of the position feedback value:

1: Calculated

0: Sensor

Read

PosFbk

REAL

Feedback value of the position

Read

PosScIMin

REAL

Scale start of the position display

Read

PosScIMax

REAL

Scale end of the position display

Read

PermEn

Permit

IntlEn

Interlock

ProtEn

Protect

 

See Locking

 

SafePosEn

BOOL

Use the safe position of the valve:

1: Use safe position.

0: Do not use safe position.

Read

SafePos

BOOL

Safe position of the valve:

1: Open

0: Closed

Read

ResetAut

BOOL

Automatic reset switching request:

1: Reset requested.

0: No reset requested.

Read

MonEn

BOOL

Enable FeedbackMonitoring:

1: FeeedbackMonitoring active

0: FeedbackMonitoring inactive

Read/write

MonStatTi

REAL

Monitoring time for static errors [s]

Read

MonDynTi

REAL

Monitoring time for dynamic errors [s]

Read

MonSafePos

BOOL

Behavior of the interface after an error occurs:

1: Safe position should be approached.

0: The current state is retained.

Read

FB_MTP_MonAnaVlv 4:

It is possible to change the value of the input variable MonEn during runtime; however, according to the MTP guideline, this is not permitted because the value is changed via manual operation (e.g., via OPC UA).

FB_MTP_MonAnaVlv 5: Outputs

Name

Type

Description

OPC UA access

StateOffAct

StateOpAct

StateAutAct

 

See Operation Mode

 

OpenAct

BOOL

Open valve switching command.

Read

CloseAct

BOOL

Close valve switching command.

Read

SrcManAct

SrcIntAct

 

See Source Mode

 

Pos

REAL

Position setpoint on valve

Read

SafePosAct

BOOL

Safe position:

1: Move to a safe position

0: Normal operation

Read

MonStatErr

REAL

Static error:

1: active

0: inactive

Read

MonDynErr

REAL

Dynamic error:

1: active

0: inactive

Read

External variables

Name

Type

Description

OPC UA access

StateOffOp

StateOpOp

StateAutOp

 

See Operation Mode

 

OpenOp

BOOL

Operator switching request to move to the selected position of the valve.

Read/write

CloseOp

BOOL

Operator switching request to close the valve.

Read/write

SrcManOp

SrcIntOp

 

See Source Mode

 

PosMan

BOOL

Manual value specification for the position

Read/write

PosRbk

REAL

Unprocessed value of the Operator value specification for the position

Read/write

ResetOp

BOOL

Operator reset switching request:

0→1: Operator request

1→0: Request has been processed.

Read/write

FB_MTP_MonAnaVlv 6: Methods

Name

Type

Description

IsOffline

IsOperator

IsAutomatic

SetOffline

SetOperator

SetAutomatic

 

See Operation Mode

IsInternal

IsManual

SetInternal

SetManual

 

See Source Mode

Open

BOOL

The Open method allows the valve to be opened to a defined position. In this process, the OperationMode is transformed into the state SetAutomatic using the method Automatic. The *Aut switching requests are set to defined values, and the internal logic is invoked. Finally, the *Aut switching requests are reset to False.

For position specification, the SourceMode is set to the SetInternal state using the Internal method. The value of the method's input variable PosInt is written to the input variable of the same name, PosInt, in this function block

Returns True if OpenFbk = True and RevFbk = False.

Close

BOOL

The Close method allows the valve to be closed. In this process, the OperationMode is transformed into the state SetAutomatic using the method Automatic. The *Aut switching requests are set to defined values, and the internal logic is invoked. Finally, the *Aut switching requests are reset to False.

For position specification, the SourceMode is set to the SetInternal state using the Internal method. The value of the method's input variable PosInt is written to the input variable of the same name, PosInt, in this function block

Returns True if OpenFbk = False and RevFbk = True.