FB_MTP_MonAnaDrv

FB_MTP_MonAnaDrv 1:

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:

FB_MTP_MonAnaDrv 2:

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.

FB_MTP_MonAnaDrv 3:

The variables SafePosDirRpmEn, SafePosDir, and SafePosRpm are not part of the MTP guideline. They have also been implemented and can be used to define a safety position in the active state. These variables are not listed in the MTP file and are not made available via OPC UA.


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
DirRpmEn

SafePosDir

Drive set to

Stop

Drive set to

Forward

Drive set to

Reverse

FALSE

-

-

SafePosAct = TRUE

Rev* + Fwd*: x

Rpm*: x

SafePosAct = FALSE

Rev* + Stop*: ✓

Rpm*: ✓

SafePosAct = FALSE

Fwd* + Stop*: ✓

Rpm*: ✓

TRUE

FALSE

-

SafePosAct = TRUE

Rev* + Fwd*: x

Rpm*: x

SafePosAct = TRUE

Rev* + Stop*: x

Rpm*: x

 

SafePosAct = TRUE

Fwd* + Stop*: x

Rpm*: x

TRUE

TRUE

FALSE

(Fwd)

SafePosAct = FALSE

Rev* + Fwd*: ✓

Rpm*: ✓

SafePosAct = TRUE

Rev* + Stop*: x

Rpm*: x (SafePosRpm)

 

SafePosAct = FALSE

Fwd* + Stop*: ✓

Rpm*: ✓

TRUE

TRUE

TRUE

(Rev)

SafePosAct = FALSE

Rev* + Fwd*: ✓

Rpm*: ✓

SafePosAct = FALSE

Rev* + Stop*: ✓

Rpm*: ✓

SafePosAct = TRUE

Fwd* + Stop*: x

Rpm*: x (SafePosRpm)

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

Name of the object

Object description

WQC

OSLevel

Value scaling

Value limitation

Locking

Reset

Inheritance hierarchy

FB_MTP_AnaDrv

   FB_MTP_MonAnaDrv

Implemented interfaces

I_MTP_MonAnaDrv


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

Automatic switching request to set the drive to stop:

(Relevant if StateAutAct)

1: Execute stop.

0: No stop

Read

FwdAut

BOOL

Automatic switching request to set the drive in forward motion:

(Relevant if StateAutAct & FwdEn)

1: Execute forward movement.

0: Do not execute any forward movement.

Read

RevAut

BOOL

Automatic switching request to set the drive in forward motion:

(Relevant if StateAutAct & RevEn)

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

Internal Speed setpoint specification

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 SafePos = TRUE via the variable SafePosDir

0: No direction of rotation specified

-

SafePosDir

BOOL

Direction of rotation specification for SafePos = TRUE and SafePosDirRpmEn = TRUE

1: Reverse

0: Forward

-

SafePosRpm

REAL

Speed specification for safety position, if SafePos = TRUE and SafePosDirRpmEn = TRUE

-

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

RpmAHEn

BOOL

Monitor limit Alarm High:

1: Monitoring active

0: No monitoring

Read

RpmALEn

BOOL

Monitor limit Alarm Low:

1: Monitoring active

0: No monitoring

Read

RpmAHLim

REAL

Alarm High limit (>0)

Read/write

RpmALLim

REAL

Alarm Low limit (<0)

Read/write

ResetAut

BOOL

Automatic reset switching request:

1: Reset requested.

0: No reset requested.

Read

FB_MTP_MonAnaDrv 5:

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_MonAnaDrv 6: 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: RpmDiff = Rpm - RpmFbk

 

RpmAHAct

BOOL

Alarm High limit exceeded.

Read

RpmALAct

BOOL

Alarm Low limit undershot.

Read


External variables

Name

Type

Description

OPC UA access

StateOffOp

StateOpOp

StateAutOp

 

See Operation Mode

 

StopOp

BOOL

Operator switching request to set the drive to stop:

(Relevant if StateOpAct)

1: Execute stop.

0: Do not execute a stop.

Read/write

FwdOp

BOOL

Operator switching request to set the drive in forward motion:

(Relevant if StateOpAct & FwdEn)

1: Execute forward movement.

0: Do not execute any forward movement.

Read/write

RevOp

BOOL

Operator switching request to set the drive in forward motion:

(Relevant if StateOpAct & RevEn)

1: Execute reverse movement.

0: Do not execute any reverse movement.

Read/write

SrcManOp

SrcIntOp

 

See Source Mode

 

RpmMan

REAL

Manual setpoint specification for the speed

Read/write

RpmRbk

REAL

Unprocessed value of the Operator speed setpoint

Read


FB_MTP_MonAnaDrv 7: Methods

Name

Type

Description

IsOffline

IsOperator

IsAutomatic

SetOffline

SetOperator

SetAutomatic

 

See Operation Mode

IsInternal

IsManual

SetInternal

SetManual

 

See Source Mode

Forward

BOOL

The Forward method allows the drive to start moving forward at a defined speed. 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.

To set the speed, the SourceMode is set to the state SetInternal using the Internal method. The value of the input variable RpmInt in this method is written to the input variable of the same name, RpmInt, in the corresponding function block.

Returns True if FwdFbk = True and RevFbk = False.

Reverse

BOOL

The Reverse method allows the drive to start moving in reverse at a defined speed. 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.

To set the speed, the SourceMode is set to the state SetInternal using the Internal method. The value of the input variable RpmInt in this method is written to the input variable of the same name, RpmInt, in the corresponding function block.

Returns True if FwdFbk = False and RevFbk = True.

Stop

BOOL

The Stop method allows you to stop the drive. 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.

The SourceMode is set to the state SetInternal using the Internal method. Using the input variable RpmInt of this method, you can write the value RpmInt of the corresponding function block. By default, the value in the method is set to 0.

Returns True if FwdFbk = False and RevFbk = False.