FB_MTP_Procedure

The function block FB_MTP_Procedure
contains all attributes and methods for describing a procedure. A procedure is an execution variant of a service and can therefore only be assigned to one service. All procedures receive a unique ProcedureID
in the service. This must be described by a natural number, whereby the number 0 may not be used! The variable IsSelfCompleting
is used to specify whether the process function(s) of the procedure complete(s) themselves (e.g. after a time has elapsed).
The outputs IsSelfCompleting
and ProcedureID
are initialized when this function block is instantiated.
CommandInfo
is coded according to and is updated separately for each procedure that is in the state Automatic
or Operator
, regardless of the state of the service. It indicates which control commands are currently enabled.
The variable CommandAdapt
is coded according to . It can be used to further restrict the enabling of control commands in CommandInfo
.
![]() | The variable |
![]() | The |
![]() | For the use of procedures, the use of MTP engineering and its automatic code generation is recommended! |
Required parameters and equipment
The function block receives the process parameters ProcParameters
required for execution as Array[*] OF POINTER TO FB_MTP_ParameterElement
. The required equipment RequiredEquipment
is transferred as Array[*] OF POINTER TO I_MTP_ReqEq
.
![]() | If no |
Services state machine
The states of the service state machine are executed in the methods of the same name in this function block. The methods are called by the service state machine.
Calling the procedure
The procedures can be called by the higher-level service. A possible call is described in the function block FB_MTP_ServiceControl.
Further characteristics
Syntax
FUNCTION_BLOCK FB_MTP_Procedure_1_Service EXTENDS FB_MTP_Procedure
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 |
CommandInfo | DWORD | Currently enabled control commands | Read |
ProcParameters | ARRAY [*] OF POINTER TO POINTER TO FB_MTP_ParameterElement | Required procedure parameters | - |
RequiredEquipment | ARRAY [*] OF POINTER TO I_MTP_ReqEq | Required equipment | - |
CommandAdapt | DWORD | Variable for blocking state transitions | - |
Outputs
Name | Type | Description | OPC UA access |
---|---|---|---|
IsSeIfCompIeting | BOOL | 1: Procedure is self-completing. 0: Procedure is completed via the control command. | Read |
ProcedureID | DWORD | Unique identification of the procedure within the service | Read |
Methods
Name | Type | Description |
---|---|---|
Aborted | BOOL | Implementation of the logic for the |
Aborting | BOOL | Implementation of the logic for the |
Completed | BOOL | Implementation of the logic for the |
Completing | BOOL | Implementation of the logic for the |
Execute | BOOL | Implementation of the logic for the |
Held | BOOL | Implementation of the logic for the |
Holding | BOOL | Implementation of the logic for the |
Paused | BOOL | Implementation of the logic for the |
Pausing | BOOL | Implementation of the logic for the |
Resetting | BOOL | Implementation of the logic for the |
Resuming | BOOL | Implementation of the logic for the |
Starting | BOOL | Implementation of the logic for the |
Stopping | BOOL | Implementation of the logic for the |
Stopped | BOOL | Implementation of the logic for the |
Unholding | BOOL | Implementation of the logic for the |
IsActuatorsInternal | BOOL | 1: All actuators assigned to the procedure are in the state |
IsActuatorsManual | BOOL | 1: All actuators assigned to the procedure are in the state |
IsActuatorsOffline | BOOL | 1: All actuators assigned to the procedure are in the state |
IsActuatorsOperator | BOOL | 1: All actuators assigned to the procedure are in the state |
IsActuatorsAutomatic | BOOL | 1: All actuators assigned to the procedure are in the state |
IsReqEqInternal | BOOL | 1: PID logic and all actuators assigned to the procedure are in the state |
IsReqEqManual | BOOL | 1: PID logic and all actuators assigned to the procedure are in the state |
IsReqEqOffline | BOOL | 1: PID logic and all actuators assigned to the procedure are in the state |
IsReqEqOperator | BOOL | 1: PID logic and all actuators assigned to the procedure are in the state |
IsReqEqAutomatic | BOOL | 1: PID logic and all actuators assigned to the procedure are in the state |
SetActuatorsInternal | BOOL | All actuators assigned to the procedure are transferred to the state |
SetActuatorsManual | BOOL | All actuators assigned to the procedure are transferred to the state |
SetActuatorsOffline | BOOL | All actuators assigned to the procedure are transferred to the state |
SetActuatorsOperator | BOOL | All actuators assigned to the procedure are transferred to the state |
SetActuatorsAutomatic | BOOL | All actuators assigned to the procedure are transferred to the state |
SetReqEqInternal | BOOL | PID logic and all actuators assigned to the procedure are transferred to the state |
SetReqEqManual | BOOL | PID logic and all actuators assigned to the procedure are transferred to the state |
SetReqEqOffline | BOOL | PID logic and all actuators assigned to the procedure are transferred to the state |
SetReqEqOperator | BOOL | PID logic and all actuators assigned to the procedure are transferred to the state |
SetReqEqAutomatic | BOOL | PID logic and all actuators assigned to the procedure are transferred to the state |