FB_MTP_PIDCtrlBase

FB_MTP_PIDCtrlBase 1:

The function block FB_MTP_PIDCtrlBase serves as an interface for using a PID controller from different sources: internal PLC logic or manual operation (e.g. via OPC UA). Value specifications are managed independently of each other by the state machines of Operation Mode and Source Mode. The OPC UA access rights are described in the variable tables.

FB_MTP_PIDCtrlBase 2:

The FB_MTP_PIDCtrlBase is an abstract function block. This cannot be instantiated, but must be derived (see e.g., FB_MTP_PIDCtrl)!

State machines

The source of the setpoint SP* is managed via the state machine of the Source Mode. The source of the output manipulated variable MV* is managed via the state machine of the Operation Mode: output value of the PID logic or specification by manual operation MVMan.

PID controller

The PID logic (PIDLogic()) can be freely selected. The PID logic is called via the method PIDLogic. The parameters for the controller are described via the inputs P, Ti, and Td. The output MV describes the current manipulated variable depending on the current states of the state machines. The output SP shows the currently used setpoint of the PID logic.

The methods PIDLogic and ResetPID are called within this function block depending on the states of the state machines:

The function block works according to the following scheme:

FB_MTP_PIDCtrlBase 3:

Further properties

Name of the object

Object description

WQC

OSLevel

Value scaling

Value limitation

Unit

Implemented interfaces

I_MTP_PIDCtrl

FB_MTP_PIDCtrlBase 4: 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

 

MVUnit

INT

Unit of manipulated variable

Read

MVSclMin

REAL

Minimum value of the manipulated variable representation

Read

MVSclMax

REAL

Maximum value of the manipulated variable representation

Read

MVMin

REAL

Minimum value of the manipulated variable

Read

MVMax

REAL

Maximum value of the manipulated variable

Read

SrcChannel

SrcIntAut

SrcManAut

 

See Source Mode

 

SPInt

REAL

Internal setpoint specification

Read

SPUnit

INT

Unit of the setpoint

Read

SPIntMin

REAL

Lower limit value of the internal setpoint specification

Read

SPIntMax

REAL

Upper limit value of the PEA internal setpoint specification

Read

SPManMin

REAL

Lower limit value of the manual setpoint specification

Read

SPManMax

REAL

Upper limit value of the manual setpoint specification

Read

SPSclMin

REAL

Minimum value for the representation of the setpoint specification

Read

SPSclMax

REAL

Maximum value for the representation of the setpoint specification

Read

PV

REAL

Process value

Read

PVUnit

INT

Unit of the process value

Read

PVSclMin

REAL

Minimum value for the representation of the process value

Read

PVSclMax

REAL

Maximum value for the representation of the process value

Read

P

REAL

Proportional gain of the controller

Read/write

Ti

REAL

Integral action time of the controller [s]

Read/write

Td

REAL

Derivative action time of the controller [s]

Read/write

FB_MTP_PIDCtrlBase 5: Outputs

Name

Type

Description

OPC UA access

StateOffAct

StateOpAct

StateAutAct

 

See Operation Mode

 

MV

REAL

Current manipulated variable of the controller

 

SrcIntAct

SrcManAct

 

See Source Mode

 

SP

REAL

Setpoint currently used by the controller.

 

External variables

Name

Type

Description

OPC UA access

StateOffOp

StateOpOp

StateAutOp

 

See Operation Mode

 

MVMan

REAL

Manual specification of the manipulated variable

Read/write

SrcIntOp

SrcManOp

 

See Source Mode

 

SPMan

REAL

Manual setpoint specification

Read/write

FB_MTP_PIDCtrlBase 6: Methods

Name

Description

PIDLogic

This method enables the implementation of the logic of the PID controller.

ResetPID

This method allows the implementation of a logic for resetting the PID logic.