FB_MTP_MonAnaDrv
The function block FB_MTP_MonAnaDrv is an object for controlling a drive with variable speed from different sources: internal PLC logic or manual operation (e.g. via OPC UA). Switching requests and value specifications are managed independently of each other via the state machines of Operation Mode and Source Mode . In addition, the function block allows you to monitor the output values along with the corresponding feedback. The OPC UA access rights are described in the variable tables.
Controlling the drive
The direction of rotation of the drive is specified via the switching requests Fwd*, Rev*, and Stop*. The state machine of the Operation Mode manages whether and from which source new switching requests are processed.
If both requests are made simultaneously, the safety position is taken into account: Stop* has the highest priority over SafePos = FALSE, and the drive is stopped. If SafePos = TRUE, the switching requests Fwd*, Rev*, and Stop* are prioritized equally and the drive remains in its current state in the event of simultaneous requests.
When Locking is active, it is no longer possible to control the drive, depending on the type of interlock.
The variable Trip indicates the current state of the motor protection. If Trip = FALSE is true, this means that the motor protection has been triggered and the drive is stopped immediately by setting the variables FwdCtrl and RevCtrl to FALSE.
If Trip = TRUE is true, the motor protection is in a fault-free state. Once the motor protection has been restored after triggering (Trip = TRUE), the state must be acknowledged via Reset before operation can resume.
Setpoint specification
The speed is set via Rpm* variables. The speed specification is managed by the state machine Source Mode and is output according to the diagram below:

Safety position
The safety position is defined via the variables SafePos, SafePosDirRpmEn, SafePosDir, and SafePosRpm.
The variable SafePos is used to specify whether the safety position of the drive is the de-energized state or an active state.
![]() | The variables |
Safety position: de-energized state (SafePos = FALSE)
In the de-energized state, the drive is stopped (FwdCtrl = FALSE, RevCtrl = FALSE, and Rpm = 0)
Safety position: active state (SafePos = TRUE)
If the state is active, the default direction of rotation and speed can be activated (SafePosDirRpmEn = TRUE), and the direction of rotation (SafePosDir) or speed (SafePosRpm) can be specified.
If SafePosDirRpmEn = FALSE, the current movement state (forward, reverse, or stop) is the safety position.
If the default setting (SafePosDirRpmEn = TRUE) is activated, the safety position is forward (SafePosDir = FALSE) or reverse (SafePosDir = TRUE) with the defined safety speed (SafePosRpm).
The following table shows the operating options for the drive (Fwd*, Rev*, Stop*, and Rpm*) when Permit is active, depending on the initial state of the drive (stop drive, set drive to forward movement, and set drive to reverse movement) and the defined safety position:
SafePos | SafePos | SafePosDir | Drive set to Stop | Drive set to Forward | Drive set to Reverse |
|---|---|---|---|---|---|
| - | - |
|
|
|
|
| - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x: Switching requests and/or value specifications are no longer taken into account.
✓: Switching requests and/or value specifications are taken into account.
Monitoring
The control and the respective Feedback can be monitored via Feedback monitoring.
The output RpmErr indicates the current speed deviation RpmErr = Rpm - RpmFbk. The speed deviation can be monitored for an upper and lower limit (Alarm High and Alarm Low) using the Limit value monitoring.
General definitions
Inheritance hierarchy
FB_MTP_AnaDrv
FB_MTP_MonAnaDrv
Implemented interfaces
Inputs
Name | Type | Description | OPC UA access |
|---|---|---|---|
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 |
|
FwdEn | BOOL | Enable forward movement: 1: Enabled 0: Disabled | Read |
RevEn | BOOL | Enable reverse movement: 1: Enabled 0: Disabled | Read |
StopAut | BOOL |
(Relevant if 1: Execute stop. 0: No stop | Read |
FwdAut | BOOL |
(Relevant if 1: Execute forward movement. 0: Do not execute any forward movement. | Read |
RevAut | BOOL |
(Relevant if 1: Execute reverse movement. 0: Do not execute any reverse movement. | Read |
FwdFbk | BOOL | Feedback signal for forward movement: 1: Forward movement 0: No forward movement | Read |
FwdFbkCaIc | BOOL | Source of the forward movement feedback signal: 1: Calculated 0: Sensor | Read |
RevFbk | BOOL | Feedback signal for reverse movement: 1: Reverse movement 0: No reverse movement | Read |
RevFbkCaIc | BOOL | Source of the feedback signal for reverse motion: 1: Calculated 0: Sensor | Read |
SrcChannel SrcManAut SrcIntAut |
| See Source Mode |
|
RpmInt | REAL |
| Read |
RpmUnit | INT | Rotational speed unit | Read |
RpmMin | REAL | Upper limit of the speed setpoint | Read |
RpmMax | REAL | Lower limit of the speed setpoint | Read |
RpmFbkCalc | BOOL | Source of the actual speed value: 1: Calculated 0: Sensor | Read |
RpmFbk | REAL | Actual speed value | Read |
RpmSclMin | REAL | Speed scale start | Read |
RpmSclMax | REAL | Speed scale end | Read |
PermEn Permit Intlen Interlock ProtEn Protect |
| See Locking |
|
Trip | BOOL | Signaling contact for motor protection: 1: No error 0: Motor protection tripped. | Read |
SafePos | BOOL | 1: Retain current state. 0: Stop | Read |
SafePosDirRpmEn | BOOL | 1: Direction of rotation specification for 0: No direction of rotation specified | - |
SafePosDir | BOOL | Direction of rotation specification for 1: Reverse 0: Forward | - |
SafePosRpm | REAL | Speed specification for safety position, if | - |
MonEn | BOOL | Enable 1: 0: | 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 |
RpmAHEn | BOOL | Monitor limit 1: Monitoring active 0: No monitoring | Read |
RpmALEn | BOOL | Monitor limit 1: Monitoring active 0: No monitoring | Read |
RpmAHLim | REAL |
| Read/write |
RpmALLim | REAL |
| Read/write |
ResetAut | BOOL |
1: Reset requested. 0: No reset requested. | Read |
![]() | It is possible to change the value of the input variable |
Outputs
Name | Type | Description | OPC UA access |
|---|---|---|---|
StateOffAct StateOpAct StateAutAct |
| See Operation Mode |
|
FwdCtrl | BOOL | Forward movement: 1: Active 0: Inactive | Read |
RevCtrl | BOOL | Reverse movement: 1: Active 0: Inactive | Read |
SrcManAct SrcIntAct |
| See Source Mode |
|
Rpm | REAL | Speed setpoint on drive | Read |
MonStatErr | REAL | Static error: 1: active 0: inactive | Read |
MonDynErr | REAL | Dynamic error: 1: active 0: inactive | Read |
RpmDiff | REAL | Speed deviation: |
|
RpmAHAct | BOOL |
| Read |
RpmALAct | BOOL |
| Read |
External variables
Name | Type | Description | OPC UA access |
|---|---|---|---|
StateOffOp StateOpOp StateAutOp |
| See Operation Mode |
|
StopOp | BOOL |
(Relevant if 1: Execute stop. 0: Do not execute a stop. | Read/write |
FwdOp | BOOL |
(Relevant if 1: Execute forward movement. 0: Do not execute any forward movement. | Read/write |
RevOp | BOOL |
(Relevant if 1: Execute reverse movement. 0: Do not execute any reverse movement. | Read/write |
SrcManOp SrcIntOp |
| See Source Mode |
|
RpmMan | REAL |
| Read/write |
RpmRbk | REAL | Unprocessed value of the | Read |
Methods
Name | Type | Description |
|---|---|---|
IsOffline IsOperator IsAutomatic SetOffline SetOperator SetAutomatic |
| See Operation Mode |
IsInternal IsManual SetInternal SetManual |
| See Source Mode |
Forward | BOOL | The To set the speed, the Returns |
Reverse | BOOL | The To set the speed, the Returns |
Stop | BOOL | The The Returns |
