FB_MTP_AnaDrv

FB_MTP_AnaDrv 1:

The function block FB_MTP_AnaDrv 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. 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. With simultaneous requests from Fwd* and Rev*, both are prioritized equally and the drive remains in its state. Stop* is prioritized highest at SafePos = FALSE with simultaneous requests from Fwd*, Rev* and Stop*. 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.

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_AnaDrv 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_AnaDrv 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

Further characteristics

Name of the object

Object description

WQC

OSLevel

Unit

Feedback

Locking

Reset

FB_MTP_AnaDrv 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

Src*

 

See Source Mode

 

RpmInt

REAL

Internal Speed setpoint specification

Read

RpmUnit

INT

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

Perm*

Int*

Prot*

 

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: Rotation direction specification for SafePos = TRUE via the variable SafePosDir

0: No rotation direction specified

SafePosDir

BOOL

Rotation direction specification for SafePos = TRUE and SafePosDirRpmEn = TRUE

1: reverse

0: forward

SafePosRpm

REAL

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

ResetAut

BOOL

Automatic reset switching request:

1: Reset requested.

0: No reset requested.

Read

FB_MTP_AnaDrv 5: Outputs

Name

Type

Description

OPC UA access

State*

 

See Operation Mode

 

FwdCtrl

BOOL

Forward movement:

1: active

0: inactive

Read

RevCtrl

BOOL

Reverse movement:

1: active

0: inactive

Read

Src*

 

See Source Mode

 

Rpm

REAL

Speed setpoint on drive

Read

SafePosAct

BOOL

Safety position enabled:

1: Safety position is active.

0: Safety position is not active.

Read

External variables

Name

Type

Description

OPC UA access

State*

 

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 movement:

(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 movement:

(Relevant if StateOpAct & RevEn)

1: Execute reverse movement.

0: Do not execute any reverse movement.

Read/write

Src*

 

See Source Mode

 

RpmMan

REAL

Manual setpoint specification for the speed

Read/write

RpmRbk

REAL

Unprocessed value of the Operator speed value specification

Read

ResetOp

BOOL

Operator reset switching request:

0→1: Operator request

1→0: Request has been processed.

Read/write

FB_MTP_AnaDrv 6: Methods

Name

Description

SetOffline

SetOperator

SetAutomatic

See Operation Mode

SetInternal

SetManual

See Source Mode